Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    SetActiveRenderData

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 291 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        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();

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 21/05/2008 at 20:26, xxxxxxxx wrote:

          Genius 🙂

          Thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post