Mel Script - Dynamics Field Nodes [API]

 

 

 

 

A particle system within Maya is composed of a number of different nodes. Primarily there is a particleShape node that is used to store a list of all the particles. Particle emitters emit new particles into the particle shape.

Dynamics fields are the nodes that change the motion of the particles within a shape. Essentially they all act upon the particles by applying a force that they generate. Any number of emitters or fields may be connected to any given particle shape.

 

 

 

 

Finding All Dynamics Fields within a Scene

All dynamics fields are derived from the common node field. Therefore we can simply list all fields irrelevant of what type they are.

 

 


		// get a list of all fields in the scene
		$fields = `ls -type "field"`;

		// loop through each field
		for( $field in $fields )
		{
			// print the name of the field node
			print( $field + " " );
			
			// print the field type
			print( `nodeType $field` + "\n" );
		}