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

BaseShader
Definition: c4d_basechannel.h:36
SLA_FUSION_BLEND_CHANNEL
@ SLA_FUSION_BLEND_CHANNEL
Definition: xslafusion.h:38
SLA_FUSION_BASE_CHANNEL
@ SLA_FUSION_BASE_CHANNEL
Definition: xslafusion.h:40
BaseContainer::GetLink
BaseList2D * GetLink(Int32 id, const BaseDocument *doc, Int32 instanceof=0) const
Definition: c4d_basecontainer.h:443
SLA_FUSION_MASK_CHANNEL
@ SLA_FUSION_MASK_CHANNEL
Definition: xslafusion.h:39
GeListNode
Represents a C4DAtom that resides in a 4D list.
Definition: c4d_baselist.h:1768
HandleInitialChannel
void HandleInitialChannel(GeListNode *node, Int32 id, Int32 type, void *data)
Deprecated.
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:58
GeListNode::GetDocument
BaseDocument * GetDocument()
Definition: c4d_baselist.h:1915
HandleShaderMessage
void HandleShaderMessage(GeListNode *node, BaseShader *ps, Int32 type, void *data)
Bool
maxon::Bool Bool
Definition: ge_sys_math.h:53
Xbase
#define Xbase
Shader base.
Definition: ge_prepass.h:1162
BaseContainer
Definition: c4d_basecontainer.h:47