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);
}

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.

MarkMaterials
Definition: c4d_baselist.h:756
MarkMaterials::omat
BaseMaterial * omat
Original material. Cinema&#160;4D owns the pointed material.
Definition: c4d_baselist.h:763
MSG_MULTI_MARKMATERIALS
#define MSG_MULTI_MARKMATERIALS
Definition: c4d_baselist.h:506
BaseList2D::SetBit
void SetBit(Int32 mask)
Definition: c4d_baselist.h:2230
BIT_MATMARK
#define BIT_MATMARK
Marked material.
Definition: ge_prepass.h:848
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:60
MarkMaterials::nmat
BaseMaterial * nmat
New material. Cinema&#160;4D owns the pointed material.
Definition: c4d_baselist.h:764
Bool
maxon::Bool Bool
Definition: ge_sys_math.h:55
BaseMaterial
Definition: c4d_basematerial.h:27
BaseDocument
Definition: c4d_basedocument.h:490