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

    Getting the count of selected Polygons [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 488 Views
    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 Offline
      Helper
      last edited by

      On 20/06/2015 at 17:52, xxxxxxxx wrote:

      Hi, I try to get the count of selected Polygons.  I have expected this to work:

      SelPolycount=len(op.GetPolygonS())

      But that gives an error. Is there a simple solution?

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

        On 21/06/2015 at 15:02, xxxxxxxx wrote:

        Hello,

        GetPolygonS() does not return an array but an object of the type BaseSelect. You can use this object to change the selection or to get the number of selected elements.

        best wishes,
        Sebastian

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

          On 21/06/2015 at 15:46, xxxxxxxx wrote:

          I think that's exactly what he is trying to do, Sebastian 🙂
          There's a GetCount() member in the BaseSelect class.

          https://developers.maxon.net/docs/py/2023_2//help/modules/c4d/BaseSelect/index.html?highlight=getcoun#BaseSelect.GetCount

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

            On 03/07/2015 at 09:39, xxxxxxxx wrote:

            Hello holgar,

            was your question answered?

            Best wishes,
            Sebastian

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

              On 08/07/2015 at 01:44, xxxxxxxx wrote:

              Hi Sebastian. Sorry I forgot to answer. Yes, everthing is working now with GetCount and Baseselect.
              Thanks.

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