View Full Version : Caching nParticles manually in Python

03 March 2011, 10:04 AM
Hi. I'm looking for a way to code the following loop in Python:

(Assuming we're starting with an existing nParticle object called "pointCloud", starting at frame 0...)

1. Cache particle positions,
2. Move to next frame,
3. Change position of each particle,
4. Loop steps 1-3 until we reach last frame in time slider.

I've been trying it with the following commands:

1. dynCache() #Doesn't seem to be working! Is this only for regular particles, not nParticles? There's very little information on this command!

2. currentTime(frame_number) #Works fine.

3. nParticle(e=1, at = 'position', vv = changedPos, order = point_order) #I have this step in a loop to go through all particles. Works fine.

I've also looked into the dynExport() command for step 1, but it caches all frames at once.

Please help!

CGTalk Moderation
03 March 2011, 10:04 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.