intangent outtangent error
have an error while creatin a key on 0frame and while there is no another key.
otherwise it runs well if there is minimum one key while you are on frame 0 or you are creatin the first speed key.
( global zztTool rollout zzTool "super spray" ( group"Set Speed" --across: 2 ( spinner spSpeed "Speed" range:[0,1000,30]-- animatable button btn_deleteKeys "Delete All Existing Keys" width:120 height:20 setColor:red ) /* group ( )*/ on btn_deleteKeys pressed do ( ( getST=slidertime sliderTime = 0f obj = getCurrentSelection () deleteKeys obj #allKeys sliderTime = getST ) ) on spSpeed changed val do ( for obj in (selection as array) do if classof obj == superspray then ( s=slidertime hiz=spSpeed.value at time s animate on obj.speed = (hiz/2.54) a = getKeyIndex obj.speed.controller s obj.speed.controller.keys[a].inTangentType = #linear obj.speed.controller.keys[a].outTangentType = #fast ) ) ) try ( closeRolloutFloater zztTool ) catch () zztTool=newRolloutFloater "fountain floater" 300 100 addRollout zzTool zztTool )
Comments
thanks. that works :)
thanks. that works :)
yep, array index in mxs start
yep, array index in mxs start from 1,
so check if there are keys (a > 0):
my recent MAXScripts RSS (archive here)
need help about "inTangentType"
on a frame that is not "0f" it works well
on frame which is not "0f" it works well
but on frame "0f" and if there isn't another animation key,
it gives an error.
can anyone help me about the error.