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

    selection order and shift-select

    PYTHON Development
    0
    5
    837
    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
      Helper
      last edited by

      On 25/06/2017 at 17:04, xxxxxxxx wrote:

      Hello,

      Silly question:
      I'm trying to retrieve selected objects in order.  This normally works fine if they are picked individually, but if I shift-select a range in the Object Manager, the list is not in order.

        
      selected = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_SELECTIONORDER)  
      

      order in Object Manager, shift selected top-to-bottom:

      Cube.7
      Cube.6
      Cube.5
      Cube.4
      Cube.3
      Cube.2
      Cube.1
      Cube

      order of selected list:

      Cube.7
      Cube.1
      Cube.2
      Cube.4
      Cube.3
      Cube.5
      Cube.6
      Cube

      Seems to always get the first and last correct, but not the ones in between.

      Hopefully I just missed something obvious. C4D R18.048

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 26/06/2017 at 09:15, xxxxxxxx wrote:

        Hi,

        welcome to the Plugin Café forums 🙂

        I was able to reproduce the issue, it also occurs with rectangle selection. I need to investigate a bit further, why it's not working.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 26/06/2017 at 17:51, xxxxxxxx wrote:

          Thanks very much Andreas!

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 27/06/2017 at 06:00, xxxxxxxx wrote:

            Hi Kevin,

            I can confirm this is a bug. Unfortunately I can not give any estimates, when this will be fixed.

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              On 27/06/2017 at 06:33, xxxxxxxx wrote:

              No worries, thanks for looking into it!

              Would you have any tips on detecting a shift or box select, so I could re-order them from within my script?  The first and last seem consistent, so I could use those to bound my hierarchy search.

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