Notifications
Clear all
[Closed] For Loop with fload expression
Jun 04, 2014 5:04 pm
Hi all, Im wondering how can I add the variable of a loop to an expression in a float Expression
here is what Im doing. And gives me an error, but I dont know how to assign āiā to the expression.
for i = 1 to $splineColumna.modifiers[#Spline_IK_Control].getKnotCount() do
(
CtrlIK=$SplineColumna.modifiers[#Spline_IK_Control].helper_list[i]
CtrlIK.rotation.controller.Y_Rotation.controller = float_list ()
ctrlIKFloatExpression= CtrlIK.rotation.controller.Y_Rotation.controller.Available.controller = Float_Expression()
ctrlIKFloatExpression.setExpression "sin (F*5+i)*.2"
)
thanks and sorry for my english
3 Replies
Jun 04, 2014 5:04 pm
thans man
but unfortunatly it`s still giving me an error, I dont know why, I copied the string as you put in
>> MAXScript Rollout Handler Exception:
ā Runtime error: IExprCtrl::SetExpression – Expression parse error: sin (F*5+ <<
Jun 04, 2014 5:04 pm
try this
for i = 1 to $splineColumna.modifiers[#Spline_IK_Control].getKnotCount() do
(
CtrlIK=$SplineColumna.modifiers[#Spline_IK_Control].helper_list[i]
CtrlIK.rotation.controller.Y_Rotation.controller = float_list ()
ctrlIKFloatExpression= CtrlIK.rotation.controller.Y_Rotation.controller.A vailable.controller = Float_Expression()
str = "sin (F*5+" + i as string + ")*.2"
ctrlIKFloatExpression.setExpression &str
)