PDA

View Full Version : Maya API (particles)


jonathan161
07-10-2003, 07:47 PM
I am writing my first maya plugin, i dont know if i am being stupid or anything but i dont seem to be able to find any classes in the maya API that edit particle attributes.
Basically i want to be able to edit position and velocity attributes of a particleShape from the api..???

Any help would be most appriciated :)

jonathan

mark_wilkins
07-10-2003, 09:47 PM
There are a number of array attributes on particle objects for storing per-particle information. You can make a node that connects up to these if you want to filter or alter or override their inputs from, say, the dynamics engine. Look at the Node and Attribute Reference info on the particle node type.

Also, rather than completely bypassing dynamics, consider whether you can implement what you're doing as a custom field. Fields calculate a force per particle, which the dynamics engine uses in conjunction with the particle's mass to determine its acceleration. The dynamics engine really seems to be built to prefer outside inputs to come in the form of acceleration rather than direct alterations of velocity or position, and if that's consistent with what you're doing, then having a custom field type will make the interface more consistent with the rest of Maya and give you other nice features (like attenuation) for free.

-- Mark

CGTalk Moderation
01-15-2006, 02:00 PM
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.