Hi all,
I tried to set "Use Outliner Color", "Hidden In Outliner" and "Outliner Color" with commands like this:
import maya.cmds as cmds
cmds.setAttr('pSphere1.useOutlinerColor', True)
cmds.setAttr('pSphere1.hiddenInOutliner', True)
cmds.setAttr('pSphere1.outlinerColor', 0.1, 0.5, 0.7, 'float3')
but it doesn't work at all. The most strange thing is I don't get any mel command feedback when toggling these options. Is this a bug ?
Solved! Go to Solution.
Solved by Kahylan. Go to Solution.
Hi!
Your commands work perfectly fine. the only problem is, that your attribute editor and outliner aren't updating, if you select and unselect your "pSphere1" the changes should show.
If you want the changes to show immediately, you need to forcefully update the Attribute editor. Sadly there isn't a command in maya.cmds that updates the Attribute Editor, but you can use python to call the MEL command:
import maya.cmds as cmds
import maya.mel as mm
cmds.setAttr('pSphere1.useOutlinerColor', True)
cmds.setAttr('pSphere1.hiddenInOutliner', True)
cmds.setAttr('pSphere1.outlinerColor', 0.1, 0.5, 0.7, 'float3')
mm.eval("updateAE pSphere1 ")
I hope it helps!
Can't find what you're looking for? Ask the community or share your knowledge.