Marcus Ottosson
2017-11-16 06:34:29 UTC
Hi all,
Iâm looking to implement this.
node = cmds.createNode("myCustomNode")
cmds.setAttr(node+ ".iconName", "polyMeasureUV.png")
And have the icon appear wherever this node is drawn, such as the Outliner
and Node Editor. Ideally polyMeasureUV.png is one of Mayaâs own internal
icons, the ones you can browse via the Shelf Editor.
I know about the XBMLANGPATH but would like something that A) doesnât
require a restart or meddling with the environment in order to work (if
thatâs possible still using this approach, do let me know) and B) uses
Mayaâs own icon library such that I wonât have to ship custom images.
Iâm chasing this, because I noticed the dagContainer have a feature like it
and works quite well.
from maya import cmds
container = cmds.createNode("dagContainer", name="LegLeft03_LIM")
cmds.setAttr(container + ".iconName", "polyMeasureUV.png")
[image: Inline images 1]
Any ideas?
â
Iâm looking to implement this.
node = cmds.createNode("myCustomNode")
cmds.setAttr(node+ ".iconName", "polyMeasureUV.png")
And have the icon appear wherever this node is drawn, such as the Outliner
and Node Editor. Ideally polyMeasureUV.png is one of Mayaâs own internal
icons, the ones you can browse via the Shelf Editor.
I know about the XBMLANGPATH but would like something that A) doesnât
require a restart or meddling with the environment in order to work (if
thatâs possible still using this approach, do let me know) and B) uses
Mayaâs own icon library such that I wonât have to ship custom images.
Iâm chasing this, because I noticed the dagContainer have a feature like it
and works quite well.
from maya import cmds
container = cmds.createNode("dagContainer", name="LegLeft03_LIM")
cmds.setAttr(container + ".iconName", "polyMeasureUV.png")
[image: Inline images 1]
Any ideas?
â
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCf7aAUKAyAFZTnoS6G%2Ba%3DzEZDQuzp60Ct6KBi3YJ0o4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCf7aAUKAyAFZTnoS6G%2Ba%3DzEZDQuzp60Ct6KBi3YJ0o4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.