ah yes. my bad.
sorry that I'm being confusing and having trouble deciding and testing :facepalm:
The script is getting kinda complicated that I myself have trouble keeping up with it.
Thank you a lot for baring with me...
case 3: works as expected.
case 1: after further reflection:
- if a single object is selected: selects its naked edges. if it has none, it can simply deselect it.
- if edges are selected on an object, and there are other objects in the selection: it adds the
naked edges of other objects to the edge selection (or it deselects them if they have none, but without
deselecting the edges).
>>> these two conditions together would allow to scout the scene, selecting one object at a time
and pressing the hotkey to select the naked edges on multiple objects.
- if multiple objects are selected, but no edges are selected:
"expand to other named objects or switch to next name"
(basically the way it behaves now)
Some more brainstorming:
- I know that many users use Styles instead of names to group elements. Maybe it can be useful
to check for the styles too if the objects are not named and they don't have the default style, and expand
to the same style or switch to the next one (similarly to my suggestions with the names). I don't know
yet what can of worms this would open though :S
Edit: another behavior: if nothing is selected, then select the result of the last operation:
script:var a = moi.command.lastCommandRevisionStart; var b = moi.command.lastCommandRevisionEnd; var objects = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.databaseRevision> a && obj.databaseRevision <= b ) obj.selected = true; }
-----------------------
I hope this is enough/not too much to create a satisfactory script for everyone to use.
|