Selection grow and shrink script?

Next
 From:  Metin Seven (SEVENSHEAVEN)
6988.1 
Hi,

Does anyone know if there's a script that can expand or contract selections? So if you have one or more faces selected, it would expand the selection with the adjoining faces. I miss that a lot when making selections. I'm used to using it a lot with poly subdivision modeling.

Would be great if that would work on edges and curve/surface control points as well.

Thanks,

Metin

EDITED: 22 Oct 2014 by SEVENSHEAVEN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6988.2 In reply to 6988.1 
Hi Metin, it's not really feasible for control points because there is not currently any interface available for scripts to access the control point selection. But I think it may be possible to do something for faces and edges, I will take a look at that a while later on today.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Metin Seven (SEVENSHEAVEN)
6988.3 In reply to 6988.2 
Cool, thanks a lot Michael!

— Metin

———————

metinseven.com — 3D (print) design • animation • artwork • illustration • visualization

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
6988.4 In reply to 6988.1 
Hi Metin,

this is expand script
code:
script: function es(edg){ var i,f; for (i=0; i<edg.length; i++) {f=edg.item(i).getFacesOfEdge(); f.setProperty('selected',1);}} var so = moi.geometryDatabase.getSelectedObjects(), sf=so.getFaces(), i; for ( i=0; i<sf.length;i++) es(sf.item(i).getEdges()); es(so.getEdges());


and a shrink script
code:
script: function es(edg){ var i,f; for (i=0; i<edg.length; i++) {f=edg.item(i).getFacesOfEdge(); f.setProperty('selected',0);}} var gd = moi.geometryDatabase; gd.invertSelection(); var so = gd.getSelectedObjects(), sf=so.getFaces(), i; gd.invertSelection(); for ( i=0; i<sf.length;i++) es(sf.item(i).getEdges());

EDITED: 22 Oct 2014 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6988.5 In reply to 6988.4 
Thanks Max!

@Metin - does that do what you needed?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Metin Seven (SEVENSHEAVEN)
6988.6 
Brilliant! It does exactly what I meant. Many thanks, Max!

— Metin

———————

metinseven.com — 3D (print) design • animation • artwork • illustration • visualization

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Lordfox
6988.7 
Very very usefull - thank you so much.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  ndrakey
6988.8 In reply to 6988.4 
Is there a way to select whole islands ?

lets say i have two cubes where I select the front 2 faces and convert it to select the 2 cube`s complete faces
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
6988.9 In reply to 6988.8 
Hi ndrakey, re:

> lets say i have two cubes where I select the front 2 faces and convert it
> to select the 2 cube`s complete faces

Use "Select All" Ctrl+A to do that - if you have a face or edge sub-object selected, you can then use Ctrl+A / Select All to select all faces or edges of those objects. Once your selection is on a sub-object, select all will see that and select the all the same sub-objects without selecting other top level objects.

So with your cube example, if you have 2 separate cube objects, then you select one front face on each one, press Ctrl+A and then the selection will expand to all the faces on those 2 cubes.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All