My structure has a form...
menu.py
...
m.addCommand("test", "nukescripts.testShow()")
...
----------
__init__.py
...
from testfile import *
...
----------
testfile.py
...
----------
class abstractDialog(nukescripts.PythonPanel)
...
def __init__(self):
...
nukescripts.PythonPanel.__init__(self, "", "", False)
class serverDialog(abstractDialog)
...
def __init__(self):
nukescripts.PythonPanel.__init__(self, "", "", False)
class serverDialogMain(abstractDialog)
...
def __init__(self, param)
...
abstractDialog.__init__()
...
self._clientsListAdd = nuke.PyScript_Knob("...", "...",
"serverDialog().showModalDialog()")
self._clientsListAdd.clearFlag(nuke.STARTLINE)
self.addKnob(self._clientsListAdd)
def run(self):
return
def testShow():
try
e = serverDialogMain(nuke.root)
if (e.showModalDialog()==True)
e.run()
Sounds like you're missing an import statement, or you're not calling
the panel with a fully qualified name. Where are you defining your
dialog class? Directly in your menu.py, or in a separate file/module?
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python