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)



On Tuesday, June 26, 2018 at 3:55:31 PM UTC+7, AMAL ARJUN wrote:
>
> 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.
>
> On Tuesday, June 26, 2018 at 2:19:57 PM UTC+5:30, Marcus Ottosson wrote:
>>
>> What have you tried so far? What did Google say? What documentation have 
>> you found that didn't help?
>>
>> On 26 June 2018 at 09:35, AMAL ARJUN <amala...@gmail.com> wrote:
>>
>>> 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+unsubscr...@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
>>>  
>>> <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+unsubscr...@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.

Reply via email to