Public Member Functions | |
| HRESULT | SetPrimaryMaterialEditor (IRcUndoRedoGroup *spUndoRedo) |
| HRESULT | UnSetPrimaryMaterialEditor (IRcUndoRedoGroup *spUndoRedo) |
| HRESULT | ForceMaterialRefresh () |
| HRESULT | EnumMaterialEditorPanels (IRsPanelContainer *pContainer) |
| HRESULT | UpdateMaterialNodes (IRcUndoRedoGroup *spUndoRedo) |
| HRESULT | GetMaterialEditorWeight (RtMatClsId gMatClsId, RtFloat *pWeight) |
| HRESULT | CreateDefaultRealTimeMaterial (IRsMaterialGeneric *pSourceMaterial, IRsNode **ppDefaultD3dMaterial) |
| HRESULT | CreatePreviewImage (IRsNode *pMaterialNode, RtUlong dwWidth, RtUlong dwHeight, IRdBitmap **ppBitmap) |
| HRESULT | CreateMaterialFromGeneric (RtMatClsId clsMatId, IRdMaterialGeneric *pGeneric, IRsNode **ppMaterialNode) |
| HRESULT IRsMaterialEditor::SetPrimaryMaterialEditor | ( | IRcUndoRedoGroup * | spUndoRedo | ) |
Method is called when user chooses this material editor. Note that only one editor can be active in a time.
| spUndoRedo | Pointer to container for undo/redo events |
| HRESULT IRsMaterialEditor::UnSetPrimaryMaterialEditor | ( | IRcUndoRedoGroup * | spUndoRedo | ) |
Method is called when user changes from this material editor to another one.
| spUndoRedo | Pointer to container for undo/redo events |
| HRESULT IRsMaterialEditor::ForceMaterialRefresh | ( | ) |
Force refresh of material previews. Note, that function is called for all material editors so you can reset your internal caches so you can correctly refresh previews if your material editor becomes active.
| HRESULT IRsMaterialEditor::EnumMaterialEditorPanels | ( | IRsPanelContainer * | pContainer | ) |
Called if material editor is being opened. As a response, node should open it's panels and add stack panels to panel contianer.
| pContainer | Fill with node panels you wish to open together with material editor panel. |
| HRESULT IRsMaterialEditor::UpdateMaterialNodes | ( | IRcUndoRedoGroup * | spUndoRedo | ) |
Called for active material after activation or change of material so that material editor can update shader panels if required.
| spUndoRedo | Container to store undo/redo commands for this call. This parameter is NULL when undo/redo is not requested. |
| HRESULT IRsMaterialEditor::GetMaterialEditorWeight | ( | RtMatClsId | gMatClsId, | |
| RtFloat * | pWeight | |||
| ) |
Return material editor weight for specified material class. Bigger weight means that editor is more sufficient to open for provided material class. Return negative value if this editor cannot be used for provided material due to serious incompatibility.
| gMatClsId | Material class id | |
| pWeight | Weight of this material editor. |
| HRESULT IRsMaterialEditor::CreateDefaultRealTimeMaterial | ( | IRsMaterialGeneric * | pSourceMaterial, | |
| IRsNode ** | ppDefaultD3dMaterial | |||
| ) |
Create default d3d material from provided material. This method allows custom material editors to provide better real time approximation for their shaders.
| pSourceMaterial | Material to convert. | |
| ppDefaultD3dMaterial | Generated D3D material |
| HRESULT IRsMaterialEditor::CreatePreviewImage | ( | IRsNode * | pMaterialNode, | |
| RtUlong | dwWidth, | |||
| RtUlong | dwHeight, | |||
| IRdBitmap ** | ppBitmap | |||
| ) |
Create material preview bitmap with specified resolution. Must be called from Master thread.
| pMaterialNode | Material for which you want to generate bitmap. | |
| dwWidth | Width of requested image | |
| dwHeight | Height of requested image | |
| ppBitmap | Filled with default material preview according to current ME settings. |
| HRESULT IRsMaterialEditor::CreateMaterialFromGeneric | ( | RtMatClsId | clsMatId, | |
| IRdMaterialGeneric * | pGeneric, | |||
| IRsNode ** | ppMaterialNode | |||
| ) |
Create default material from provided generic description.
| clsMatId | Material class ID | |
| pGeneric | Generic material description. | |
| ppMaterialNode | Generated material node |
1.5.5