I have a bunch of stl files that I want to import into Blender. I wanted to animate them, for example one stl file in each frame so that overall it turns into an animation. I was wondering what the best way to do this is. I have a large number of stl files, so I'd prefer not to manually do it. Is there a script that exists to allow this?
-
2$\begingroup$ This question appears to be off-topic because it is a feature request. $\endgroup$– someonewithpcCommented Nov 5, 2014 at 22:11
-
$\begingroup$ @someonewithpc I don't quite agree. It seems to me the OP is asking if there is a way to do this, not for a way to do this. $\endgroup$– gandalf3Commented Nov 6, 2014 at 1:48
-
$\begingroup$ @gandalf3 isn't a feature which supports this being worked on? I think I heard about something like this. $\endgroup$– someonewithpcCommented Nov 6, 2014 at 8:50
-
$\begingroup$ @someonewithpc Yes, see this. Though that doesn't make this question a feature request per se.. $\endgroup$– gandalf3Commented Nov 6, 2014 at 8:53
-
$\begingroup$ @someonewithpc I agree with gandalf3, this is asking it there is a way to do this, not that a feature be added. Whether or not the feature is in the making otherwise has no bearing. $\endgroup$– PGmathCommented Nov 9, 2014 at 19:19
1 Answer
I do not have a straight out easy solution, but i can think of a 2 ways of doing this.
Do all the STL files have the same number of Vertices and faces?
If the number of Vertices and Faces dont change, I would suggest a python script.
first have a look at the AnimAll addon that comes with blender. you just have to enable it in your user preferences.
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Animation/AnimAll
write a script that does the following:
imports the first STL frame.
call:
bpy.ops.anim.insert_keyframe_animall()
then for each frame after that:
- import the STL File for that frame.
- change the positions of each vertex in the main object to that in the frame imported.
- call:
bpy.ops.anim.insert_keyframe_animall()
- delete the STL frame imported.
That way all your frames will be in the same object, and show up as keyframes in the animation editors.
This assumes that the STL files have kept the vertices order the same, otherwise this method will not work and your imported animation will just jump all over the place.
There is the MeshFoot addon which will import a sequence of OBJ files, however it does not work with STL files, so you would have to modify the code to get it working with STL files.