Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Current document in Team Render

    Cinema 4D SDK
    c++
    2
    3
    756
    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.
    • V
      victor
      last edited by

      I'm using BaseDocument
      *doc = GetActiveDocument();
      to get the document we are using and

      const UnitScaleData docScaleData = (const UnitScaleData)doc->GetDataInstance()->GetCustomDataType(DOCUMENT_DOCUNIT, CUSTOMDATATYPE_UNITSCALE);
      Float otherScale = 1.0f;
      docScaleData->GetUnitScale(otherScale, docunit);

      to get the units in the scene, unfortunatly GetActiveDocument() returns a doc named "Untitled 1" in Team Render rendering process so I cannot get the scene units.

      Is there any way to get the current scene or units during a Team Render rendering session?

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by r_gigante

        Hi Victor, thanks for reaching us.

        With regard to the issue mentioned, please provide me with some more detail about the context in which you're attempting to retrieve the document being rendered.
        Waiting for your additional details, please beware as pointed out in the Access section of the BaseDocument Manual that GetActiveDocument() just returns the document being displayed in the editor. In the context of TeamRender you definitively don't have to make use of it but depending on the context you're, you have to select a different option.

        Looking forward further info, give best.

        Riccardo

        V 1 Reply Last reply Reply Quote 3
        • V
          victor @r_gigante
          last edited by

          @r_gigante It was about updating an object during the render process but I used a different aproach just by sending the object's doc to that function so I think it could be solved already.

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