Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. flewis
    F

    flewis

    @flewis

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

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    flewis Follow

    Best posts made by flewis

    This user hasn't posted anything yet.

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