MarkMaterials Struct Reference

#include <c4d_baselist.h>

详细描述

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) { case MSG_MULTI_MARKMATERIALS : { // '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) mat-> SetBit ( BIT_MATMARK ); } } break ; } return SUPER::Message(msg_type, msg_data); }

公共成员函数

  MarkMaterials ()

Public Attributes

BaseMaterial omat
BaseMaterial nmat

构造函数 & 析构函数文档编制

◆  MarkMaterials()

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
定义: c4d_baselist.h:740
MarkMaterials::omat
BaseMaterial * omat
Original material. Cinema 4D owns the pointed material.
定义: c4d_baselist.h:747
MSG_MULTI_MARKMATERIALS
#define MSG_MULTI_MARKMATERIALS
定义: c4d_baselist.h:499
BaseList2D::SetBit
void SetBit(Int32 mask)
定义: c4d_baselist.h:2200
BIT_MATMARK
#define BIT_MATMARK
Marked material.
定义: ge_prepass.h:843
Int32
maxon::Int32 Int32
定义: ge_sys_math.h:58
MarkMaterials::nmat
BaseMaterial * nmat
New material. Cinema 4D owns the pointed material.
定义: c4d_baselist.h:748
Bool
maxon::Bool Bool
定义: ge_sys_math.h:53
BaseMaterial
定义: c4d_basematerial.h:27
BaseDocument
定义: c4d_basedocument.h:490