PDA

View Full Version : scripting the GoalPP weight of a specific particle


Ryokukitsune
06-29-2008, 09:18 PM
Hi!



I’m trying to add a little more animation support to a dynamic spline IK tail



What I’m trying to do is give the animator the ability to adjust the weight of the goalPP of some of the particles by a keyable slider though I don’t know how to write an expression to reference which specific particles to use. I know which ones they are however I can’t find any information on how to script it for something this simple.



What I need to know is what would be the expression for particle (order) 5 of particle1shape and how would assign a value to its goalPP.



A simple expression say

particle1shape.goalPP[5] = 0

(easiest test I can think of is to completely turn it off) doesn’t seem to work… I know I’m doing it wrong but that just an example of what I’ve tried =/



any thoughts?

Ryokukitsune
06-30-2008, 02:14 AM
I actually figured it out on my own after posting this question in several places and beating my head against the question for about a week.

so instead of just deleting the post I'll leave it up and answer it in case someone else would like the information.

to select an individual particle its not as simple as other object expressions in that you cant directly reference a specific particle in one line. it is slightly more complicated than that.

in the case of isolating a particle you need to single out the particle and attach it in a statement such as the fallowing.

if (particle1Shape.particleId == #){ //# being your desired particle
particle1Shape.goalPP = pCube1.goalPPweight;
}


hope this help someone in the future or maybe i'll fumble a crossed it in the future when i forget about it =P

CGTalk Moderation
06-30-2008, 02:14 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.