0
$\begingroup$

I am not much of a scripter, so sorry if this is a simple question... But I would like to create a script that automatically imports and links an alembic file cache to an existing set of meshes in my scene. My blender scene contains a set of a few hundred objects that all have shading, and my alembic file contains these exact same meshes, with the same names, but with animation data. I can do this manually, but with the amount of objects I have, it would take hours to do this by hand!

These would be the manual steps, I need to repeat this over hundreds of objects:

  1. Import a cache file into my scene simply as a data block, this line seems to work: bpy.ops.cachefile.open(filepath="C:\...\all_meshes.abc")
  2. pick a shaded objects in my scene
  3. add a transform cache constraint
  4. link that constraint to the data block called all_meshes.abc
  5. link the object path to the correct mesh.

In this case, my alembic file contains the exact same mesh names as those that are shaded in my blender scene, so it might be a case of storing the mesh name into a variable and using that to identify what alembic mesh to link it to?

Any help would be greatly appreciated.

Thanks

Matt

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.