| 
| enum   | MatPreviewType {  
  MatPreviewDefault, 
 
  MatPreviewFlat2D, 
 
  MatPreviewCube, 
 
  MatPreviewPlane, 
 
  MatPreviewCylinder, 
 
  MatPreviewTorus, 
 
  MatPreviewPlaneBack, 
 
  MatPreviewSphere, 
 
  MatPreview2Torus, 
 
  MatPreviewRoundedCube, 
 
  MatPreviewKnot, 
 
  MatPreviewMultipleObjects, 
 
  MatPreviewCandle, 
 
  MatPreviewCloth, 
 
  MatPreviewGem, 
 
  MatPreviewObjectAnim, 
 
  MatPreviewObject, 
 
  MatPreviewUser
 
 } | 
|   | 
| enum   | MatPreviewSize {  
  MatPreviewSizeDefault, 
 
  MatPreviewSizeSmall, 
 
  MatPreviewSizeMedium, 
 
  MatPreviewSizeBig, 
 
  MatPreviewSizeLarge
 
 } | 
|   | 
 | 
| Bool  | SetDParameterPreview (BaseContainer *pContainer, const GeData *pData, DESCFLAGS_SET &lFlags, Int32 lID) | 
|   | 
| Bool  | GetDParameterPreview (BaseContainer *pContainer, GeData *pData, DESCFLAGS_GET &lFlags, Int32 lID, Int32 lCount, BaseMaterial *pMaterial) | 
|   | 
| Bool  | GetDParameterPreview (BaseContainer *pContainer, GeData *pData, DESCFLAGS_GET &lFlags, Int32 lID, Int32 lCount, BaseShader *pShader) | 
|   | 
| BaseContainer  | GetPreviewScenes (Bool bIncludeFlat2D, Bool bIncludeDefault=false, Int32 lObjectID=-1) | 
|   | 
| Bool  | HandlePreviewSceneMessage (Int32 lID, MatPreviewType &t, maxon::String &strScene) | 
|   | 
| Bool  | AddUserPreviewScene (const Filename &fn, Int32 lID, maxon::String *pstrName) | 
|   | 
| RENDERRESULT  | RenderMaterialPreview (const Filename &docpath, BaseMaterial *pMatClone, BaseMaterial *pOrigMat, BaseThread *pThread, BaseBitmap *pDest, BaseDocument *pOriginalDoc, Float rCurrentTime, Int32 lFlags=0) | 
|   | 
| RENDERRESULT  | RenderShaderPreview (const Filename &docpath, BaseShader *pShaderClone, BaseShader *pOrigShader, BaseThread *pThread, BaseBitmap *pDest, BaseDocument *pOriginalDoc, Float rCurrentTime, Int32 lFlags=0) | 
|   | 
| RENDERRESULT  | RenderCustomPreview (RenderPreviewImageCallback fn, void *pUserData, Int32 lUserID, BaseThread *pThread, BaseBitmap *pDest, Int32 lFlags=0) | 
|   | 
◆ CUSTOMGUI_MATPREVIEW
      
        
          | #define CUSTOMGUI_MATPREVIEW | 
        
      
 
Material preview custom GUI ID. 
 
 
◆ CUSTOMDATATYPE_MATPREVIEW
      
        
          | #define CUSTOMDATATYPE_MATPREVIEW | 
        
      
 
Material preview custom data type ID. 
 
 
◆ RENDER_PREVIEW_USE_BMP_SIZE
      
        
          | #define RENDER_PREVIEW_USE_BMP_SIZE | 
        
      
 
 
◆ RenderPreviewImageCallback
      
        
          | typedef Bool(* RenderPreviewImageCallback) (Int32 lMessage, void *pData, void *pUserData) | 
        
      
 
Called to process host message for the MaterialPreviewData when initialized with this callback. 
- Parameters
 - 
  
    | [in] | lMessage | The message: MATPREVIEW  | 
    | [in] | pData | The message data.  | 
    | [in] | pUserData | A clone of the user data.  | 
  
   
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ SetDParameterPreview()
Convenience function to use in NodeData::SetDParameter() of nodes with a material preview in the description: 
{
 
  updatecount++;
 
  switch (id[0].id)
  {
  case SIMPLEMATERIAL_MAT_PREVIEW:
  }
 
}
  - Parameters
 - 
  
  
 
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ GetDParameterPreview() [1/2]
Convenience function to use in NodeData::GetDParameter() of material nodes with a material preview in the description: 
{
 
  switch (id[0].id)
  {
  case SIMPLEMATERIAL_MAT_PREVIEW:
  }
 
}
  - Parameters
 - 
  
    | [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.  | 
  
   
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ GetDParameterPreview() [2/2]
Convenience function to use in NodeData::GetDParameter() of shader nodes with a material preview in the description: 
{
  BaseShader* shd = static_cast<BaseMaterial*>(node);
 
 
  switch (id[0].id)
  {
  case SIMPLEMATERIAL_MAT_PREVIEW:
  }
 
}
  - Parameters
 - 
  
    | [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.  | 
  
   
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ GetPreviewScenes()
Retrieves a list of preview scenes. Use the returned container's elements in menus. 
- Parameters
 - 
  
    | [in] | bIncludeFlat2D | Include Flat 2D.  | 
    | [in] | bIncludeDefault | Include Default.  | 
    | [in] | lObjectID | An object ID.  | 
  
   
- Returns
 - The generated menu container. 
 
 
 
◆ HandlePreviewSceneMessage()
Generates the type and the scene name from the menu item generated by GetPreviewScenes(). 
- Parameters
 - 
  
    | [in] | lID | The selected menu ID.  | 
    | [out] | t | Assigned the preview type.  | 
    | [out] | strScene | Assigned the scene name.  | 
  
   
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ AddUserPreviewScene()
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. 
- Note
 - The scene has to contain an object named "Object" (which may well be a Null containing a group of objects) in order to be used by this function. 
 
- Parameters
 - 
  
    | [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.  | 
  
   
- Returns
 - true if successful, otherwise false. 
 
 
 
◆ RenderMaterialPreview()
Called by Cinema 4D to calculate the material preview for the Material Manager. Private. 
 
 
◆ RenderShaderPreview()
Called by Cinema 4D to calculate the shader preview for the Material Manager. Private. 
 
 
◆ RenderCustomPreview()
Called by Cinema 4D to calculate a custom preview. Private. 
 
 
 
 
Definition: c4d_basechannel.h:31
 
Bool GetDParameterPreview(BaseContainer *pContainer, GeData *pData, DESCFLAGS_GET &lFlags, Int32 lID, Int32 lCount, BaseMaterial *pMaterial)
 
const BaseContainer * GetDataInstance() const
Definition: c4d_baselist.h:2224
 
Definition: lib_description.h:315
 
virtual Bool SetDParameter(GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
 
virtual Bool GetDParameter(GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
 
DESCFLAGS_GET
Definition: ge_prepass.h:3002
 
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1723
 
Bool SetDParameterPreview(BaseContainer *pContainer, const GeData *pData, DESCFLAGS_SET &lFlags, Int32 lID)
 
Definition: c4d_gedata.h:77
 
DESCFLAGS_SET
Definition: ge_prepass.h:3016
 
maxon::Bool Bool
Definition: ge_sys_math.h:40
 
Definition: c4d_basematerial.h:23
 
Definition: c4d_basecontainer.h:42