View Full Version : "multiple objects" with "multiple motion paths"

11 November 2012, 01:02 AM
Hi, i was trying to write a small script to atach multiple objects to multiple motion path, but unfortunatly my mel knowlege is prety low.
the use for it is realy basic, it is simply to add any geometry to a paint effect curve and be able to use is behaviour dynamics. (using the convert paint effects to curves, we get a nice base for instancing and orienting new geometry)

maybe someone "fluent" in mel can help me write it.

what i was triyng was the folowing.

When converting a paint effects to curves, you get a X number of curves.
Creating a equivalent number of objects, we can load two arrays and match 1object to one curve, and, this is an extra, extracting the curve lenth and scale the object acordingly.

So the script would look like this:

From selection(equivalent number of curves and objects) : create two arrays, one with curves and one with meches.
For each object mesh atach it (using atach to motion path) to a curve
($obj[0] to $curve[0] and so on)
Then the extra, for each curve lengh : scale the object acordingly.
There is a command to print the lengh of a curve:"arclen;" i don't know if it can be used in a loop.

I hope i made sense and someone can help me bring this to a working script.


11 November 2012, 02:53 AM
You can create a curveInfo node to get the arcLength of your curves. Create the node before you enter the loop, then inside the loop you can connect each curve to the inputCurve attribute, then get the value of the arcLength attribute. And delete the node once you are done.


CGTalk Moderation
11 November 2012, 02:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.