Correct, I verified that I actually grabbed the right menu :
menu = nodes.menu('Image')
# Result: menu
# Result: <Menu object at 0x53f9b40>
[i.name() for i in menu.items()]
# Result: ['Read', 'Write', 'UDIM import', 'Constant', 'CheckerBoard',
'ColorBars', 'ColorWheel', 'CurveTool', 'Viewer']
So, it appears I'm getting the right thing as those are the menu items under
the Image nodes menu.
I had thought about blowing it away and recreating it but wanted to see if
there was better way before heading down that path.
Thanks!
jake
----- Original Message -----
| From: "Charles Taylor" <[email protected]>
| To: [email protected]
| Sent: Tuesday, March 24, 2015 12:48:28 PM
| Subject: Re: [Nuke-python] Changing Nodes Icons
| Is your nodes.menu('Image') command returning what you think it is?
| It's not impossible that you're just getting a new menu object
| that's unrelated to the actual in-play menu object.
| You can also go the sledgehammer approach and remove the menu and add
| back a new menu with your custom icon.
| ./c.t
| On 03/24/2015 12:34 PM, Jake Richards wrote:
| | Hello:
|
| | I want to change the icon for a menu under the Nodes menu, but Nuke
| | doesn't seem to want to update it using the setIcon command.
|
| | Here's what I've tried:
|
| | nodes=nuke.menu('Nodes')
|
| | menu = nodes.menu('Image')
|
| | menu.setIcon('/my/new/icon.png')
|
| | menu.icon()
|
| | # Result: '/my/new/icon.png'
|
| | Yet, the image is still the same. I've tried setting the visibility
| | true/false, enable/disabling it, removing the panel from the gui
| | and
| | adding it back, calling nodes.updateMenuItems()... just about
| | anything I could think of to refresh that icon but it still is the
| | old one. Is there some other way to set that icon that I'm just not
| | grasping? This is in nuke 8.0v6 and 9.0v4 in linux.
|
| | Thanks!
|
| | Jake
|
| | --
|
| | --
|
| | --------------------------------------------
|
| | [email protected] 203-992-6319
|
| | LTD Blue Sky Studios
|
| | --------------------------------------------
|
| | _______________________________________________
|
| | Nuke-python mailing list [email protected] ,
| | http://forums.thefoundry.co.uk/
| | http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
|
| _______________________________________________
| Nuke-python mailing list
| [email protected], http://forums.thefoundry.co.uk/
| http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python