Display Script Operator

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 that precedes 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 data it displays 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 multiple Script operators containing pertinent assignments precede a Display Script operator in an event, 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.
  • Group Selected Only Displays data for group-selected particles only. Use the Group Selection Operator button to specify the applicable operator; this can be a Group Selection or Camera Culling operator.
    Tip: With the Camera Culling operator, 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 means no decimal places).

Priority and Execution Order group

See Priority And Execution Order.