oglop Posted August 17, 2015 Share Posted August 17, 2015 (edited) 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 August 17, 2015 by oglop Quote Link to comment Share on other sites More sharing options...
pax Posted August 17, 2015 Share Posted August 17, 2015 Hi, try this: import hou node = hou.node('obj') alembicCam = node.createNode('alembicarchive') parameter = alembicCam.parm('fileName') parameter.set('cameraPath') alembicCam.parm('buildHierarchy').pressButton() Quote Link to comment Share on other sites More sharing options...
fathom Posted August 17, 2015 Share Posted August 17, 2015 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. Quote Link to comment Share on other sites More sharing options...
anim Posted August 17, 2015 Share Posted August 17, 2015 you can as well have a look at the scripts within AlembicArchive Object (Type Properties.../Script tab) to get an idea how you can get transforms, camera info, etc from alembic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.