This seems to solve it. root = nuke.root() root.begin()
# your code root.end() cheers, andy On Mar 8, 2013, at 11:14 AM, Andreas Frickinger <andreasfrickin...@me.com> wrote: > Hey Colin, > > I'm having the same issue, did you or anyone else find a solution for this? > > thanks, > andy > > > > On Oct 27, 2011, at 12:19 PM, Colin Jenken <colin.jen...@gmail.com> wrote: > >> Hi all, >> Does anyone else get this when they try and load a file from the >> python panel interface that is called from a python file? >> >> RuntimeError: >> /g8/home/colinjenken/perforce/branches/nuke_dev/StereoSuite/tools/nuke/gizmos/g8_artistSubmit.gizmo: >> Missing end_group command(s) >> >> >> Here is what I call from the GetNukeScene.py file that I created: >> >> #---------------------------------------------------------------------------------------------------------------------------- >> import nuke, nukescripts >> # >> class GetNukeScene(nukescripts.PythonPanel): >> def __init__(self): >> nukescripts.PythonPanel.__init__(self, 'Get Nuke Shot', >> 'com.g83d.GetNukeShot') >> self.file_load = '' >> >> self.file_load_knob = nuke.String_Knob('file_load_knob', 'File >> Path: >> ', self.file_load) >> self.load_shot_button = nuke.PyScript_Knob('load_shot_button', >> 'Load Shot') >> >> >> # Add the knobs >> self.addKnob ( self.file_load_knob ) >> self.addKnob ( self.load_shot_button ) >> >> >> def knobChanged (self, knob): >> >> if knob == self.load_shot_button: >> nuke.scriptOpen(self.file_load_knob.value()) >> self.finishModalDialog( True ) >> >> GetNukeScene().showModal() >> >> #---------------------------------------------------------------------------------------------------------------------------- >> >> I put that in my python directory and run : >> nuke.load('GetNukeScene') >> from the Script editor in nuke. >> >> It loads my file but it seems to not finish running the script since >> it doesn't complete the 'self.finishModalDialog( True )' at the end... >> >> Does anybody know why and/or how to fix this? >> I'm using nuke 6.2v1 if that makes a difference.. >> >> Cheers, >> Colin >> _______________________________________________ >> Nuke-python mailing list >> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > _______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python