On 08/08/2018 at 11:07, xxxxxxxx wrote:
Cinema 4D Version: R19
Platform: Windows ; Mac ; Mac OSX ;
I have a scene that has a SHADERLINK parameter, initialized with a texture. It works, I can sample, no problem.
But every time I load that scene, I'm getting a INITRENDERRESULT_USERBREAK error when I call InitRender(), from my TagData::Execute().
If I immediately change some parameter to trigger Execute() again, InitRender will succeed and sample as expected.
From the docs I see the error has something to do with threading (Thread has been canceled).
Should I init irs.vd? How? I can't find a way to get a Render* anywhere in the docs to access GetInitialVolumeData()
Here's what I do, in my Execute() :
GeData data; node->GetParameter( parameterId, data, DESCFLAGS_GET_0 ); auto shader = static_cast<BaseShader*>( data.GetBaseLink() ); InitRenderStruct irs( doc ); irs.thread = bt; auto error = shader->InitRender( irs );