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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GetActiveObjects(flags)

    Cinema 4D SDK
    python r20
    2
    3
    536
    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.
    • P
      pim
      last edited by pim

      GetActiveObjects(flags) with GETACTIVEOBJECTFLAGS_SELECTIONORDER works nicely, but is there a SetActiveObjects(flags) with a similar flag like GETACTIVEOBJECTFLAGS_SELECTIONORDER?

      When I use doc.SetSelection(plane1, mode=c4d.SELECTION_NEW) and multiple times doc.SetSelection(new obj, mode=c4d.SELECTION_ADD), the sequence is incorrect. It seems random?

      1 Reply Last reply Reply Quote 0
      • S
        s_bach
        last edited by

        Hello,

        the selection order is internally stored in the Object Manager. If you add an object to the selection you have to update an internal cache with GetActiveObject().

        See C++ documentation: Selections

        and this thread: Adding to document selection issue

        best wishes,
        Sebastian

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        P 1 Reply Last reply Reply Quote 1
        • P
          pim @s_bach
          last edited by

          @s_bach Ok, Thanks.

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