Attribute holder and Control Panel


#1

Hi everybody,

I want to make a “custom attribute holder” on my animation controler to change the parameters “Mass” and “Drag” to my spring, in the motion panel.

I made this script and it works, the Mass and Drag are changed in the control panel of my Spring, when I move my spinner from my attribute holder.
BUT :

When I click on an other controler and return on this one, the spinner doesn’t correspond to the right value in the control panel, but of the default value of my spinner.
Solution should be to check the right value in the control panel and set the current value of my spinner egal, but I have absolutly any idea how to do.

I’m not a programmeur and doing this was enough painful ahah
Could you help me please? (sorry for my english)

"SPRING_Control_Custom_attribute = attributes custom_Attributes
(
rollout SpringControlRollout “Spring Control”
(
spinner spn_Mass “Height” range:[0,2000,500] type:#float
spinner spn_Drag “Height” range:[0,10,2] type:#float

on spn_Mass changed val do $‘Point001’.position.controller.setMass val
on spn_Drag changed val do $‘Point001’.position.controller.setDrag val
)
)

CustAttributes.add $.modifiers[1] SPRING_Control_Custom_attribute"