Shortcuts for turning on the filter-mode on curves, edges or faces?

Next
 From:  wastzzz
6942.1 
Are there any shortcuts for turning on the filter mode for curves, or edges, or faces?
Sometimes when I have many objects and layers in the scene browser it is a bit time consuming to open the panel and ctrl+click the yellow circle.



Thanks.
Max.
Attachments:

  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
6942.2 In reply to 6942.1 
Hi Max, you can put the following scripts on a shortcut key for turning on these particular filters:

script: /* Turn on selection filter for Types > Curves */ moi.selection.setFilter( 'Types', 'Curves', true );

script: /* Turn on selection filter for Types > Edges */ moi.selection.setFilter( 'Types', 'Edges', true );

script: /* Turn on selection filter for Types > Faces */ moi.selection.setFilter( 'Types', 'Faces', true );


That will only turn it on, not toggle it, but you can push the Esc key to turn off filters.

If you want other ones, the script access is through moi.selection.setFilter( category, item, enable ), where:

// Category is one of: "Types", "Styles", or "Names".
// For Types, item is one of: "Curves", "Surfaces", "Solids", "Edges", "Faces", or "Points".
// For Styles, item is an integer number of the style index.
// For Names, item is the string name.

- 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:  wastzzz
6942.3 In reply to 6942.2 
Thank you, that was incredibly quick.
Max.
  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:  wastzzz
6942.4 
Just to know, is there a 'clearfilters()' function or something? I do not wish them to stack. For now I've been editing those scripts you wrote and adding some false values to the others.
Max.
  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
6942.5 In reply to 6942.4 
Hi Max, yes the script for clearing all filters is: moi.selection.clearSelectionFilters();

The related selection filter functions available to script are:

moi.selection.clearSelectionFilters(); // Clears all selection filter.

moi.selection.anySelectionFilter( category ); // returns true if any selection filter is set in the given category.

moi.selection.isFilterActive( category, item ); // returns true if the selection filter of the given category and specific item is active.

moi.selection.setFilter( category, item, enable ); // Sets a specific filter to active or inactive.

moi.selection.passesSelectionFilter( obj ); // Returns true if the given object passes all active selection filters.


- 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
 From:  wastzzz
6942.6 
Thank you!
M.
  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