Adverti horiz upsell

Detect Emitters 1.0.0 for Maya (maya script)

Helps to decipher the emitterId array

License
Button download
328 Downloads

Compatibility

  • 2009, 2008, 8.x, 7.x

Operating Systems

  • Irix
  • Linux
  • Mac
  • Windows

History

Created:02/12/2009
Last Modified:02/12/2009
File Size: 1.38 KB
Select a particle object and source/run the script..

This script is particularly useful when trying to figure out where emitters are in the emitterId attribute. The emitterId attribute is useful when emitting the same particle object out of multiple emitters but varying the per-particle attributes based on which emitter is spitting them out.

The problem with emitterId is that everytime you connect an emitter to the particles via the Dynamic Relationships editor it adds it one object higher in the array. However when you disconnect the emitter from the particles it doesn't shrink the array it just makes that number in the array empty. The next time you add another emitter or the same emitter, it will re-increment the array leaving blank spots making it hard to figure out where the emitter actually is in the emitterId attribute! (make sense?) :)

so, Using this script will return back to the script editor the full list of emitters actually connected to the particles and what their proper values in the emitterId are. Here is a sample front the script editor.

// Result: [0] emitter1 [5] emitter7 [7] emitter2 [8] emitter5 //

What this means is... emitter1's emitterId is 0, emitter7's emitterId is 5, emitter2's emitterId is 7 and emitter5's id is 8

One tip, is that if you're using multiple emitters with 1 particle object you really want to change the emission seeds under the Emission Random Stream Seeds in the particleShape attribute editor.

Seth


Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • Vitor Teixeira
    Vitor Teixeira
  • xtvjxk
    xtvjxk