c = nuke.createNode('Camera2', 'file {/path/to/some/file.fbx} read_from_file
True', inpanel=False)
c.forceValidate()
fbxNodes = c['fbx_node_name'].values()
Note that if you create the node with inpanel=False (as shown above), the
FBX node list will not be updated properly unless you call .forceValidate()
on the node or use some other method to trigger a refresh. Alternatively, if
you create the node without inpanel=False, the list will update on creation.
-Nathan
-----Original Message-----
From: Vincent Langer
Sent: Tuesday, June 26, 2012 7:24 AM
To: [email protected]
Subject: [Nuke-python] How to handle choise Values/ Camera from file
Hi there,
i am trying to do a little auto stereoCam import script from one fbx
file that simple finds the left and the right camera and sets a basic
3dScene.
in the camera properties under the file tab
the value that i get from the choise variable ( ['fbx_node_name'] )is
a string and looks like this:
'{0} "Producer Perspective" "Producer Top" "Producer Bottom" "Producer
Front" "Producer Back" "Producer Right" "Producer Left"
StereoCamera_Left StereoCamera_Right'
is there an easy way to convert the enumeration of cameras to a list?
AND the second MORE important problem:
when i use nuke.nodes.Camera2() to create the camera and set the
variables i can not access the ['fbx_node_name'] value.
and when i create camera with nuke.createNode("Camera2")
and set
cam['read_from_file'].setValue(True)
cam['file'].setValue(filepath)
A window pops up: "Are you sure you want to read the camera from the
file and destroy the current camera data? OK / Cancel"
would be awesome if someone could tell me how to update the camera
values with nuke.nodes.Camera2() or make the
nuke.createNode("Camera2") camera ignore the poping window.
cheers,
vincent
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python