On 04/07/2017 at 14:51, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
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
<..... 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.