define an editor for the Graphics Display Kit light information
GDlinfo_edit_notify_templ
group GDlinfo_edit_notify_templ
{
int show_lights;
int amb_onoff;
float amb_red;
float amb_green;
float amb_blue;
int cur_light;
};
GDlinfo_edit_templ
GDlinfo_edit_notify_templ GDlinfo_edit_templ
int+IPort2 shell_vis;
int reset;
GDlight_info_templ+IPort2 &light_info;
GDlight_templ &sel_light;
method+notify_inst+notify_val upd_func = "GDlinfo_edit_update";
};
GDlinfo_edit_templ GDlinfo_edit;
These templates define an editor for the Graphics Display Kit light information. GDlinfo_edit_notify_templ and GDlinfo_edit_templ define the elements that cause the light information editor's method to execute. GDlinfo_edit is the version you instance.
As an alternative to using GDlinfo_edit and having to define your own user interface for the editor, you can use LightInfoEditor, an application component. LightInfoEditor contains GDlinfo_edit and defines a user interface.
The parameter controls whether the editor is active: 0 means it is not; 1 means it is.
shell_vis is only checked if the light information to which the editor is attached has changed. In this case, if shell_vis is not set to 1, the editor does not update. This inhibits updates to the editor's other subobjects -- which are normally attached to UI widgets -- when the user interface is not visible. The editor always executes when the values of the other parameters change. This means that the light information to which the editor is attached is always updated even if the user interface is not visible.
Typically you connect shell_vis to the same UIcmd object that the user selects to display the editor's user interface:
The light-information object controlled by the editor. light_info is a connection to an object that matches type GDlight_info_templ.
This parameter controls whether icons for object's set of lights appear on the screen: 0 means they don't; 1 means they do. Unsupported at the current time.
This parameter controls whether ambient lighting is enabled. Ambient light is nondirectional light that affects all parts of all surfaces equally. 0 means it is are disabled; 1 means it is enabled.
The ambient light's color, in terms of RGB.
The current light, where 0 indicates the first light in the set, and so forth.
A connection to the current light. The editor updates this object automatically when cur_light changes.
Libraries.Graphics_Display.Editors.UI_Editors.LightInfoEditor