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 24/04/2008 at 02:34, xxxxxxxx wrote:
User Information: Cinema 4D Version: 10.5 Platform: Mac OSX ; Language(s) :
--------- Hi!
I have a small problem:
BaseDocument* doc = GetActiveDocument(); RenderData* rd = doc->GetFirstRenderData(); BaseContainer rdata = rd->GetData(); rdata.SetBool(RDATA_RENDERASEDITOR, TRUE); rdata.SetFilename(RDATA_PATH,Filename("...path...")); rdata.SetLong(RDATA_FORMAT, FILTER_JPG);
Why does C4D don't change the settings? Do I forget something?
Bye! and Thanks
On 24/04/2008 at 05:29, xxxxxxxx wrote:
you forgot:
> rd->SetData(const BaseContainer& bc, Bool add = TRUE);
at the end.
alternativley you could try rd->GetDataInstance()
On 24/04/2008 at 07:23, xxxxxxxx wrote:
Hi!
THanks for the tip, I don't know why, but both tips didn't work
On 24/04/2008 at 07:50, xxxxxxxx wrote:
It works fine here, just remember to send a message to the node and the event. Also RDATA_RENDERASEDITOR is a LONG not a Bool. It goes from 0-3 for the different editor modi.
> \> RenderData \*rd = doc->GetFirstRenderData(); \> BaseContainer \*rdata = rd->GetDataInstance(); \> \> rdata->SetLong(RDATA_RENDERASEDITOR, 3); \> rdata->SetFilename(RDATA_PATH, Filename("test")); \> rdata->SetLong(RDATA_FORMAT, FILTER_JPG); \> \> rd->Message(MSG_UPDATE); \> \> EventAdd(); \>
\> RenderData \*rd = doc->GetFirstRenderData(); \> BaseContainer \*rdata = rd->GetDataInstance(); \> \> rdata->SetLong(RDATA_RENDERASEDITOR, 3); \> rdata->SetFilename(RDATA_PATH, Filename("test")); \> rdata->SetLong(RDATA_FORMAT, FILTER_JPG); \> \> rd->Message(MSG_UPDATE); \> \> EventAdd(); \>
cheers, Matthias
On 24/04/2008 at 08:28, xxxxxxxx wrote:
As Matthias does in his example, it is more efficient just to get the pointer to the BaseContainer and set values directly. This avoids the need to use SetData().
On 24/04/2008 at 11:07, xxxxxxxx wrote:
Thanks, it works