How to get edge 'island' selection
-
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:
- Create Plane.
- Make it editable
- Switch to Edge mode
- Use Path Selection tool set to Simple Edge loop to select a few loops like this:

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.
-
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.
- Create a plane generator object.
- Get its cache to get an editable polygon object. For more complex geometry or in general you could also run
MCOMMAND_CURRENTSTATETOOBJECT. - The run
SendModellingCommandwithID_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:

Cheers,
Ferdinand