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. flewis
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    flewis

    @flewis

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

    flewis Unfollow Follow

    Latest posts made by flewis

    • RE: Python: "Frame Selected" Within a Thread

      Thank you for your helpful info @zipit and for responding so quickly! This gives me a few alternatives to explore!

      I'm also thinking of alternatives to using the built in "frame selected" functionality at all, with something like this general approach:

      1. Get the bounding box center of all the geo, collectively, by using BaseObject.GetMp for each object and finding the maximum and minimum x, y and z center values gotten for all objects, and then finding the midpoint of those max and min values.
      2. Get the bounding box radius for all geo, collectively, using a similar approach to that of step 1, using BaseObject.GetRad.
      3. Get the viewing angle of the camera.
      4. Point the camera at the bounding box center and move it far enough away from that point to include the collective bounding box given the viewing angle.

      Sorry about not adding the tags. I currently don't seem to have access to the guidelines. When I try to go to this link https://plugincafe.maxon.net/guidlines_cp either by clicking the exclamation point icon at the top of the forum page or by pasting the link address directly, I get:

      "Access Denied
      You seem to have stumbled upon a page that you do not have access to."

      I have added the tags you mentioned.

      I am marking this as "solved" since you have answered my question.

      Thanks.

      Fred

      access_denied.png

      posted in Cinema 4D SDK
      F
      flewis
    • Python: "Frame Selected" Within a Thread

      Using Python, I'm trying to "Frame Selected" for the current camera while running within a Thread.

      class procThread(c4d.threading.C4DThread):
          ...
      

      When I run either of these two commands from outside the Thread, they work fine:

      c4d.CallCommand(5103)
      

      or

      c4d.CallCommand(12151)
      

      followed by this for safety:

      c4d.EventAdd()
      

      But if I run these commands from inside the Thread, the framing doesn't occur. I need a Thread so the user can have a progress bar while I iterate over loading a bunch of objects, framing each object and rendering it. Everything is working except for the framing. Any helpful suggestions would be much appreciated! Perhaps it's just not possible? Thanks!

      posted in Cinema 4D SDK python s22
      F
      flewis