THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/03/2005 at 01:11, xxxxxxxx wrote:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C++ ;
I' currently searchin for a possibility to browse through a material, for the plugin i'm developing.
Now i want to check if a shader is a layershader or fusionshader, and browse through its subshaders.
Am i on the right way if i do a GetData() on the Shader?
If yes, how can know if its a layershader or any other?
and how can i access its subshaders?
Many questions for the first post, huh
thanks for each reply,
On 09/03/2005 at 12:27, xxxxxxxx wrote:
huh, thats really hard to figure out. That's how far i've come:
BaseContainer *bc = desc->GetParameterI(DESCID_ROOT,NULL);
but then, how do i get the infos? there is this IDS_SLA_LAYER, ...?
Or are there any documents that could help me?
On 10/03/2005 at 00:40, xxxxxxxx wrote:
I don't get it... can anyone help me?
On 10/03/2005 at 06:22, xxxxxxxx wrote:
Within an XSLAFusion shader you will be able to get the sub-shaders through the SHADERLINKs in the res-file. Unfortunately for XSLALayer there's just a single big SLA_BLEND, which is a private structure. So fusion yes, layer no, afaict.
Getting the fusion sub-shaders should be a simple material->GetChannel(CHANNEL_COLOR)->GetShader()->GetParameter(SLA_FUSION_BLEND_CHANNEL, link, 0) operation.
On 10/03/2005 at 06:26, xxxxxxxx wrote:
thanks very much for your answer.
So there is no way to get Infos out of the Layer-Shader? That would be bad
Thats nearly the whole purpose of my plugin, d'oh
On 10/03/2005 at 06:48, xxxxxxxx wrote:
Have you tried getting the layer shader and then browse through it with layershader->GetDown(); and then GetNext()? Not sure if this works, but worth a try.
On 10/03/2005 at 07:30, xxxxxxxx wrote:
indeed, it works that way :-)))
Thanks very much Samir
On 10/03/2005 at 07:33, xxxxxxxx wrote:
On 10/03/2005 at 09:47, xxxxxxxx wrote:
You're right, that will work to get the actual sub-shaders. However, I double checked with the develoepers and there's no way to access the actual SLA_BLEND structure. So you won't be able to access the blend parameters for the layers etc.
On 10/03/2005 at 09:50, xxxxxxxx wrote:
hmm, ok thanks. the blend parameters whould also have been nice, but subshaders is a good start
I'll post the plugin here when i finished it
On 10/08/2014 at 17:38, xxxxxxxx wrote:
Old thread revive - I take it that it is still not possible to access the layer shader properly?
On 10/08/2014 at 23:10, xxxxxxxx wrote:
Check this out: http://www.maxonexchange.de/sdk/CINEMA4DSDK/help/pages/lib_layershader/class_LayerShader930.html
On 11/08/2014 at 00:52, xxxxxxxx wrote:
Huh! Well i`ll be damned..
Weird how they`ve included LayerShader in the docs and no mention of Fusion for example ( at least from what i can see ) even though fusion is accessible..
On 11/08/2014 at 07:27, xxxxxxxx wrote:
The word "properly" can mean different things to different people.
AFAIK. We still cannot insert or remove shaders from the Layer Shader. And I don't think Maxon intends on fixing that in any future releases.
It's my own personal opinion that we do not have "proper" access to it. And never will.