Im checking if the timeSliderBar is gray, if it is, do script A and turn it blue...but if its blue, then do script B and color it gray:
if (colorMan.getColor #timeSliderBg == [0.2, 0.2, 0.2])then
(
actionMan.executeAction 1937596344 "8" -- dRaster: Maya Style Navigation (Toggle)
macros.run "Tools" "SmartScale"
macros.run "DaveTools" "DaveTools_SubObjectModeToggle"
colorMan.setColor #timeSliderBg[0.0, 0.0, 0.6]
colorMan.repaintUI #repaintTimeBar
)
else if (colorMan.getColor #timeSliderBg == [0.0, 0.0, 0.6])then
(
actionMan.executeAction 1937596344 "8" -- dRaster: Maya Style Navigation (Toggle)
macros.run "Tools" "SmartScale"
macros.run "DaveTools" "DaveTools_SubObjectModeToggle"
colorMan.setColor #timeSliderBg[0.2, 0.2, 0.2]
colorMan.repaintUI #repaintTimeBar
)
miauu · 2011-09-15