THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/05/2003 at 09:40, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Mac ;
Language(s) : C.O.F.F.E.E ;
---------
How can I get what type of shader is being used inside any channel? I wrote this code (1) and it does return me the name of the shader, the name of the bitmap or nil (if no shader nor bitmap is being used). But, how can I check for what type of thing is there? How do I know if it is a shader or a bitmap?
(1)
main(doc,op)
{
var material,color,channel,shader;
material=doc->GetFirstMaterial();
if(!material) return;
color=material->GetChannel(CHANNEL_COLOR);
channel=color->GetContainer();
shader=channel->GetData(CH_TEXTURE);
println(shader->GetName());
}
And, if possible, how can I search for all nested shaders (for instance, inside a Fusion shader)?
Thank you very much in advance.
Rui Batista