MaterialInterpreter.MaterialInterpreter Class Reference

#include <class_material_interpreter_1_1_material_interpreter.h>

Inheritance diagram for MaterialInterpreter.MaterialInterpreter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  __init__ ()
  __del__ ()
  deactivate ()
  Abstract - to be implemented by the subclasses.
  onNodeDeleted ()
  Re-assigns the current material and any decals on undo.
  configureEventMapping ()
  Abstract - to be implemented by the subclasses.
  tick ()
  Remember that since this method is invoked by a timer it is called from a different thread.
  frame ()
  Continues previously initiated operations, if any:
  VerifySceneMaterialOwners ()
  Verify that the materials and their owners are in the consistent state.
  getCopyBuffer ()
  getLibraryMaterial ()
  onNodeBoundingBoxValid ()
  NodeBoundingBoxListener callback set on the occlusion receivers that have yet to be recompiled.
  DISPLAY_IGNORE_IDLE_REFRESH ()
  DOCUMENT_LOADED ()
  SET_3D_UI_ROOT ()
  STAGE_SET_STAGE_LIST ()
  VIEWER_LAYOUT ()
  SCRIPT_STARTED ()
  SCRIPT_ENDED ()
  SCRIPT_CANCEL ()
  MATERIAL_SNAP_SWATCH ()
  MATERIAL_SWATCH_SNAPPED ()
  QUIT ()
  APPLICATION_CLOSE_SCENE ()
  MATERIAL_LOAD_LIBRARY_PATHS ()
  MATERIAL_UNLOAD_LIBRARY_PATHS ()
  APPLICATION_PREFERENCES_LOADED ()
  Sets the default and selection materials on MaterialCatalog, and refreshes the material library.
  MODEL_HIGHLIGHT ()
  MODEL_TOGGLE_SELECTION_HIGHLIGHT ()
  NODE_CREATED ()
  SHADOW_SET_RECEIVER_TYPE ()
  RT_SWITCH ()
  MATERIAL_SET_SELECTION_STYLE ()
  MATERIALS_REMOVE_FROM_LIBRARYFILE ()
  MATERIALS_SAVE_TO_LIBRARYFILE ()
  COPY_MATERIAL ()
  PASTE_MATERIAL ()
  MATERIAL_DELETE_PARAMETER ()
  MATERIAL_DELETE_PARAMETER_HELPER ()
  Delete a parameter of an actual material which means an object of material not just its id.
  APPEARANCE_PARAMETER_CHANGE ()
  Given a targetId, parameter name and parameter string value, edit the current material parameter of the node with the targetId.
  MATERIAL_REMOVE_MODEL ()
  Remove all the model id on the materials, the material without model id is writable.
  MATERIAL_ADD_MODEL ()
  Add model id to materials, the material with model id is non-writable.
  MATERIAL_CHANGE_PARAMETER ()
  MATERIAL_CHANGE_PARAMETER_HELPER ()
  Editing the parameters of an actual material which means an object of material not just its id.
  ASSIGN_LIBRARY_MATERIAL ()
  ASSIGN_EXISTING_MATERIAL ()
  MATERIAL_INSERT_AS_LAYER ()
  MATERIAL_DELETE_ALL_LAYERS ()
  Removes all layer materials of all specified targets.
  MATERIAL_DELETE_AS_LAYER ()
  APPEARANCE_ADD_OBJECT_ASSOCIATION ()
  APPEARANCE_ADD_LAYER_ASSOCIATION ()
  APPEARANCE_CREATE_LAYER_ASSOCIATION ()
  Create layer associations for the selected or passed decal nodes.
  APPEARANCE_REMOVE_LAYER_ASSOCIATION ()
  MATERIAL_RENAME_IN_LIBRARY ()
  MATERIAL_RENAME ()
  If this is a library material or it is a scene material that is writable, just rename it.
  MATERIAL_RENAME_ON_NODE ()
  MATERIAL_LIBRARY_RENAME ()
  MATERIAL_GROUP_RENAME ()
  MATERIAL_LIBRARY_CREATE ()
  MATERIAL_LIBRARY_DELETE ()
  MATERIAL_GROUP_CREATE ()
  MATERIAL_GROUP_DELETE ()
  MATERIAL_CREATE ()
  MATERIAL_DUPLICATE ()
  MATERIAL_DELETE ()
  MATERIAL_COMPUTE_OCCLUSION ()
  MATERIAL_REMOVE_OCCLUSION ()
  MATERIAL_COMPUTE_OCCLUSION_PARAMETERS ()
  Start the computation of ambient occlusion.
  MATERIAL_DELETE_UNUSED ()
  MATERIAL_ENABLE_SWATCH_GENERATION ()
  MATERIAL_SWATCH_GENERATION_UI ()
  MODEL_PREPARE_ALLDONE ()
  MODEL_IMPORT ()
  MODEL_IMPORT_ALLDONE ()
  DUPLICATED ()
  MODEL_DELETED ()
  MODEL_IMPORT_DISPLAYED_ALL ()
  MODEL_IMPORT_LOADED ()
  GROUP_COLLAPSED ()
  GROUP_EXPANDED ()
  TEXTURE_TRANSFORM_STARTED ()
  TEXTURE_TRANSFORM_DONE ()
  APPEARANCE_SET_LAYER_VISIBILITY ()
  MATERIAL_MOVE_LAYER ()
  MATERIAL_REPLACE_LAYER ()
  ALTERNATIVE_SET_CHANGED ()
  SELECTION_CHANGED ()
  SELECTION_UNCHANGED ()
  MATERIAL_SELECT ()
  MATERIAL_SET_MAX_SWATCHES_PER_FRAME ()
  MATERIAL_OCCLUSION_COMPUTE_STARTED ()
  MATERIAL_OCCLUSION_COMPUTE_CANCELLED ()
  MATERIAL_OCCLUSION_COMPUTE_FINISHED ()
  APPLICATION_LOAD_SCENE_IMPORTS_COMPLETE ()

Member Function Documentation

MaterialInterpreter.MaterialInterpreter.__init__ ( )
MaterialInterpreter.MaterialInterpreter.__del__ ( )
MaterialInterpreter.MaterialInterpreter.deactivate ( )

Abstract - to be implemented by the subclasses.

Performs the operations necessary to place this interpreter into a passive state. Ensure that this base class implementation is called by the subclass implementation.

Reimplemented from MessageInterpreter.MessageInterpreter.

MaterialInterpreter.MaterialInterpreter.onNodeDeleted ( )

Re-assigns the current material and any decals on undo.

MaterialInterpreter.MaterialInterpreter.configureEventMapping ( )

Abstract - to be implemented by the subclasses.

Configures the event mapping table with the events handled by this interpreter, and their respective actions

Reimplemented from MessageInterpreter.MessageInterpreter.

MaterialInterpreter.MaterialInterpreter.tick ( )

Remember that since this method is invoked by a timer it is called from a different thread.

This means in general that this method must be thread safe. Typically it will just trigger a redraw or queue a message.

Reimplemented from MessageInterpreter.MessageInterpreter.

MaterialInterpreter.MaterialInterpreter.frame ( )

Continues previously initiated operations, if any:

1) Checks whether the data of a previously initiated ambient occlusion computation is ready. If it is, then the ambient occlusion computation is continued. 2) Checks whether or not swatch generation is active. If so, generates the next swatch.

MaterialInterpreter.MaterialInterpreter.VerifySceneMaterialOwners ( )

Verify that the materials and their owners are in the consistent state.

MaterialInterpreter.MaterialInterpreter.getCopyBuffer ( )
MaterialInterpreter.MaterialInterpreter.getLibraryMaterial ( )
MaterialInterpreter.MaterialInterpreter.onNodeBoundingBoxValid ( )

NodeBoundingBoxListener callback set on the occlusion receivers that have yet to be recompiled.

Send an informational message when all the receivers have been compiled.

MaterialInterpreter.MaterialInterpreter.DISPLAY_IGNORE_IDLE_REFRESH ( )
MaterialInterpreter.MaterialInterpreter.DOCUMENT_LOADED ( )
MaterialInterpreter.MaterialInterpreter.SET_3D_UI_ROOT ( )
MaterialInterpreter.MaterialInterpreter.STAGE_SET_STAGE_LIST ( )
MaterialInterpreter.MaterialInterpreter.VIEWER_LAYOUT ( )
MaterialInterpreter.MaterialInterpreter.SCRIPT_STARTED ( )
MaterialInterpreter.MaterialInterpreter.SCRIPT_ENDED ( )
MaterialInterpreter.MaterialInterpreter.SCRIPT_CANCEL ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SNAP_SWATCH ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SWATCH_SNAPPED ( )
MaterialInterpreter.MaterialInterpreter.QUIT ( )
MaterialInterpreter.MaterialInterpreter.APPLICATION_CLOSE_SCENE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_LOAD_LIBRARY_PATHS ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_UNLOAD_LIBRARY_PATHS ( )
MaterialInterpreter.MaterialInterpreter.APPLICATION_PREFERENCES_LOADED ( )

Sets the default and selection materials on MaterialCatalog, and refreshes the material library.

MaterialInterpreter.MaterialInterpreter.MODEL_HIGHLIGHT ( )
MaterialInterpreter.MaterialInterpreter.MODEL_TOGGLE_SELECTION_HIGHLIGHT ( )
MaterialInterpreter.MaterialInterpreter.NODE_CREATED ( )
MaterialInterpreter.MaterialInterpreter.SHADOW_SET_RECEIVER_TYPE ( )
MaterialInterpreter.MaterialInterpreter.RT_SWITCH ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SET_SELECTION_STYLE ( )
MaterialInterpreter.MaterialInterpreter.MATERIALS_REMOVE_FROM_LIBRARYFILE ( )
MaterialInterpreter.MaterialInterpreter.MATERIALS_SAVE_TO_LIBRARYFILE ( )
MaterialInterpreter.MaterialInterpreter.COPY_MATERIAL ( )
MaterialInterpreter.MaterialInterpreter.PASTE_MATERIAL ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE_PARAMETER ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE_PARAMETER_HELPER ( )

Delete a parameter of an actual material which means an object of material not just its id.

The message data should be in the following format: ( ( changeMessageId, responseMessageId), ( <material1>, <material2>, ...), parameterName )

MaterialInterpreter.MaterialInterpreter.APPEARANCE_PARAMETER_CHANGE ( )

Given a targetId, parameter name and parameter string value, edit the current material parameter of the node with the targetId.

The parameter category is one of Appearance.kParameterCategory* values. Note that not all categories may need the targetIds.

We will not process the lighting parameters here. Another interpreter will do it instead.

MaterialInterpreter.MaterialInterpreter.MATERIAL_REMOVE_MODEL ( )

Remove all the model id on the materials, the material without model id is writable.

MaterialInterpreter.MaterialInterpreter.MATERIAL_ADD_MODEL ( )

Add model id to materials, the material with model id is non-writable.

MaterialInterpreter.MaterialInterpreter.MATERIAL_CHANGE_PARAMETER ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_CHANGE_PARAMETER_HELPER ( )

Editing the parameters of an actual material which means an object of material not just its id.

The message data should be in the following format: ( ( <changeMessageId, deleteMessageId, responseMessageId> ), (<material1>, <material2>,...), <parameterName>, <parameterType>, <parameterValue>, <isFile>, <forceCreation>, <modifyLinked> ) )

MaterialInterpreter.MaterialInterpreter.ASSIGN_LIBRARY_MATERIAL ( )
MaterialInterpreter.MaterialInterpreter.ASSIGN_EXISTING_MATERIAL ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_INSERT_AS_LAYER ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE_ALL_LAYERS ( )

Removes all layer materials of all specified targets.

MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE_AS_LAYER ( )
MaterialInterpreter.MaterialInterpreter.APPEARANCE_ADD_OBJECT_ASSOCIATION ( )
MaterialInterpreter.MaterialInterpreter.APPEARANCE_ADD_LAYER_ASSOCIATION ( )
MaterialInterpreter.MaterialInterpreter.APPEARANCE_CREATE_LAYER_ASSOCIATION ( )

Create layer associations for the selected or passed decal nodes.

MaterialInterpreter.MaterialInterpreter.APPEARANCE_REMOVE_LAYER_ASSOCIATION ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_RENAME_IN_LIBRARY ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_RENAME ( )

If this is a library material or it is a scene material that is writable, just rename it.

if the material is a scene material that is locked (not writable) we need to duplicate it before we change the name.

MaterialInterpreter.MaterialInterpreter.MATERIAL_RENAME_ON_NODE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_LIBRARY_RENAME ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_GROUP_RENAME ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_LIBRARY_CREATE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_LIBRARY_DELETE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_GROUP_CREATE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_GROUP_DELETE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_CREATE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_DUPLICATE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_COMPUTE_OCCLUSION ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_REMOVE_OCCLUSION ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_COMPUTE_OCCLUSION_PARAMETERS ( )

Start the computation of ambient occlusion.

Does nothing if a previously initiated computation is still active.

MaterialInterpreter.MaterialInterpreter.MATERIAL_DELETE_UNUSED ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_ENABLE_SWATCH_GENERATION ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SWATCH_GENERATION_UI ( )
MaterialInterpreter.MaterialInterpreter.MODEL_PREPARE_ALLDONE ( )
MaterialInterpreter.MaterialInterpreter.MODEL_IMPORT ( )
MaterialInterpreter.MaterialInterpreter.MODEL_IMPORT_ALLDONE ( )
MaterialInterpreter.MaterialInterpreter.DUPLICATED ( )
MaterialInterpreter.MaterialInterpreter.MODEL_DELETED ( )
MaterialInterpreter.MaterialInterpreter.MODEL_IMPORT_DISPLAYED_ALL ( )
MaterialInterpreter.MaterialInterpreter.MODEL_IMPORT_LOADED ( )
MaterialInterpreter.MaterialInterpreter.GROUP_COLLAPSED ( )
MaterialInterpreter.MaterialInterpreter.GROUP_EXPANDED ( )
MaterialInterpreter.MaterialInterpreter.TEXTURE_TRANSFORM_STARTED ( )
MaterialInterpreter.MaterialInterpreter.TEXTURE_TRANSFORM_DONE ( )
MaterialInterpreter.MaterialInterpreter.APPEARANCE_SET_LAYER_VISIBILITY ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_MOVE_LAYER ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_REPLACE_LAYER ( )
MaterialInterpreter.MaterialInterpreter.ALTERNATIVE_SET_CHANGED ( )
MaterialInterpreter.MaterialInterpreter.SELECTION_CHANGED ( )
MaterialInterpreter.MaterialInterpreter.SELECTION_UNCHANGED ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SELECT ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_SET_MAX_SWATCHES_PER_FRAME ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_OCCLUSION_COMPUTE_STARTED ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_OCCLUSION_COMPUTE_CANCELLED ( )
MaterialInterpreter.MaterialInterpreter.MATERIAL_OCCLUSION_COMPUTE_FINISHED ( )
MaterialInterpreter.MaterialInterpreter.APPLICATION_LOAD_SCENE_IMPORTS_COMPLETE ( )

MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter
MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter MaterialInterpreter.MaterialInterpreter