Shader/Channel Message

Detailed Description

Functions

void HandleShaderMessage (GeListNode *node, BaseShader *ps, Int32 type, void *data)
 
void HandleInitialChannel (GeListNode *node, Int32 id, Int32 type, void *data)
 

Function Documentation

◆ HandleShaderMessage()

void HandleShaderMessage ( GeListNode node,
BaseShader ps,
Int32  type,
void *  data 
)

Needs to be called by all shaders in NodeData::Message() if they have subchannels.
Here is an example:

Bool CSLAFusion::Message(GeListNode* pNode, Int32 messageType, void* pMessageData)
{
const BaseContainer& data = static_cast<BaseShader*>(node)->GetDataInstanceRef();
HandleInitialChannel(node, SLA_FUSION_BASE_CHANNEL, messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)data.GetLink(SLA_FUSION_BLEND_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)data.GetLink(SLA_FUSION_MASK_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)data.GetLink(SLA_FUSION_BASE_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
return true;
}
Definition: c4d_basecontainer.h:48
const BaseList2D * GetLink(Int32 id, const BaseDocument *doc, Int32 instanceof=0) const
Definition: c4d_basecontainer.h:488
Definition: c4d_basechannel.h:36
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1976
maxon::Bool Bool
Definition: ge_sys_math.h:51
maxon::Int32 Int32
Definition: ge_sys_math.h:56
#define Xbase
Shader base.
Definition: ge_prepass.h:1322
void HandleInitialChannel(GeListNode *node, Int32 id, Int32 type, void *data)
Deprecated.
void HandleShaderMessage(GeListNode *node, BaseShader *ps, Int32 type, void *data)
struct _node node
Definition: node.h:10
@ SLA_FUSION_MASK_CHANNEL
Definition: xslafusion.h:39
@ SLA_FUSION_BASE_CHANNEL
Definition: xslafusion.h:40
@ SLA_FUSION_BLEND_CHANNEL
Definition: xslafusion.h:38
Parameters
[in]nodeThe shader node. The caller owns the pointed shader node.
[in]psThe subchannel shader. The caller owns the pointed shader node.
[in]typeThe message type.
[in]dataThe message data.

◆ HandleInitialChannel()

void HandleInitialChannel ( GeListNode node,
Int32  id,
Int32  type,
void *  data 
)

Deprecated.