On 03/09/2014 at 09:05, xxxxxxxx wrote:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
I have been looking through the various posts, and I understand that in previous versions of Cinema you cannot create a LayerShader and then add new shaders to the LayerShader. Is this still the case or is it possible to do so now? Specifically I am trying to add the different Effect items and/or the various Shader items.
Thanks for any replies
On 03/09/2014 at 10:02, xxxxxxxx wrote:
I was looking at. Be possible with Melange. (blendlayers.h header)
It is not clear just how.
Please give an example if possible....
All types of care solutions
It would be very important
On 04/09/2014 at 10:10, xxxxxxxx wrote:
I took a look at the Melange documentation and it doesn't look like it allows what I am looking for.
This is my code to create a Shader of type Xlayer and insert it into the Color Shader field of a newly created material.
//Create a new material "Material1"
//and insert it in the document
BaseDocument* doc = GetActiveDocument();
Material* myMat = (Material* )BaseMaterial::Alloc(Mmaterial);
//Create a BaseShader of type Xlayer and insert in the
BaseContainer *data = NULL;
data = myMat->GetDataInstance();
BaseShader *shader = NULL;
shader = BaseShader::Alloc(Xlayer);
From here I'm trying to add the different Shader options or Effect options to the LayerShader. This is where I run into trouble, and most of the code examples I've found are dealing with bitmap images.
On 04/09/2014 at 13:36, xxxxxxxx wrote:
it looks like one can only read a layer shader but cannot add new layers.
On 04/09/2014 at 13:43, xxxxxxxx wrote:
Thanks for replying Sebastian, that was the answer I was afraid of.
On 07/09/2014 at 07:06, xxxxxxxx wrote:
Found LayerShader description in melange SDK.