Link between attribute holder and Control Panel
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"
Comments
You need a parameter block to hold the values. While you're at it, you can also add a parameter to hold an instance of the controller so that you don't have to rely on scene name:
Some of my scripts and MCGs :: 3ds Max SDK Intro for Scripters