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

    How to get edge 'island' selection

    Scheduled Pinned Locked Moved Cinema 4D SDK
    python2026
    2 Posts 2 Posters 11 Views 1 Watching
    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.
    • B Offline
      BretBays
      last edited by

      Hello there,

      I do not have code for this, I was mostly curious if an idea was at all possible and how to approach it in Cinema's SDK.

      Steps to reproduce:

      1. Create Plane.
      2. Make it editable
      3. Switch to Edge mode
      4. Use Path Selection tool set to Simple Edge loop to select a few loops like this:

      26d93d43-5a7b-4258-a418-f7d10c94822f-image.png

      Is there a way to get each of these loops in python? Like, a Base Select would just give me whether or not an edge is selected, but I basically want to get the continuous edges of each loop. So to know that the first loop is made up of edges 1-10, the second loop is 2-20, etc. The end goal would be to take those loops, and do some stuff with each set of verts for each loop. But I am not sure if this is even possible or not. I had looked at the Neighbor class, but I don't know if that would enable me to do it.

      There must be some sort of internal method because if you do some loops and use the edge to joint command, it can differentiate the different loop selections to create joints.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @BretBays
        last edited by

        Hey @BretBays,

        Thank you for reaching out to us. Yes, that is possible but we cannot write the script for you. We can only help you when you make the first steps yourself. Will find all the necessary building blocks in the modeling example scripts.

        1. Create a plane generator object.
        2. Get its cache to get an editable polygon object. For more complex geometry or in general you could also run MCOMMAND_CURRENTSTATETOOBJECT.
        3. The run SendModellingCommand with ID_MODELING_LOOP_TOOL. Sometimes modelling commands can be a bit bumpy ride, when you want to do more niche things. But at the first glance everything you will need seems to be there:

        acca7690-1afd-436e-bd86-28329c9c5b07-image.png

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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