Overriding
NodeData::Message
it is not recommended to check for a
nullptr
pointer in
node->GetDocument()
if it is a
MATPREVIEW
message.
For those messages the document might be
nullptr
in some cases, but the method should not be aborted.
Macros |
|
#define | MATPREVIEW_GET_OBJECT_INFO |
#define | MATPREVIEW_GENERATE_IMAGE |
#define | MATPREVIEW_MODIFY_CACHE_SCENE |
#define | MATPREVIEW_PREPARE_SCENE |
#define | MATPREVIEW_GET_PREVIEW_ID |
#define | MATPREVIEW_GET_POPUP_OPTIONS |
#define | MATPREVIEW_HANDLE_POPUP_MSG |
#define | MATPREVIEW_FREE_USERDATA |
#define | MATPREVIEW_COPY_USERDATA |
#define | MATPREVIEW_DRAGNDROP_RECV |
#define | MATPREVIEW_DRAGNDROP_START |
#define | MATPREVIEW_DRAGNDROP_END |
#define | MATPREVIEW_GET_DIRTY_COUNT |
#define | MATPREVIEW_POPUP_NAME |
#define | MATPREVIEW_NULL_SIZE_NAME |
#define MATPREVIEW_GET_OBJECT_INFO |
Sent by the material preview to get object information from the host. The corresponding data is MatPreviewObjectInfo .
#define MATPREVIEW_GENERATE_IMAGE |
Sent by the material preview when the host object is responsible for the rendering ( MatPreviewObjectInfo::bHandlePreview is true ). The corresponding data is MatPreviewGenerateImage .
#define MATPREVIEW_MODIFY_CACHE_SCENE |
Sent by the material preview to let the host modify the preview scene. A pointer to a scene inside the preview scene cache is sent. The corresponding data is MatPreviewModifyCacheScene .
#define MATPREVIEW_PREPARE_SCENE |
Sent each time the preview wants to render the host scene. The corresponding data is MatPreviewPrepareScene .
#define MATPREVIEW_GET_PREVIEW_ID |
The corresponding data is Int32 . Set it to the ID of the material preview.
#define MATPREVIEW_GET_POPUP_OPTIONS |
Let add extra material preview popup menu items to a custom sub-menu.
The corresponding
data
is a
BaseContainer
which represents the menu. Insert the menu items. Set the name of the sub-menu with MATPREVIEW_POPUP_NAME.
范例:
// Element with index MATPREVIEW_POPUP_NAME is the text of the popup item. bc-> SetString ( MATPREVIEW_POPUP_NAME , GeLoadString (IDS_PARTICLEVOLUME));
// A menu item. (Container entries should start with 1.) bc-> SetString (1, GeLoadString (IDS_PARTICLEVOLUME_HIGH_DENSITY) + (highDensity ? "&c&" : "" ));
// Add an example separator. bc-> SetString (0, "" );
// Yet another menu item. bc-> SetString (2, GeLoadString (IDS_PARTICLEVOLUME_LOW_DENSITY) + (!highDensity ? "&c&" : "" )); return true ; } break ;
#define MATPREVIEW_HANDLE_POPUP_MSG |
Sent when the user has selected any of the options in the material preview popup. The corresponding data is an Int32 which is the menu item ID.
#define MATPREVIEW_FREE_USERDATA |
Sent to free the user data. (Only sent when the preview is initialized with a callback.)
#define MATPREVIEW_COPY_USERDATA |
Sent to copy the user data. The corresponding data is a MatPreviewCopyUserData . Set MatPreviewCopyUserData::dst to a clone of MatPreviewCopyUserData::src . (Only sent when the preview is initialized with a callback.)
#define MATPREVIEW_DRAGNDROP_RECV |
Preview has received drag and drop. The corresponding data is MatPreviewHandleDragnDrop .
#define MATPREVIEW_DRAGNDROP_START |
Start drag and drop (fill in the MatPreviewHandleDragnDrop structure). The corresponding data is MatPreviewHandleDragnDrop .
#define MATPREVIEW_DRAGNDROP_END |
Drag and drop finished, free data . The corresponding data is MatPreviewHandleDragnDrop .
#define MATPREVIEW_GET_DIRTY_COUNT |
Let return a dirty count for the preview.
#define MATPREVIEW_POPUP_NAME |
String Popup name.
#define MATPREVIEW_NULL_SIZE_NAME |