mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Added alembic camera instance
This commit is contained in:
parent
ad0f846a02
commit
a3a32950d1
1 changed files with 36 additions and 0 deletions
36
colorbleed/plugins/houdini/create/create_alembic_camera.py
Normal file
36
colorbleed/plugins/houdini/create/create_alembic_camera.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
from collections import OrderedDict
|
||||
|
||||
from avalon import houdini
|
||||
|
||||
|
||||
class CreateAlembicCamera(houdini.Creator):
|
||||
|
||||
name = "camera"
|
||||
label = "Camera (Abc)"
|
||||
family = "colorbleed.camera"
|
||||
icon = "camera"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CreateAlembicCamera, self).__init__(*args, **kwargs)
|
||||
|
||||
# create an ordered dict with the existing data first
|
||||
data = OrderedDict(**self.data)
|
||||
|
||||
# Set node type to create for output
|
||||
data["node_type"] = "alembic"
|
||||
|
||||
self.data = data
|
||||
|
||||
def process(self):
|
||||
instance = super(CreateAlembicCamera, self).process()
|
||||
|
||||
parms = {"use_sop_path": True,
|
||||
"build_from_path": True,
|
||||
"path_attrib": "path",
|
||||
"filename": "$HIP/%s.abc" % self.name}
|
||||
|
||||
if self.nodes:
|
||||
node = self.nodes[0]
|
||||
parms.update({"sop_path": node.path()})
|
||||
|
||||
instance.setParms(parms)
|
||||
Loading…
Add table
Add a link
Reference in a new issue