Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/05/2008 at 19:29, xxxxxxxx wrote:
User Information: Cinema 4D Version: 10.111 Platform: Language(s) : C++ ;
--------- I'm trying to set up a list of render data, but when I try to set that data, there's no change in the document. Hoping someone here can tell me what I'm doing wrong.
BaseDocument* doc = GetActiveDocument(); RenderData* rd = doc->GetActiveRenderData();
AutoAlloc<RenderData> newRD; if(!newRD) return FALSE; newRD->SetName("test"); BaseContainer* bctest = newRD->GetDataInstance(); //Test setting one element bctest->SetLong(RDATA_XRES, 320); doc->InsertRenderData(newRD, rd); doc->SetActiveRenderData(newRD);
//Confirming newRD is set as active data GePrint("Active render data is: " + doc->GetActiveRenderData()->GetName()); GePrint("Xres: " + LongToString(doc->GetActiveRenderData()->GetData().GetLong(RDATA_XRES)));
Console output confirms that active render data has been changed, but the render settings window does not change, and a test renders with the old settings.
On 21/05/2008 at 19:49, xxxxxxxx wrote:
AutoAlloc'ing a class instance and then inserting into a list is probably not a good idea. AutoAlloc automatically frees the instance when the AutoAlloc goes out of scope. Try this instead and see if there is a difference:
RenderData* newRD = RenderData::Alloc();
On 21/05/2008 at 20:26, xxxxxxxx wrote:
Genius
Thanks!