MarkMaterials Struct Reference

#include <c4d_baselist.h>

Detailed Description

Message struct for the MSG_MULTI_MARKMATERIALS message.
This is an example of how to handle the message:

Bool MyObject::Message(Int32 msg_type, void* msg_data)
{
switch (msg_type)
{
{
// 'mat' is the material of my object in the link parameter MATERIAL_ID
BaseDocument* doc = GetDocument();
BaseMaterial* mat = data.GetMaterialLink(MATERIAL_ID, doc);
if (data) // Material translation, update my link if necessary
{
MarkMaterials* mm = static_cast<MarkMaterials*>(msg_data);
if (doc && mm->omat == mat)
{
doc->undo.InitUndo(UNDO_CHANGE_SMALL, this);
data.SetLink(MATERIAL_ID, mm->nmat);
}
}
else // Material marking, mark all my materials
{
if (mat)
}
}
break;
}
return SUPER::Message(msg_type, msg_data);
}
Definition: c4d_basedocument.h:497
void SetBit(Int32 mask)
Definition: c4d_baselist.h:2434
Definition: c4d_basematerial.h:28
maxon::Bool Bool
Definition: ge_sys_math.h:51
maxon::Int32 Int32
Definition: ge_sys_math.h:56
#define BIT_MATMARK
Marked material.
Definition: ge_prepass.h:895
#define MSG_MULTI_MARKMATERIALS
Definition: c4d_baselist.h:551
const char * doc
Definition: pyerrors.h:226
Definition: c4d_baselist.h:802
BaseMaterial * nmat
New material. Cinema&#160;4D owns the pointed material.
Definition: c4d_baselist.h:809
BaseMaterial * omat
Original material. Cinema&#160;4D owns the pointed material.
Definition: c4d_baselist.h:808

Public Member Functions

 MarkMaterials ()
 

Public Attributes

BaseMaterialomat
 
BaseMaterialnmat
 

Constructor & Destructor Documentation

◆ MarkMaterials()

Default constructor.

Member Data Documentation

◆ omat

BaseMaterial* omat

Original material. Cinema 4D owns the pointed material.

◆ nmat

BaseMaterial* nmat

New material. Cinema 4D owns the pointed material.