material.enable_tree
If this flag is set, the material's event function is executed for all potentially
visible entities before sorting into the rendering list. This can, for instance,
be used to change certain entity parameters depending on the current view.
Range:
on - material event function will be executed per view for all
potentially visible entities.
off - material event function will be executed when the entity
is created.
Type:
Flag
Edition
C P
Remarks:
- If the event function returns 1, the entity is not rendered in this
view. For rendering the entity, 0 must be returned.
- All entity flags (except INVISIBLE) as well as the entities' alpha
and material parameters can be changed in this event.
Example:
function mtl_tree()
{
if (render_view != camera) {
my.transparent = on; } // render transparent in all views but the camera view
return(0); // render the entity
}
material mtl_semitransparent // environment cube
{
event = mtl_tree;
flags = ENABLE_TREE;
...
}
See also:
material.event, material.matrix