Fantastic! thanks! JRAB
On Apr 25, 2011, at 8:09 PM, Micah Henrie wrote: > That works for me. Thanks! > > ----- Original Message ----- > From: "Ivan Busquets" <[email protected]> > To: "Nuke Python discussion" <[email protected]> > Sent: Monday, April 25, 2011 10:57:37 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Nuke-python] turning off user prompts? > > How about this? Seems to work for me if I set the relevant knobs as args to > createNode(). > > filepath = '/set/your/path/here.fbx' > c = nuke.createNode('Camera2', 'file "%s" read_from_file True' % filepath) > c['fbx_take_name'].setValue('Take01') > > > > On Mon, Apr 25, 2011 at 10:31 AM, Micah Henrie <[email protected]> wrote: > This is a nuke bug as far as I know. You can either do: > > camNode = nuke.createNode('Camera2', inpanel=False) > ...and not get the pop-up but then I am unable to set fbx_take_name > > or you can do: > > camNode = nuke.createNode('Camera2', inpanel=True) > camNode.knob('fbx_take_name').setValue('Take 001') > > ...I can set the take name but then get the annoying pop-up. If there is > some magic way to get the best of both I would love to know how as well. > > cheers, > micah > > > ----- Original Message ----- > From: "John RA Benson" <[email protected]> > To: "Nuke Python discussion" <[email protected]> > Sent: Saturday, April 23, 2011 6:02:35 PM GMT -08:00 US/Canada Pacific > Subject: [Nuke-python] turning off user prompts? > > Hey there - > > does anyone know a way to turn off user prompts when node asks for them? In > my particular instance, I'm trying to load an fbx file into a camera via > python, then set some stuff up. > > cam = nuke.nodes.Camera2() > cam.showControlPanel() > cam['file'].setValue(fbxCameraPath) > cam['fbx_node_name'].setValue('shotCamera') > > 2 issues that I'd like to handle: > > with a working fbx file, the above lines load the camera, but it requires > accepting the camera dialog "Are you sure you want to read the camera from > the file and destroy the current camera data?" It would be nice to skip that > part! > > The second issue is it seems that the camera doesn't actually get read unless > the control panel is open. Comment out the showControlPanel function and > setting the fbx_node_name fails. > > Any tricks out there to help with these issues? > thanks > JRAB > > _______________________________________________ Nuke-python mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > _______________________________________________ > Nuke-python mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > > _______________________________________________ Nuke-python mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > _______________________________________________ > Nuke-python mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________ Nuke-python mailing list [email protected] http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
