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
    • Register
    • Login

    SetSceneCamera not working

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 228 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 12/08/2005 at 11:23, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.1 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      I dont understand why the following snippet is not working. I am trying to change the camera and render the document.

      This is what I am using

        
      String s = clonedDoc->GetRenderBaseDraw()->GetSceneCamera(clonedDoc)->GetName();  
      GePrint("Camera Name: " + s);  
      GePrint("Op Name: " + op->GetName() + " " + LongToString(op->GetType()));  
      clonedDoc->GetRenderBaseDraw()->SetSceneCamera(op);  
      clonedDoc->Message(MSG_UPDATE);  
      s = clonedDoc->GetRenderBaseDraw()->GetSceneCamera(clonedDoc)->GetName();  
      GePrint("Camera Name: " + s);  
      

      But the following is printed in the console

      1. Camera Name: Camera
      2. Op Name: MyRenderCamera 5103
      3. Camera Name: Camera

      Line 3 should be Camera Name: MyRenderCamera (which is the name of the camera object)

      I dont understand why it doesn't use my camera

      Any Ideas?

      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 12/08/2005 at 11:36, xxxxxxxx wrote:

        Nevermind, programmer error 🙂

        It was to do with clonedDoc. As I was cloning the document, some other part of my code was using the original document

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