romeu

11-03-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)

http://romeu5000.com.sapo.pt/PainFXGeo.jpg

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.

Thanks

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)

http://romeu5000.com.sapo.pt/PainFXGeo.jpg

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.

Thanks