Jump to content

How to script for alembic camera import in h14?


oglop

Recommended Posts

Hi I want to import .abc cache containing a maya camera  into houdini scene, but I can't seem to find the approriate hscript or hou functions. I mean I can do it manually by file --> import--> alembic scene. But How do I automate this in python script ?

there is some animation from frame 1-100 in the .abc file.

 

 

I tried to compile alembic on windows 8.1 because I want to try the SOP_AlembicIn included in the code, I got lots of error when trying to do so.

 

For geometries I know I can create a geo node, and go inside create a alembic node to import .abc file.I think convert this to hscript is pretty straightforward.  But for camera .abc file, this doesn't work, while file --> import--> alembic scene seems working, is there a way to code this camera import in python ?

or is there another way ? or someone has compiled this for windows ? Thanks.

Edited by oglop
Link to comment
Share on other sites

Hi,

 

try this:

 

import hou
node = hou.node('obj')
alembicCam = node.createNode('alembicarchive')
parameter = alembicCam.parm('fileName')
parameter.set('cameraPath')
alembicCam.parm('buildHierarchy').pressButton()
Link to comment
Share on other sites

you're probably better off creating an otl to handle the import.  there's an alembic xform node that'll read in transformation data, then you just need to query the camera dictionary using python expressions.  probably best to start with an import via the file menu and then build an otl around your result with some hooks to allow you to change the incoming abc without having to recreate nodes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...