STYLE SELECT V3

Next
 From:  neilwilson3412
9214.1 
hi guys.

can we please have a tweak on the script below "SelectStyleV2" to act the same as the browser select....super helpful for quick selecting the new faces/edges created from Boolean operations.

'This script currently will only look at "top-level" objects, it won't go into sub-objects like faces or edges that may have different styles on them."

SelectStyleV2 – The main method for selecting by style is to use the browser by clicking on the text part of the style name. But you can do it by using this script as well – it will expand the selection to include all objects of the same style as one that is currently selected. To use that, first select an object from the style you want to target, then hit the key to trigger that script and all the other objects of that same style will be added to the selection.

N script: /* Expand selection over same styles */ var objects = moi.geometryDatabase.getObjects();var styles = new Array();for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.selected ) styles[obj.styleIndex] = true; } for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( styles[obj.styleIndex] ) obj.selected = true; }

  Same in this groups script it doesn't mimic the deeper behavior as the yellow scene browser dots do .

script: /* Extend selection to same names */ var names = new Array(); var objs = moi.geometryDatabase.getSelectedObjects(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name != '' ) names[obj.name] = true; } objs = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name != '' && names[obj.name] ) obj.selected = true; }


if not possible can i have a script to bring browser styles/objects out as dialog box pop up under the cursor on a hot key .

best regards Neil

EDITED: 16 Jan 2019 by NEILWILSON3412

  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
9214.2 In reply to 9214.1 
Hi Neil, in the next v4 beta it will be possible for a script to trigger the Scene Browser select directly.

- 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:  neilwilson3412
9214.3 In reply to 9214.2 
when is next beta ? :)
  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
9214.4 In reply to 9214.3 
Hi Neil, not sure yet it depends on how long it takes to track down a couple of tricky bugs.

- 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