Follow Path Array

I did not find something like this in the addon repository and thought it might be useful i.e. for tank track animations,etc.

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.

UPDATE: The current source files can be found here.

Attachments (1.36 KB)

Really nice! thank you.

Works very nicely, thank you for this addon.

Info: chrash Blender 2.69.10!

> i used it in the same way like in the tutorial video
> as i want to use the countslider it crash

I never experienced any crashes so it is difficult to find the cause of this crash. Can you give more information? Which option did you select?

EDIT: Just downloaded a bleeding edge release and indeed it crashes. However everything should be fine if you use the current stable release.

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?

But it is still fun to code stuff.

…i include your Script into Simple Aligner…

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 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.

@mkbreuer Ok

Thank you, nice script.
works fine in 2.69 but crashes my latest Version:

Blender 2.69 (sub 9), Commit date: 2014-01-20 20:12, Hash fd0b104

Win 8, X64

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.

Attachments (1.53 KB)

…THX!!! run well…

Thank you. Much slower than before but works.

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

That should be as easy as

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.

  1. Object Fixed Position = 0
  2. Object Fixed Position = 0.075
  3. Object Fixed Position = 0.15
    and so on.

Is there any way to make single user objects from the Constraint Objects?

Select Linked > Object Data
Apply > Visual transform
Constraints > Clear object constraints
Make Single User > Object & data

…i was close, but now i have the correct order of events.

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.

Anyway, thanks for making this!