On 04/07/2017 at 14:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I've got some problems when I try to use BakeTexture for a sub-shader in a ShaderData plugin.
Here is the scenario. I have a ShaderData plugin with a shaderlink parameter. The shader set in that shaderlink parameter has to be baked.
So, in InitRender of the ShaderData, I use BakeTexture in the inner shader and I get a breakpoint here:
CINEMA 4D.exe!00007ff6c91528ce() Unknown
CINEMA 4D.exe!00007ff6c915283d() Unknown
c4dplugin.xdl64!00007ff89d020528() Unknown
c4dplugin.xdl64!00007ff89e92fe49() Unknown
c4dplugin.xdl64!00007ff89d050c43() Unknown
sla.cdl64!00007ff89019b52f() Unknown
sla.cdl64!00007ff890199e29() Unknown
<..... My method call that uses BakeTexture.......>
This problem with BakeTexture appears ONLY in the ShaderData's InitRender.
I use the same texture baking code in other places and everything works fine.
I use the thread and document that are passed in InitRender.
Once I continue after the break point, the returned value of BakeTexture is BAKE_TEX_ERR_NONE.
The BakeTexture's result is correct.
How can I find the problem here ?
Thank you very much for your time.