THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2012 at 10:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Mac ;
Language(s) : C++ ;
---------
Hello.
I've seen tons of threads about the LayerShader and it doesn't look like you can add things to it which sucks, but that's not what I need to do. I want to access the layers already in it and modify them. And from what I've seen that's possible, but I'm not sure how to get access to the LayerShader, I've got code to get the BaseShader but I don't know how to get to the LayerShader.
Here's where I'm at:
shader = mat->GetFirstShader();
//code to loop through all the shaders in the material
if (shader->GetType() == Xlayer)
{
//do stuff to the layers here
}
So I know if it's a LayerShader or not, but how do I get from the BaseShader class to the LayerShader class? I'm new to C++ plugin development so sorry if that's an obvious question.
Thanks in advance for any help!
Dan