I did not find something like this in the addon repository and thought it might be useful i.e. for tank track animations,etc.
Description:
The script automates the task of creating linked duplicates of an object with a follow-path-constraint and adjusting their offset values to line them up on a path.
It checks first if you have selected an object and if this object has a follow-path-constraint with a valid target curve applied to it. If this check fails you won’t be able to call the operator.
positive offsets will move objects backwards on the path - negative offsets will move objects forwards on the path
Note: Using ‘evenly spaced’ with non-cyclic splines the original object is supposed to have an offset of 0.0.
I tested it again with new stable Blender 2.69 and it work!..
I don´t know if i have do smething wrong with my script arrangments in 2.69.10, so i will try to find that!
I tried it on 2.69.10 and it does crash Blender when you increase the count (no error, Blender just disappears). I would guess the problem might be with get_constraint(). You blindly operate upon the result without checking to see if the constraint is valid. Put a check for None in there and skip the current operation and it might work…
I am still not sure how this AddOn is any different than just adding an Array Modifier followed by a Curve Modifier?
I tried it this way but it was more difficult to setup and i were’nt able to animate the result properly. The curve modifier also deforms the mesh objects.
The operator checks in it’s poll method wether get_constraint returns None. For the original object the returned value should be valid.
I am relying on dupli=obj.copy() assuming that the constraint will get copied implicitly. Afterwards i try to access the constraint by it’s name.
But blender simply crashes. I would expect an exception rather than a full crash in both cases.
EDIT: commenting #bpy.context.scene.link(dupli) in line 30 stops blender from crashing. So i guess there must be the error. Duplicates seem to be created but are of course not linked into the scene.
It is possible to link in the duplicates via console after the operator call. Conflict with undo? Don’t know yet, why this causes an error if called from within the operator.
Here is a quick fix for the bleeding edge builds. Seems to be a conflict with undo. Added another operator to link the objects into the scene. Tested it with today’s build on windows and it worked.
Pink Vertex congratulations on a great addon. I would suggest a modification which I believe will facilitate the implementation.
If the addon is displayed in the tab constraint would be more dynamic and facilitate the work
If you know length of the curve and objects selection order you have perfect (origin point) distribute to every direction you want, not only x,y or z. Only fixed position changes in Follow Path constaint.
Fex. straight line length is 10meter and you want distribute objects 75cm. So Fixed Position = 0.75/10 = 0.075.
This is a really great addon. Something Blender really needed.
Would it be possible to have an extrude tool that follows along path as well? I don’t know if there is an addon for that.
Also, maybe as a future idea, allowing the objects to to face a certain point while following the curve? And maybe restricting the rate of which they rotate so say the objects can only rotate in 10 degree increments (or something else the user sets)? It would also be useful if say, if the object is closer to the x or y or z axis that the object faces a certain way.