THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/01/2008 at 18:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.6+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Hello All,
i'm trying to setlink inside a my custom material with two others materials allocated and inserted in the same scene with:
front=(BaseMaterial* )bcmat->GetMaterialLink(VRAY2SIDEDMATERIAL_PARAMS_LINK1, pp->GetDocument());
back=(BaseMaterial* )bcmat->GetMaterialLink(VRAY2SIDEDMATERIAL_PARAMS_LINK2, pp->GetDocument());
if (front) {
frontMat=(BaseMaterial* )front->GetClone(NULL,NULL);
scene->pDoc->InsertMaterial(frontMat);
bcmat->SetLink(VRAY2SIDEDMATERIAL_PARAMS_LINK1,frontMat);
}
but if just here i try to get the linked material:
front=(BaseMaterial* )bcmat->GetMaterialLink(VRAY2SIDEDMATERIAL_PARAMS_LINK1, node->GetDocument());
front is 0x00000000
so.. seem that i'm using the wrong way to fill the material link inside my materil..
Any help?
Thanks
Renato