fix(nuke): nukes bug workaround animation keys

This commit is contained in:
Jakub Jezek 2020-10-05 11:12:40 +02:00
parent d6c6f495cd
commit e435b96b1f
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3

View file

@ -50,12 +50,15 @@ class AlembicCameraLoader(api.Loader):
inpanel=False
)
camera_node.forceValidate()
# camera_node["read_from_file"].setValue(True)
# camera_node["file"].setValue(file)
camera_node["frame_rate"].setValue(float(fps))
camera_node["tile_color"].setValue(int("0x3469ffff", 16))
camera_node["reload"].execute()
# workaround because nuke's bug is not adding animation keys properly
nuke.nodeCopy("%clipboard%")
camera_node_name = camera_node["name"].value()
nuke.delete(camera_node)
nuke.nodePaste("%clipboard%")
camera_node = nuke.toNode(camera_node_name)
return containerise(
node=camera_node,