Classes | |
struct | MatPreviewObjectInfo |
struct | MatPreviewModifyCacheScene |
struct | MatPreviewPrepareScene |
struct | MatPreviewGenerateImage |
struct | MatPreviewCopyUserData |
struct | MatPreviewHandleDragnDrop |
class | MaterialPreviewData |
class | MaterialPreviewCustomGui |
Typedefs | |
typedef Bool(* | RenderPreviewImageCallback) (Int32 lMessage, void *pData, void *pUserData) |
#define CUSTOMGUI_MATPREVIEW |
Material preview custom GUI ID.
#define CUSTOMDATATYPE_MATPREVIEW |
Material preview custom data type ID.
#define RENDER_PREVIEW_USE_BMP_SIZE |
Renders in full bitmap size, ignoring the settings in the material or shader data. (For RenderMaterialPreview() and RenderShaderPreview().)
#define RENDER_PREVIEW_USE_CURRENT_QUEUE |
Internal flag which tells the renderer to use the current destination queue RENDERFLAGS::INTERNAL_USE_CURRENT_QUEUE.
Called to process host message for the MaterialPreviewData when initialized with this callback.
[in] | lMessage | The message: MATPREVIEW |
[in] | pData | The message data. |
[in] | pUserData | A clone of the user data. |
Bool SetDParameterPreview | ( | BaseContainer * | pContainer, |
const GeData * | pData, | ||
DESCFLAGS_SET & | lFlags, | ||
Int32 | lID | ||
) |
Convenience function to use in NodeData::SetDParameter() of nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::SetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::SetDParameter(). The caller owns the pointed data. |
[in] | lFlags | The flags sent to NodeData::SetDParameter(). |
[in] | lID | The ID of the material preview. |
Bool GetDParameterPreview | ( | BaseContainer * | pContainer, |
GeData * | pData, | ||
DESCFLAGS_GET & | lFlags, | ||
Int32 | lID, | ||
Int32 | lCount, | ||
BaseMaterial * | pMaterial | ||
) |
Convenience function to use in NodeData::GetDParameter() of material nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::GetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::GetDParameter(). The caller owns the pointed data.. |
[in] | lFlags | The flags sent to NodeData::GetDParameter(). |
[in] | lID | The ID of the material preview. |
[in] | lCount | The dirty count. |
[in] | pMaterial | The material. The caller owns the pointed material. |
Bool GetDParameterPreview | ( | BaseContainer * | pContainer, |
GeData * | pData, | ||
DESCFLAGS_GET & | lFlags, | ||
Int32 | lID, | ||
Int32 | lCount, | ||
BaseShader * | pShader | ||
) |
Convenience function to use in NodeData::GetDParameter() of shader nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::GetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::GetDParameter(). The caller owns the pointed data.. |
[in] | lFlags | The flags sent to NodeData::GetDParameter(). |
[in] | lID | The ID of the material preview. |
[in] | lCount | The dirty count. |
[in] | pShader | The shader. The caller owns the pointed shader. |
BaseContainer GetPreviewScenes | ( | Bool | bIncludeFlat2D, |
Bool | bIncludeDefault = false , |
||
Int32 | lObjectID = -1 |
||
) |
Retrieves a list of preview scenes. Use the returned container's elements in menus.
[in] | bIncludeFlat2D | Include Flat 2D. |
[in] | bIncludeDefault | Include Default. |
[in] | lObjectID | An object ID. |
Bool HandlePreviewSceneMessage | ( | Int32 | lID, |
MatPreviewType & | t, | ||
maxon::String & | strScene | ||
) |
Generates the type and the scene name from the menu item generated by GetPreviewScenes().
[in] | lID | The selected menu ID. |
[out] | t | Assigned the preview type. |
[out] | strScene | Assigned the scene name. |
Bool AddUserPreviewScene | ( | const Filename & | fn, |
Int32 | lID, | ||
maxon::String * | pstrName | ||
) |
Adds a user scene that optionally only shows up in materials with type lID. The pstrName may be nullptr, in which case the file name is used.
[in] | fn | The user scene name. |
[in] | lID | The material ID, or -1 to make the preview scene available for all materials. |
[in] | pstrName | An optional user scene name. The string is copied. The caller owns the pointed string. |
RENDERRESULT RenderMaterialPreview | ( | const Filename & | docpath, |
BaseMaterial * | pMatClone, | ||
BaseMaterial * | pOrigMat, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
BaseDocument * | pOriginalDoc, | ||
Float | rCurrentTime, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate the material preview for the Material Manager. Private.
RENDERRESULT RenderShaderPreview | ( | const Filename & | docpath, |
BaseShader * | pShaderClone, | ||
BaseShader * | pOrigShader, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
BaseDocument * | pOriginalDoc, | ||
Float | rCurrentTime, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate the shader preview for the Material Manager. Private.
RENDERRESULT RenderCustomPreview | ( | RenderPreviewImageCallback | fn, |
void * | pUserData, | ||
Int32 | lUserID, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate a custom preview. Private.