IconPanel v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
show the default icons along with the required syntax for use in labels
Requirements:
6.0, 6.1, 6.2 or later
Linux, Mac, Windows
23 May 2011
428

v1.1 added the missing imports


This is a little panel that shows Nuke's default icons and the syntax required to use them in custom labels for your own scripted UIs.

At the moment the used icons are hard coded which is rather ugly but works for now.
Put this into your menu.py and you will find the "Universal Icons" panel in the panel menu.
1
2
3
4
5
6
7
8
9
10
import IconPanel
 
def addIconPanel():
global iconPanel
iconPanel = IconPanel.IconPanel()
return iconPanel.addToPane()
 
paneMenu = nuke.menu( 'Pane' )
paneMenu.addCommand( 'Universal Icons', addIconPanel )
nukescripts.registerPanel('com.ohufx.iconPanel', addIconPanel)

 


 

iconPanel_01

iconPanel_01

Please login in order to download these files.

Comments   

 
# Dan Rosen 2010-10-08 17:15
Hi Frank,

If I install this python including the menu code I get an error that 'paneMenu' is not defined. I can easily fix that by making paneMenu = nuke.menu('Pane '). However, I then get the following error message that I have not been able to figure out. Can you shed some light on this for me?

Traceback (most recent call last):
File "/EEP/Home/dros en/.nuke/menu.p y", line 6, in addIconPanel
iconPanel = OhuPanels.IconPanel()
NameError: global name 'OhuPanels' is not defined
 
 
# Frank Rueter 2010-10-08 22:53
Sorry, I always forget to change this. It should be "iconPanel = IconPanel.IconP anel()" not "iconPanel = OhuPanel.IconPanel()"
And you need to import IconPanel first.
I have updated the description now. Thanks for letting me know.
 
 
# Victor Perez 2011-05-23 11:57
Thanks Frank! Very usefull
 
 
# Victor Perez 2011-05-23 12:31
Hi Frank,

I've installed this but it return me an error:

Traceback (most recent call last):
File "/Users/victorp erez/.nuke/menu .py", line 124, in addIconPanel
iconPanel = IconPanel.IconP anel()
File "/Users/victorp erez/.nuke/pyth on/IconPanel.py ", line 20, in __init__
tab = nuke.Tab_Knob( str(index), str(index) )
NameError: global name 'nuke' is not defined
Traceback (most recent call last):
File "/Users/victorp erez/.nuke/menu .py", line 124, in addIconPanel
iconPanel = IconPanel.IconP anel()
File "/Users/victorp erez/.nuke/pyth on/IconPanel.py ", line 20, in __init__
tab = nuke.Tab_Knob( str(index), str(index) )
NameError: global name 'nuke' is not defined

Any idea why this?

Thanks!
 
 
# Deke Kincaid 2011-05-23 12:47
Victor:
nukescripts.reg isterPanel('com .ohufx.iconPane l', addIconPanel) should have a capital "I" in "IconPanel".
 
 
# Victor Perez 2011-05-23 15:53
Thanks mate,

In my case I imported the 'nuke' and 'os' modules within 'IconPanel.py' to make it work:

import nuke
import os

Now it's working fine... and it's very nice ;-)

Thanks again
 
 
# Frank Rueter 2011-05-23 21:43
oops. I'm dreadful at forgetting to include the imports. I have fixed it and uploaded the update.
the "i" in the register command shouldn't matter as it's just an arbitrary name that you choose to register the particular function (unless I'm mistaken).

Thanks for pointing this out to me!
 
 
# Ahad Mohebbi 2011-05-24 00:38
Thanks for your useful py
 

You have no rights to post comments

We have 2370 guests and 42 members online