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:

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