On 29/08/2017 at 03:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I have a ShaderData plugin in which user can click a button to add dynamically shaderlink parameters to it:
BaseContainer texture_cont = GetCustomDataTypeDefault(DTYPE_BASELISTLINK);
texture_cont.SetString(DESC_NAME, "Texture");
texture_cont.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_TEXBOX);
texture_cont.SetBool(DESC_SHADERLINKFLAG, TRUE);
description->SetParameter(texture, texture_cont, group );
This one works fine.
I have another button that allows to add Xnoise shader parameters.
I create an Xnoise shader and I insert the shader in the document doc->InsertShader(xnoise_shader);
I do that in the button's MSG_DESCRIPTION_COMMAND on Message call.
The problem is that I don't see the shader.
It appears that I cannot set the link to a dynamically added shaderlink parameter (I have tested the same code in a static shaderlink parameter defined in a description res and it works fine).
Thank you for your time.