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
    1. Maxon Developers Forum
    2. paula.kokic
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    paula.kokic

    @paula.kokic

    0
    Reputation
    3
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    paula.kokic Unfollow Follow

    Latest posts made by paula.kokic

    • RE: Method `BaseTake.SetCamera(self, takeData, camera)` does not set the camera

      Hello @ferdinand ,

      I understand, of course. However, it's hard for me to give any code samples, not just because of privacy, but also because it's a really complex process we're doing in 5000+ lines of code in 4 Plugins that work together. Therefore, even trying to isolate/simplify something and send you the code and scene that you could test out yourself is quite impossible. And I really don't wanna waste your time by sending you the whole project and asking you for debugging.

      In any case - thank you very much again for your engagement, I highly appreciate it! I have a workaround for now and might take a closer look at this another time. We can mark the topic as "solved" 🙂

      Best Regards,
      Paula

      posted in Cinema 4D SDK
      P
      paula.kokic
    • RE: Method `BaseTake.SetCamera(self, takeData, camera)` does not set the camera

      @ferdinand Thank you very much for your answer!

      I checked if all that you wrote is present in my code - and it is.

      Indeed, my take is generated, but constantly from the wrong camera - to be precise: from the main scene camera instead the one I want to render from.

      Even if I dynamically create a new camera with c4d.CameraObject() and put it into SetCamera() method, it will work.

      However, I realized today that somehow hierarchical position of the camera object makes a difference. When the render camera is attached to the root of the document it works. If it's under a Null object (e.g. 3rd level), it doesn't work. Do you have any explanation why would this be a game changer?

      At the moment, my workaround would be to make a clone of my camera and insert it at the root of the document, create a take, and then delete it after usage - this seems to work completely fine.

      Even though I have a workaround, I would be interested in knowing what is the connection between object hierarchy and using SetCamera() method for the Take.

      Thanks again!

      Kind regards,
      Paula

      posted in Cinema 4D SDK
      P
      paula.kokic
    • Method `BaseTake.SetCamera(self, takeData, camera)` does not set the camera

      Hello everyone,

      I am developing Python Plugins for C4D R21(did not update to Python3 yet) and I am having issues with generating takes. I am trying to set the render camera, but for some reason, after execution of the command, camera is not set (BaseTake.GetCamera(self, takeData) returns None). This method works completely fine in other parts of the plugin (that my ex-colleague wrote), with almost the same conditions.

      The method I am using to set the camera is: BaseTake.SetCamera(self, takeData, camera)
      Description here: https://developers.maxon.net/docs/py/2023_2/modules/c4d.modules/takesystem/BaseTake/index.html?highlight=setcamera#BaseTake.SetCamera

      I am sure that camera I want to set is a proper C4D camera object, it is not Null. My take object is also initialized and render settings loaded. Are there any specific limitations to this method, or something else that needs to be taken into consideration when using the method, that I just cannot see at the moment?

      Thank you very much in advance!

      Kind regards,
      Paula

      posted in Cinema 4D SDK r21 python
      P
      paula.kokic