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)
{
BaseContainer* pData = ((BaseShader*)node)->GetDataInstance();
HandleInitialChannel(node, SLA_FUSION_BASE_CHANNEL, messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)pData->GetLink(SLA_FUSION_BLEND_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)pData->GetLink(SLA_FUSION_MASK_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
HandleShaderMessage(node, (BaseShader*)pData->GetLink(SLA_FUSION_BASE_CHANNEL, node->GetDocument(), Xbase), messageType, pMessageData);
return true;
}
Definition: c4d_basecontainer.h:47
BaseList2D * GetLink(Int32 id, const BaseDocument *doc, Int32 instanceof=0) const
Definition: c4d_basecontainer.h:443
Definition: c4d_basechannel.h:36
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1831
maxon::Bool Bool
Definition: ge_sys_math.h:55
maxon::Int32 Int32
Definition: ge_sys_math.h:60
#define Xbase
Shader base.
Definition: ge_prepass.h:1302
void HandleInitialChannel(GeListNode *node, Int32 id, Int32 type, void *data)
Deprecated.
void HandleShaderMessage(GeListNode *node, BaseShader *ps, Int32 type, void *data)
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.