If I have lots of obj files generated from an external simulator like shot-001.obj, shot-002.obj ... shot-100.obj and the meshes don't share the same topology, how I can import these obj files into Blender to generate an animation?

Since the simulation results might be a fractured mesh or splitting/merging fluid mesh, in which the topology are changed, the scripts using shape_key don't seem to work well.

I just want to (1) import a list of simulated mesh files (.obj), (2) put a camera, some lamps, and some static objects, (4) assign some materials to them, and (4) render an animation in Blender.

Maybe needed:
After keyframing, it's probably a good idea to walk through all objects, remove all materials but the mats of the 1st model and make all other models use the same mats as the 1st (this way, you only need to change material settings once for the entire series - if this is what you want!)

for (i, file) in enumerate(obj_files): if object_name in bpy.data.objects: bpy.data.scenes['Scene'].objects.unlink(bpy.data.objects[object_name]) bpy.data.objects.remove(bpy.data.objects[object_name]) bpy.data.meshes.remove(bpy.data.meshes[mesh_name])

1) The reason I do not import all obj files at once was it spend a lot of memory for my case in which there are a bunch of files. So I do import an obj file, render, and save the result in frame-by-frame. However, even though I put the object removing scripts as you can see above, the memory blender uses is gradually increasing. What's the problem? Am I missing something to free memory for blender?

2) I cannot stop or work other tasks in blender during the scripts are running unless I force to kill the process. Is there any efficient way for this during the script is running?

1. Dunno if Blender is smart enough to clean memory without file saving action or loading homefile. It does not remove certain datablocks unless you reload the .blend, so this might cause the problem. No clue if there is a hidden operator to clean up .blend without saving/reloading...

2. Python scripts run blocking, so it's normal that Blender won't respond in the meantime. Script could be threaded, but would cause Blender to crash sooner or later.