Display Script Operator

Path

 

Particle View > Click Display Script in an event or add a Display Script operator to the particle system and then select it.

 

The Display Script operator is a diagnostic tool that lets you display data associated with each particle in the viewports. For each occurrence of the operator in an event, you can show the particle ID, a label that you provide, and a single datum: float, integer, or vector. The displayed data is generated by a Script operator above Display Script in the event.

 

Should you need to display multiple, different data for each particle (for example, speed and distance from an object), you can use the operator several times in an event. You can specify, in three dimensions, the screen offset of the displayed data from the particle. And you can choose whether to display data for all particles or certain particles.

 

NOTE: The Display Script operator is not a substitute for the Display operator. Use it in addition to a Display operator in the event.

 

 

Interface

 

 

 

Show Particle IDs - When on, each particle's unique index number is visible in the viewports. Particles are numbered in the order of their birth, starting with 1 for the first particle born.

 

[color swatch] - Shows the color used to display the data. The software chooses a different color at random for each Display Script operator added to the system. To change the color, click the color swatch and use the Color Selector dialog to choose a new color.

Note: If the emitter is selected, the data is displayed in white.

 

Add Prefix - When on, displays the text from the edit box to the right of the check box to the left of the data in the viewports.

To specify the prefix text, click in the box to the right of Add Prefix and enter the text from the keyboard. It's not necessary to append the text with a space; the operator automatically offsets the prefix from the data.

 

Show Script Data - Choose the type of script data to show in the viewports. The available choices are: Float, Integer, Vector X, Vector Y, Vector Z, and Vector.

The Display Script operator gets the displayed data from a Script operator above it in the event. The script associated with the Script operator should assign the value to be displayed to an appropriate variable. For example, if a Display Script operator with Show Script Data is set to Float, and a Script operator above it contains the following assignment (please note that this is not a complete script):

 

pCont.particleFloat = length(pCont.particleSpeed)*4800

 

then the Display Script operator will show the particle speed in units per second. If an event contains multiple Script operators containing pertinent assignments above a Display Script operator, the latter displays the results of the last assignment in the last script above it.

 

Screen Offset group - Use these values to adjust the positioning of the script data relative to the particle position, in pixels. By using different offset values and several Script and Display Script operators, you can show multiple data at once (Position, Speed, Scale, etc.).

 

Show IDs and Data on - Lets you filter the particles for data display. The options are:

  • All Particles - Displays data for all particles in the viewports.
  • Selected Particles Only - Displays data only for selected particles. To select particles, use the Modify panel > Selection rollout controls and use standard viewport selection methods to pick particles to see their data (see the Particle Flow documentation for further information).
  • Group Selected Only - Displays data only for group-selected particles. Use the Group Selection Operator button to specify the applicable operator. This option is applicable only if you have Particle Flow Tools®: Box#1 installed (commercial or demo version; the latter is available from www.orbaz.com). It can be used in conjunction with the Camera Culling operator, which can serve as a Group Selection operator as well. In this case, you can show only data for particles that are visible to the camera.

 

Group Selection Operator - Sets the Group Selection operator for the Group Selected Only option (see above). Click this button (labeled "None" by default) and then use the dialog that opens to choose a Group Selection or Camera Culling operator. Thereafter the operator name appears on the button.

 

Precision - Sets the number of decimal places displayed in float fields. Range=0 to 8 (where 0 is no decimal places).