I have an alembic file. Is it possible to export the individual frame data to OBJ files with blender script?


1 Answer 1

import os
import sys
import bpy

filepath = sys.argv[1]

# https://blender.stackexchange.com/a/220016/165060
while bpy.data.objects:
    bpy.data.objects.remove(bpy.data.objects[0], do_unlink=True)

# Loading alembic file

scene = bpy.context.scene
startFrame = scene.frame_start
endFrame = scene.frame_end

for frame in range(startFrame, endFrame + 1):
    scene.frame_current = frame
    filename = (sys.argv[1] + str(frame).zfill(4) + ".abc")
    bpy.ops.export_scene.obj(filepath=filename[:-3] + "obj")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .