Re: [Maya-Python] Custom Maya node, with iconName like dagContainer

2018-10-11 Thread David Lai
Indeed some nodes’ icon get preserved ! Like time1 lambert1 shaderGlow1, also their UUID didn’t change, too. ( another *Maya Fun Fact* I guess ) install a callback for scene-open I was going to do this. It’s really a bit unfortunate that won’t survive scene-new/open, but since my original goal

Re: [Maya-Python] Custom Maya node, with iconName like dagContainer

2018-10-11 Thread Marcus Ottosson
Thanks David, that’s a great find. :) from maya import cmds, OpenMaya as om node = cmds.createNode("transform") sel = om.MSelectionList() mobj = om.MObject() om.MGlobal.getActiveSelectionList(sel) sel.getDependNode(0, mobj) fn = om.MFnDependencyNode(mobj) fn.setIcon("polyTorus.png") Since then,