LightFilter
 
 
 

Light Filter

This example shows how to implement a custom filter as a self-installing plug-in that handles light objects. The Light filter plug-in is installed when the example workgroup is installed and automatically added to the filter menu of the Scene Explorer view. The light filter plug-in provides two filters: LightOnFilter and LightOffFilter. When the LightOnFilter is the active selection filter, the Scene Explorer will only display the light objects that have the intensity parameter value > 0. When the LightOffFilter is the active selection filter, the Scene Explorer will only display the light objects that have the intensity parameter value set to 0.

Example Files

Location
Files
lightfilter.js

Running the Example

To run the example

  1. Create some light objects and set their intensity to 0.
  2. Open the Scene Explorer view , click to display the contextual menu and click the Custom Filters item to list the custom filters .

  3. In the list of filters, click  LightOffFilter.

    All lights with the intensity parameter value set to 0 should be displayed in the Scene Explorer. 

Keywords

This example uses the following keywords:

JScript, RegisterFilter, siFilter3DObject, Light, IsClassOf, siLightID, Match, Context, GetAttribute, Input, Shaders.