THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/09/2012 at 13:36, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
can anybody please help me to retrieve the data of a gradien shader? The code below always provides NULL. Am I using the wrong Resource ID? I tried it with the ones from xs**gradient.h, they match the shader panel in the attribute manager.
BaseShader *sh = chn->GetShader();
if (sh->GetType() == Xgradient)
{
if (sh->GetParameter(DescLevel(1000), d, DESCFLAGS_GET_0)) // Xs**gradient
{
Gradient *gr = (Gradient* )d.GetCustomDataType(CUSTOMDATATYPE_GRADIENT);
if (gr)
{
// ... gr is NULL
}
}
}