![]() ![]() ![]() |
▪For Maya Attribute Button & Sliders: For attr-button that controls a Maya attribute, or sliders that control Maya attributes, you don't need to write code to sync their values displayed with Maya. They will auto-sync with Maya most of the time. There is a situation where the picker does not sync with your Maya scene: When the Maya nodes are created after you loaded the picker, or the reference is unloaded and loaded back after the 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 do not directly control any Maya 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 code this script on the picker document's enter command, which will be executed whenever your mouth enters the picker view. eg. You use the 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? The answer is in the edit tool, right click on the picker view, select "Edit picker load & Enter Command..", then write code in its enter command tab to get & update the state of command button.
|
![]() ![]() ![]() |