Hello,
I tested it with the Gradient Shader example from the cinema4dsdk and it works fine as far as I can tell.
I just removed the check for ASSETDATA_FLAG::TEXTURESONLY:
Bool SDKGradientClass::Message(GeListNode* node, Int32 type, void* data)
{
switch (type)
{
case MSG_GETALLASSETS:
{
AssetData* const assetData = static_cast<AssetData*>(data);
// checks if only texture assets should be added
if (assetData == nullptr)
return true;
BaseList2D* const baseList2D = static_cast<BaseList2D*>(node);
if (baseList2D != nullptr)
{
// get the file name
const Filename path = baseList2D->GetData().GetFilename(GRAD_FILE);
// check if the file name is set
if (path.IsPopulated())
{
// add the file name
assetData->Add(path, nullptr);
}
}
break;
}
}
return SUPER::Message(node, type, data);
};
Regarding Shader hierarchies: I guess you can send the message to your child-shaders yourself, to make sure they receives the message.
best wishes,
Sebastian