I created a test script. Can anyone confirm the behaviour I'm experiencing with this test script? Is it a UI bug?
The test script is a tool script GG_NoistTest.lua but sorry it doesn't have an icon.
Code: Select all
-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************
ScriptName = "GG_NoisyTest"
-- **************************************************
-- General information about this script
-- **************************************************
GG_NoisyTest = {}
function GG_NoisyTest:Name()
return "GG_NoisyTest"
end
function GG_NoisyTest:Version()
return "1.0"
end
function GG_NoisyTest:Description()
return "GG_NoisyTest"
end
function GG_NoisyTest:Creator()
return "GGoblin"
end
function GG_NoisyTest:UILabel()
return "GG_NoisyTest"
end
-- **************************************************
-- The guts of this script
-- **************************************************
function GG_NoisyTest:Run(moho)
local veclayer = moho:CreateNewLayer( MOHO.LT_VECTOR) -- create vector layer
local mesh = moho:Mesh()
-- draw square
local v = LM.Vector2:new_local()
v.x = -0.2
v.y = 0.2
mesh:AddLonePoint(v, 0)
v.x = -0.2
v.y = 0.2
mesh:AppendPoint(v, 0)
v.x = 0.2
v.y = 0.2
mesh:AppendPoint(v, 0)
v.x = 0.2
v.y = -0.2
mesh:AppendPoint(v, 0)
v.x = -0.2
v.y = -0.2
mesh:AppendPoint(v, 0)
mesh:WeldPoints(firstpoint, mesh:CountPoints() - 1, 0)
mesh:Point(0):SetCurvature(0,0)
mesh:Point(1):SetCurvature(0,0)
mesh:Point(2):SetCurvature(0,0)
mesh:Point(3):SetCurvature(0,0)
mesh:SelectConnected()
local shapeid = moho:CreateShape(true,false,0)
local shape = mesh:Shape(shapeid)
-- move square with different noisy interpolation scale values
local pos = LM.Vector3:new_local()
pos.x = -1
pos.y = 0
pos.z = 0
veclayer.fTranslation:SetValue(0,pos)
veclayer.fTranslation:SetKeyInterp(0,MOHO.INTERP_NOISY,0.30,0.25)
pos.x = -0.5
veclayer.fTranslation:SetValue(24,pos)
veclayer.fTranslation:SetKeyInterp(24,MOHO.INTERP_NOISY,0.30,0.5)
pos.x = 0
veclayer.fTranslation:SetValue(48,pos)
veclayer.fTranslation:SetKeyInterp(48,MOHO.INTERP_NOISY,0.30,0.75)
pos.x = 0.5
veclayer.fTranslation:SetValue(72,pos)
veclayer.fTranslation:SetKeyInterp(72,MOHO.INTERP_NOISY,0.30,1)
pos.x = 1
veclayer.fTranslation:SetValue(96,pos)
veclayer.fTranslation:SetKeyInterp(96,MOHO.INTERP_NOISY,0.30,1.25)
end
frame 0 x=-1 noisy scale = 0.25 -> scale in UI: 4
frame 24 x=-0.5 noisy scale= 0.5 -> scale in UI: 2
frame 48 x=0 noisy scale= 0.75 -> scale in UI: 1.333
frame 72 x=0.5 noisy scale= 1 -> scale in UI: 1
frame 96 x=1 noisy scale= 1.25 -> scale in UI: 0.8

Interestingly when we visually look at the noisy path generated its scale seems to be increasing as per my scale in the script. Is it just the UI reading that is screwed up?
Any insight would be appreciated. Thank you.