To grow selection in UVPolygon mode
kisaf last edited by
When C4D is in Polygon mode
Grow selectioncan be done using
utils.SendModelingCommand( c4d.MCOMMAND_SELECTGROW, [op], c4d.MODELINGCOMMANDMODE_POLYGONSELECTION, c4d.BaseContainer(), doc )
After that, selection grows to neighbour polygons. Everithing is ok.
However, when active mode is UV Polygon then code above select neighbour polygons the same way how it was in previous case. Sometime it's ok, but not always.
The second way to grow selection is to use
c4d.CallCommand(12558, 12558) # Grow Selection
In this case selection grows correctly in both modes.
I'll show an example. There is a simple sphere that separated by UVs in the middle. So it has 2 UV islands.
From 1 selected polygon (the first image) I want to get the result which is shown on the last image.
But I don't know how to get it without
Sorry for mistakes. English is not my szcznek language
m_adam last edited by
Hi Kisaf, I'm afraid this is not possible from SendModelingCommand to send command in UV mode.
So it's up to you to remove the extra selected stuff or build your own grow algorithm.
A good way to achieves that could be to:
- Detects uv island and give them an ID.
- Store uv island ID used with the current selection.
- Grow the selection in polygon mode
- Deselect all polygons if they are not in the uv island.
But this not work in all cases (e.g. topology of the object is disconnected but uv are connected).