The nukescript module is a bit of a mess, if you look at
nuke_dir/plugins/nukescripts/__init__.py, it contains
if nuke.GUI:
from panels import *
..meaning the shortcut of nukescripts.PythonPanel doesn't exist in CLI mode.
The PythonPanel code actually lives in nukescripts.panels, so just
import that directly, e.g:
import nukescripts.panels
class Thing(nukescripts.panels.PythonPanel): pass
On 08/05/13 17:31, Howard Jones wrote:
Hi
How do you import nukescripts into a module?
I'm using
import nukescripts
Which is fine in the GUI. But I get a nukescripts.PythonPanel error when i run
nuke in the bg. (Excuse any typos there - it is correct in the python)
It's occurred to me that I may have imported it incorrectly but in the GUI it's
already loaded so masking the error. If I am doing it right then there's a bug
somewhere.
Thanks.
Howard_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python