THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/02/2005 at 15:21, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Trying to get the Material for a PluginShader from within ShaderData.Init() (my own shader plugin). The code below always returns h == NULL and returns FALSE. The PluginShader GeListNode has no GeListHead? If I'm trying too early, where else, praytell, would I be able to do this?
PluginShader *ps = (PluginShader* )node;
// Get Shader's Material (hack)
GeListHead* h;
if (!(h = ps->GetListHead())) { GePrint("iShader.Init.h"); return FALSE; }
material = static_cast<Material*>(h->GetParent());
if (!material || (material->GetType() != Mmaterial)) { GePrint("iShader.Init.material"); return FALSE; }