Discussion:
[Maya-Python] Call icon from exteranal Folder
AMAL ARJUN
2018-06-26 08:35:54 UTC
Permalink
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.
--
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/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marcus Ottosson
2018-06-26 08:49:53 UTC
Permalink
What have you tried so far? What did Google say? What documentation have
you found that didn't help?
Post by AMAL ARJUN
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.
--
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
To view this discussion on the web visit https://groups.google.com/d/
msgid/python_inside_maya/7612955a-9753-42f4-836e-
7c08dfa48741%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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/CAFRtmOCA-Gi3RVCORWhCPX_U_-DJpdiBRgsZhZzj6feRhswm8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
AMAL ARJUN
2018-06-26 08:55:31 UTC
Permalink
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.
Post by Marcus Ottosson
What have you tried so far? What did Google say? What documentation have
you found that didn't help?
Post by AMAL ARJUN
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.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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/d1d65942-b36a-4461-9f97-d8c5c0c6e0a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Panupat Chongstitwattana
2018-06-26 09:10:32 UTC
Permalink
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)
Post by AMAL ARJUN
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.
Post by Marcus Ottosson
What have you tried so far? What did Google say? What documentation have
you found that didn't help?
Post by AMAL ARJUN
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.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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/f0689475-e37d-4fae-af08-3fbda2374575%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
AMAL ARJUN
2018-06-26 10:16:02 UTC
Permalink
Waoo.. Thanks alot . Really thanks

On Tuesday, June 26, 2018 at 2:40:32 PM UTC+5:30, Panupat Chongstitwattana
Post by Panupat Chongstitwattana
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)
Post by AMAL ARJUN
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.
Post by Marcus Ottosson
What have you tried so far? What did Google say? What documentation have
you found that didn't help?
Post by AMAL ARJUN
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.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/7612955a-9753-42f4-836e-7c08dfa48741%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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/115c8a35-ad80-4803-bf97-5e40d1c6c3b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...