Import fbx camera
importFbxCamera.py
Import fbx camera script will add a camera node and import the camera data from the fbx file based on selected "ReadGeo" node.
Usually we import our objects into nuke as a .fbx file. After importing the .fbx file will do the same thing for import the camera from the same file. To do that go to toolbar-->3D-->Camera... check the "read from the file" and then import the .fbx file by clicking file browser.
To get reduce the above timing. I created this small "importFbxCamera" python script.
Import your object files by "ReadGeo" node in nuke. Select the "ReadGeo" node and run this script.
It will automatically create a "camera" node and import the camera data from the .fbx file and create a backdrop with shot name.
It will automatically create a "camera" node and import the camera data from the .fbx file and create a backdrop with shot name.
If you have not selected any nodes this script will show a message...
Download: https://skydrive.live.com/redir?resid=776F8351D9892B6A!267
Nukepedia: http://www.nukepedia.com/gizmos/importfbxcamera/
Nukepedia: http://www.nukepedia.com/gizmos/importfbxcamera/
importFbxCamera.py:
import nukescripts
def importFbxCamera():
a = None
try:
a = nuke.selectedNode()
except ValueError: # no node selected
pass
if a is not None:
path =a.knob('file').value()
s = path.split('/')[-1]
x = s.split('.')[-0]
name = x + ('_Camera')
d = a.xpos() + 250
c = nuke.createNode("Camera2")
c.setName(name)
c['xpos'].setValue(d)
c['read_from_file'].setValue(1)
c['file'].setValue(path)
b = nukescripts.autoBackdrop().setName(name)
else:
nuke.message('select ReadGeo node to import camera')
add these lines into your menu.py
n = nuke.toolbar('Nodes')
n.addCommand('Test/importFbxCamera', 'importFbxCamera.importFbxCamera()')
emigcom_bu-2001 Ben Follette https://wakelet.com/wake/IiC5y8HjehqVc4k8Ld4Hr
ReplyDeletefraslandlopa
AtheoplagQstelha Cyndi Peacock program
ReplyDeletekizrisoper