Access Attribute Holder Rollout Controls from external function not working
Hi everybody! Can anyone tell me why the function 'enableControl' is not working in this code?:
pt = Point() addModifier pt (EmptyModifier()) myCA = attributes myData ( parameters main rollout:myRollout ( myParam type:#boolean ui:ckbMyParam default:false ) rollout myRollout "My Parameters" ( checkbox ckbMyParam "My Param" enabled:false ) ) custAttributes.add pt.modifiers[#Attribute_Holder] myCA function enableControl obj = ( obj.modifiers[#Attribute_Holder].myData.myRollout.ckbMyParam.enabled = true ) enableControl pt
Thanks!
Comments
i also think that the re
i also think that the re selecting will get it to its previous state, but not 100 percent sure...!
`
actualy it was working after reselection, but not after saving and reopen...
Not wit should save setting, and load on reopen max file:
Let me know it all works now.
--
I have not found a solution for my test script... the same problem...
`
maybe this will help:
It just store extra local parameter to save on/off
Hope it helps
Pixamoon
--
That worked OK! Thanks a lot! :)
Just a comment: The first line of the function 'enableControl' now is not necessary. It can be erased.
Thanks Pixamoon!
www.splinedynamics.com
`
great :)
I think the line is needed when the object is selected and custom attributes are visible. It just refresh it
I realized the script actually works but...
I realized the script actually works but just temporarily and only if you have the point object selected. When you deselect the object and re-select it again then it goes back to previous state.
Any clue??
www.splinedynamics.com