deselect objects with certain name

Next
 From:  Andrei Samardac
5950.1 
Michael there is situation:
A lot of objects are selected, I want to deselect only the objects with certain name. Is any way to make this? I can click on it in browser, but
1. I have a lot of objects here
2. I have no idea what is the name of this object
so this method is not very good in this situation.
I need it to change objects that was hidden but I show them to deselect some objects and than hide them again.

1. Show hidden objects (thay stay selected)
2. Deselect some objects with the same name
3. Hide objects again

EDITED: 11 Jun 2013 by ANDREI SAMARDAC

  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
5950.2 In reply to 5950.1 
Hi mir4ea, I think it should be possible to make a script to help with that, but I'm not entirely sure I understand the hiding and showing part - if you want to deselect some currently shown objects, why do also want to show currently hidden objects as well? Because hidden objects are already not considered selected, they can just stay hidden and they will not be selected already then.

I should be able to make a script that goes something like this:

1. Script remembers which objects are currently selected, then clears the selection.

2. Script asks you to click on one object.

3. After you have clicked on one object, the script restores the original selection except it deselects all objects that have the same name as the object that was clicked on.


Will that work?

- 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:  Andrei Samardac
5950.3 In reply to 5950.2 
Hay Michael,
I'm talking about function "Show selected objects" that has Rhino just thought about it.

What I want to do:
I want to change the objects that should be hidden.

For example I have A,B,C,D - 4 objects.
B,C,D are hidden . C and D have the same name - object 1.
I want to exclude C and D from hidden objects and left C hidden.

So i thought to make script
1. Unhide all objects
2. Revert selection
3. Hide
This will swap hidden and unhiden objects.
*
Than I select objects with same name by using /* Extend selection to same names */
Than hide this object
*
And run script again

 

What you offer is partially what I wanted, but it would be clear for you to make exactly the same function as Rhino has - "Show selected objects"
  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
5950.4 In reply to 5950.3 
Hi Mir4ea, MoI does actually have a "Show selected objects" function already - you can activate it by holding down Ctrl while clicking on the Edit > Hide button.

When you do a Ctrl+click on that button it will do a "Show subset" type function, where it will first temporarily swap all hidden and shown objects, so you are temporarily viewing all hidden objects on screen only.

Then it prompts you to select which objects you want to show, and at this point you should be able to use any selection scripts you already have. Then when you finish that step (right-click in a viewport or push "Done"), everything will reset back and only those objects that you picked will get shown instead of everything getting shown.

Does that do what you need? It sounds like you already have a script set up for extending selection to objects with the same name as what is currently selected? Or do you need that also?


There's also another function in addition to that on Edit > Hide - if you right-click the Edit > Hide button it will do an "isolate" selection where it keeps only the currently selected objects to be displayed and hides all deselected objects. It remembers the hidden/shown state of all objects at the time of the isolate and then when you go do the isolate a second time it will restore that previous state.


So use Ctrl+click on the hide button to do "Show subset" (same as "Show selected objects" in Rhino I think as you are asking for), or right-click on it to do "isolate selection", as additional functions to the just plain hide/show that you get on a regular left click on that button.

- 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:  Andrei Samardac
5950.5 In reply to 5950.4 
Wow!
never know about ctrl+hide button, yes it's absolutely what I wanted!
What is the script to assign shortcut to it?

Yes I have script "extend selection to objects with the same name"

Thanx!
  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
5950.6 In reply to 5950.3 
And if you want to put the "Show subset" function on a shortcut key instead of using Ctrl+click on the Hide button, set the following as the command part of the shortcut key:

script: /* Show subset of hidden objects */ moi.geometryDatabase.showSubset();


Originally in MoI the main basic "Show" function (by just plain left click on Edit > Hide with nothing selected) worked like this, but too many people got confused at the temporary switch between all hidden and displayed objects so it got moved to an auxilary function by Ctrl click instead.

(EDIT: posted at the same time you were posting above....)


- 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:  Andrei Samardac
5950.7 In reply to 5950.6 
Yep,
Thanx 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:  Andrei Samardac
5950.8 In reply to 5950.7 
Using extend selection to names or styles, to deselect objects from hidden I can work very effective, like I have layers.
It's super cool!
  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
5950.9 In reply to 5950.8 
Hi mir4ea, I'm glad that is working well for you!

I've basically tried to avoid using "traditional" layers in MoI because they're very inflexible. For example in Rhino try the following - draw several circles and put them on different layers. Now go to the layer manager and hide some of those layers so that some circles are hidden. Now try doing "ShowSelected" - notice how it doesn't work to show those currently hidden circles, Rhino just says "No objects are hidden", when in reality many objects are actually hidden because their layers are hidden.

That's because Rhino has basically 2 competing hide/show mechanisms, an "object level" hide/show which Hide, Show, and ShowSelected work with, and layer hide/show which takes precedence over object-level hiding. So once a layer is turned off, there is no way to show an object on that layer by an object-level command, you have to turn on the layer in order for the object to be shown but that will also show any other objects on that same layer as well. There isn't a built-in way in Rhino to actually show one single specific object only if you have also turned off some layers...

So that kind of problem is why I've avoided that exact same system in MoI - MoI really only has "object level" hide/show where the hidden state is a property of individual objects. You can work with batches of objects by using the scene browser, but the scene browser actions and plain object hide / show / showsubset can work in combination with one another rather than having 2 totally different systems competing with each other.

- 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:  Andrei Samardac
5950.10 In reply to 5950.9 
Yes I understood and you make it good, software have to have only one hiding system to not confuse user.
Last couple of days I'm learning Rhino, by this tutorial http://www.infiniteskills.com/training/learning-rhino-5.html and just finished this tutorial
Learned a lot of stuff.. Have to note I never know about curve from two points command and was very proud to find it in MOI (isect command).
I have to say you make GREATE job simplifying Rhino and grouping commands bravo!!!. I can not work in rhino after MOI because it too slow I mean a lot of commands it has and it takes a lot of time go through all that menus or typing. And great thing about moi is Boolean with curves! Super cool! And selecting ages and faces directly.
As I said you maid great JOB! Rhino is very powerful but it makes it very hulking.
  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:  Andrei Samardac
5950.11 In reply to 5950.10 
One thing I'd like to see in Moi is Blend command with the same functionality as in Rhino.
  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
5950.12 In reply to 5950.10 
Hi mir4ea, thanks, I'm glad that you like the simplification work that's been done for MoI!

I'm really familiar with the ways that things can be awkward in Rhino, since I'm the one that started Rhino many of the issues in it are my fault to begin with and early on with MoI I really focused on improvements in some fundamental areas, especially snapping and selection.

And yeah the sort of overall "structural philosophy" is very different between Rhino and MoI - in Rhino I tried to make each individual command to be more narrowly focused on a specific thing and more simple itself, which does lead to a certain kind of simplicity at the individual command level but the end result is a huge number of different commands which becomes difficult to manage in various ways, just too much stuff to sort through at too high a level in the UI. In MoI I've got a big focus on instead having a smaller number of more powerful individual commands that do different things depending on what is selected. There is kind of a tradeoff with this because it means some things are more hidden initially but that also gives a kind of more natural ramp up path where you can get more things done with the same UI as you get more advanced and familiar with things.

It was also a big priority to have a more modern type of UI that had real dialog controls for options rather than a totally text-oriented command line type UI like Rhino has, which is really unfamiliar to a lot of people these days. The command-line type interface can also be a real hindrance in certain ways because it only allows for sort of one input field at any time, like in MoI when you're drawing a rectangle you have both a "width" and a "height" field showing at the same time both of which update while your drawing.

The Rhino UI is based on AutoCAD and does work really well for people who have an extensive AutoCAD background. It's pretty weird for people who have never used AutoCAD before though.

- 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:  Michael Gibson
5950.13 In reply to 5950.11 
> One thing I'd like to see in Moi is Blend command with the same functionality as in Rhino.

It's still on my target list for v3.

- 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:  Frenchy Pilou (PILOU)
5950.14 In reply to 5950.12 
<< many of the issues in it are my fault
You were very young at this date! :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  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:  Mauro (M-DYNAMICS)
5950.15 In reply to 5950.14 
<<You were very young at this date!

...mistakes of youth....but now we can say he's grown up very well ! :-)
  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