Not sure if this is right, but it works on a python button from initial testing.
r = nuke.root() x = nuke.thisNode() r.begin() nuke.connectViewer(0,x) -- Nick > On May 16, 2014, at 12:56 PM, Nathan Rusch <[email protected]> wrote: > > Off the top of my head: > > with nuke.thisParent(): > nuke.connectViewer(0, nuke.thisNode()) > > > -Nathan > > > From: HSK > Sent: Friday, May 16, 2014 7:26 AM > To: Nuke user discussion > Subject: [Nuke-users] trying to make a Python Script button that selects the > group node itself and views it....not working > > Hi guys, > > I'm trying to make a python script button that allows me to just click a > button in the properties window to view it...rather than looking for it in > the node graph. > It ends up creating a new viewer node inside my group node, and doesn't > connect it to anything. > > > > I'm using Nuke 7.0 v4 Linux (Scientific) > > Here is the script as follows (pretty basic) > #============================================= > lgt2_ctrl = nuke.thisNode() > lgt2_ctrl.setSelected(True) > > # this is where it screws up... > nukescripts.connect_selected_to_viewer(0) > > > Any thoughts? > > Thanks > > Steve > _______________________________________________ > Nuke-users mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users > _______________________________________________ > Nuke-users mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________ Nuke-users mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
