Call icon from exteranal Folder

15 views
Skip to first unread message

AMAL ARJUN

unread,
Jun 26, 2018, 4:35:54 AM6/26/18
to Python Programming for Autodesk Maya
Hi, I want to call an icon from external folder. How can I do that in Maya with Python


cmds.nodeIconButton( style='iconAndTextHorizontal',image1='sphere.png', command=createsphere, label='Sphere', fn="boldLabelFont")


so, instead of 'sphere.png' how can I call an icon from external folder. 

Marcus Ottosson

unread,
Jun 26, 2018, 4:49:57 AM6/26/18
to python_in...@googlegroups.com
What have you tried so far? What did Google say? What documentation have you found that didn't help?

--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

AMAL ARJUN

unread,
Jun 26, 2018, 4:55:31 AM6/26/18
to Python Programming for Autodesk Maya
I'm so sorry. Actually, I can call only icons from the default location (maya/2016/prefs/icons). But what I want is to call from a different location. I referred google on this. Couldn't find a solution to this. So sorry if this is a stupid question. I'm just learning python.

Panupat Chongstitwattana

unread,
Jun 26, 2018, 5:10:32 AM6/26/18
to Python Programming for Autodesk Maya
I tested and full path works.

W = cmds.window()
cmds
.columnLayout(adjustableColumn=True)
cmds
.nodeIconButton( style='iconAndTextHorizontal',image1='C:/Users/joey/documents/images/mystery2.png', command='createsphere', label='Sphere', fn="boldLabelFont")
cmds
.showWindow(W)


Auto Generated Inline Image 1

AMAL ARJUN

unread,
Jun 26, 2018, 6:16:02 AM6/26/18
to Python Programming for Autodesk Maya
Waoo.. Thanks alot . Really thanks 
Reply all
Reply to author
Forward
0 new messages