--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3618aa5f-00d7-44c4-813d-62d49c9e29e7%40googlegroups.com.
Okay, my bad, it seems that this command is only available in Maya 2019. Unfortunately I am using an earlier version, Maya 2018 though.any other alternatives?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5f51cc9b-7847-4c8c-9e4a-3fedbf491ec8%40googlegroups.com.
global proc myToolButton(string $parent){ string $parentLayout = `setParent -q`, $shelfButtons[] = `layout -q -childArray $parentLayout`, $autoMode = $shelfButtons[`size $shelfButtons` - 1];
// Script Job creation scriptJob -parent $autoMode -event "RecentCommandChanged" ("myToolIconChange(\"" + $autoMode + "\")");}
global proc myToolIconChange(string $shelfButton){ string $image = "myToolIconDisabled.png", $autoMode = `optionVar -q "myToolMode"`; int $myMode = 0;
if ($autoMode == 1){ $image = ("myToolIconEnabled.png"); // this will have a red bg color $myMode = 1;
}else{ $image = ("myToolIconDisabled.png"); $myMode = 0; } if(`shelfButton -q -exists $shelfButton`) // Update the button with the image we chose. catchQuiet(`shelfButton -edit -image $image $shelfButton`);}
Apologize for the long list of details.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d9d515e0-2c0e-479f-917f-ecb6cc67ff19%40googlegroups.com.