i'm slowly converting to max, but want some customization in the toolset, and i encountered a wall.
I'm really just discovering maxscript and i can't find a way to get the sub object selection count in editable poly.
It's really frustrating because the values are given in the modifier tab
Can you help me ?
Thanx.
Replies
Nodes:
- Node Common Properties, Operators, and Methods
Editable Poly Stuff:
- Interface: EditablePoly
- Editable_Poly Methods
Array and BitArray
- Array Values
- BitArray Values
Edit Note: elementsn should be elementsBACKSLASHn to jump to a new line. The html eats it away.
Press F11 to open the MaxScript listener. After the execution of this code you can select the plane and by cycling through sub-object levels, verify the actual selections.
I need Max to return the number of Elements/SubObjects (4 in this test case). I tried getOpenEdges and converting these to FaceSelections and reading those but I'm stuck now comparing these to get the number of Elements.
Am I on the right track and how could this comparison work or is there an easier way to do this? (why is there no getNumElements )
Edit: I think I got it, have to test it though:
Create a bitArray with all open Edges
Select the first Edge
Set NumberOfElements +1
Convert to Element Selection
Convert to Edge Selection
Subtract those Edges from the bitArray
Select the next Edge and loop.
Edit: It worked