Apologies for piggybacking on your thread, but it relates somewhat to something I’ve been working on.
I’m curious if there’s a way to evaluate a standard Nuke expression (not a TCL script) from a string or char* and return its numeric result, without calling through Python to nuke.expression or something similar. Thanks, -Nathan From: Steve Booth Sent: Thursday, July 05, 2012 3:15 PM To: 'Nuke plug-in development discussion' Subject: RE: [Nuke-dev] Obtaining the view count You know.... I tried almost exactly that, but I thought ‘views’ was a list and not a function. ‘len(nuke.views)’ returned an invalid parameter error in the Script Editor. ‘len(nuke.views())’ works like a champ, tho. Thanks for your help, Ivan! Steve From: nuke-dev-boun...@support.thefoundry.co.uk [mailto:nuke-dev-boun...@support.thefoundry.co.uk] On Behalf Of Ivan Busquets Sent: Thursday, July 05, 2012 12:22 PM To: nuke-dev@support.thefoundry.co.uk Subject: Re: [Nuke-dev] Obtaining the view count Hi Steve, I would use python as you said. This should work, I think: const char* PyGetViews = "len(nuke.views())"; script_command(PyGetViews,true,true); string views = script_result(true); script_unlock(); // to remove the lock started by script_command Cheers, Ivan On Thu, Jul 5, 2012 at 12:07 PM, Steve3D <nuke-dev-re...@thefoundry.co.uk> wrote: I've been digging through the current documentation this morning, and I can't seem to locate this. I need to know how many views are currently defined in the Project settings. How would I get that from inside a plugin? I'm thinking it should be accessible by executing some Python (using perhaps 'nuke.views' ?) But it's not at all clear what the correct syntax is. Steve _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev -------------------------------------------------------------------------------- _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev