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)
{
{
BaseMaterial* mat = data.GetMaterialLink(MATERIAL_ID, doc);
{
if (doc && mm->omat == mat)
{
doc->undo.InitUndo(UNDO_CHANGE_SMALL, this);
data.SetLink(MATERIAL_ID, mm->nmat);
}
}
else
{
}
}
break;
}
return SUPER::Message(msg_type, msg_data);
}
#define MSG_MULTI_MARKMATERIALS
Definition: c4d_baselist.h:572
maxon::Bool Bool
Definition: ge_sys_math.h:46
maxon::Int32 Int32
Definition: ge_sys_math.h:51
class CINEWARE_SINGLEINHERITANCE BaseDocument
Definition: customgui_inexclude.h:18
static Bool IsTranslation(const void *msgData)
Definition: c4d_baselist.h:834
static void Mark(BaseMaterial *mat, void *msgData)
MarkMaterials()
Default constructor.
Definition: c4d_baselist.h:828
If the material link is stored in a BaseContainer, you can also use the convenience function HandleMaterialInContainer which handles both translation and marking.