![]() ![]() ![]() |
▪For Maya Attribute Button & Sliders: For attr-button that controls maya attribute, or sliders that control maya attributes, you don't need to write code to sync their values displayed with maya. They will be auto-sync with maya at most of time. These is situation that picker does not sync with your maya scene: Only if the maya nodes are created after you loaded the picker, or reference is unload, and loaded back after picker is loaded. However, once you hover your mouse into any picker view, they start to sync again.
▪What if you wanna sync the command button state / dummy attribute buttons ? For the maya attr-buttons that does not directly control any maya object attribute, or the command button that controls the visibility of other picker items with command codes, you need to write code to sync their state with maya. You could coding this script on the picker document's enter command, which will be executed whenever your mouth enter the picker view. eg. You use command button to switch a light's on/off state using its command attribute, but what if the light is turned on/off manually outside the tool?
|
![]() ![]() ![]() |