Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / how to control path percentage with python?
  RSS 2.0 ATOM  

how to control path percentage with python?
Rate this thread
 
30173
 
Permlink of this thread  
avatar
  • QuentinB
  • Posted: 20 March 2009 04:06 AM
  • Location: New York
  • Total Posts: 57
  • Joined: 07 July 2008 04:39 PM

Hello,

I’m watching the 3dquakers scripting 101 training at the moment and trying to follow along in python. I hit a brick wall when Charbel starts building the spacer tool, because in the Jscript he’s writing he sets a path constraint and path percentage of multiple objects with a for loop. I have the for loop working, but instead of the objects being spaced along the curve evenly they all end up with the same value. The python for it I believe is:

xsi.SetValue(object.kine.pathperc, 100/number of objects) #this is probably not the exact syntax, I’m not in front of my computer with xsi at the moment.

The 100/number of objects would basicly positin the objects along the curve evenly. Just like when you have multiple objects constrained to the same path and with all of them selected you type in their multiple path constraints ppg L(1,100). But with Python I do not get that result, I get a single value thats then given to all my objects.

I hope people understand what I’m asking ?_?

Quentin



Falun Dafa
A meditative practice for the mind and body
http://www.falundafa.org

Replies: 0
avatar
  • QuentinB
  • Posted: 20 March 2009 09:57 AM

ok, so a friend of mine reminded me to multiply the iterator by the subsequent values, i.e. instead of 100/count, it might be i*100/count. Maybe...........but cant try it until later, im not in front of my personal machine, /+"SCREAMS/+"



Falun Dafa
A meditative practice for the mind and body
http://www.falundafa.org

Replies: 0