SketchUcation Plugin Store

 

 

[Plugin] Select by Material, and Hide All Unselected

[Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Fri Oct 01, 2010 7:19 pm

This is my first plugin, so go easy on me.

It has 3 basic functions:

1. It will select all entities within the active workspace that are painted with the current material. If the current material is the default, it will select all basic entities (but not groups or component instances). For now, the plugin doesn't look at UV, just material. Unlike the built-in SU tool, it also looks in sub-groups.

2. Hides all unselected items. This is handy if you only want to look at the items that are painted with a specific material.

Let me know how it works for you!

--
Karen
Please, register (free) to access all the attachments on the forums.
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby EarthMover » Fri Oct 01, 2010 8:37 pm

Nice work. Thanks Karen! :thumb:
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller
Some of my 3D crap
User avatar
EarthMover
Top SketchUcator
 
Posts: 1792
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Sat Oct 02, 2010 9:03 am

Thank you Karen, funny how one's first plugin is often simple and so good. :thumb:

one suggestion.. have you thought of a way of 'getting' the material under the cursor?
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Bob James » Sat Oct 02, 2010 10:05 am

This is exactly the tool I've been looking for :thumb:

BUT: I selected a material (clicked on it to make it the current material), clicked on "Material Selection" in the Plugins drop-down list....but nothing happens :shock:
The material I selected was within a group: is that the problem?
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 605
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Advanced

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Sat Oct 02, 2010 10:35 am

Bob, make the material active in the material browser
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Gaieus » Sat Oct 02, 2010 10:38 am

:thumb:
It can be ver useful when someone is modelling for GE for instance, too (like in this topic).
Models sometimes get rejected for "incomplete texturing" when the modeller misses to texture a face or two somewhere in the model.
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27608
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Sat Oct 02, 2010 2:01 pm

Thanks for all the positive feedback.

Bob - the tool should work to select materials within groups. However, if you are currently in component or group edit mode, it will only look at entities within the current workspace. Try exiting all components and running the plugin again. If this doesn't work, try it on a simple model... and let me know how it goes.

CadFather - I can add something like this... Just give me a few days. Weekends are for construction.

--
Karen
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Sat Oct 02, 2010 2:48 pm

thanks Karen and take your time..
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Bob James » Sat Oct 02, 2010 11:57 pm

In the attached picture I have:
1. Clicked on the tile material in the model
2. Noted that there are 46 faces with this material
3. Clicked on the tile material in the Material Editor
4. Clicked on Material Selection in the Plug-ins

Nothing selected-nothing hidden :?:
Please, register (free) to access all the attachments on the forums.
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 605
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Advanced

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Sun Oct 03, 2010 9:29 am

there are 2 menus in the plugins, one to select and one to hide - they don't work together at once

but it all works fine on my SU8, WinXP
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Sun Oct 03, 2010 10:59 pm

The more I think about the option to 'get' the material under the cursor, the less it makes sense to me to add it into the plugin. I really like the fact that you can choose a material from the materials browser for selection. This way, you can choose to select something that you don't want in your model (or can't find), such as unpainted surfaces.

If you left the current functionality, and added the ability to get the material under the cursor, this would add a step to the process, which makes it no better than doing the following:

1. Pick a material with the built-in SU picker
2. Select materials

Let me know what you think.

--
Karen
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Sun Oct 03, 2010 11:22 pm

Hi Karen, i was thinking it could be fast right-clicking and select by material - though this way works just fine
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Mon Oct 04, 2010 3:34 pm

Bob - I sent you a PM, asking to see the model you are having difficulty with. Did you get everything figured out?

--
Karen
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Ben Ritter » Mon Oct 04, 2010 4:19 pm

Karen, thank you. Great!
Ben Ritter
 
Posts: 351
Joined: Wed Nov 14, 2007 4:55 pm
Location: Malta, Illinois

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Ben Ritter » Mon Oct 04, 2010 4:41 pm

Karen,

I have the same problem as Bob. Other materials are not hiding. I'm using version 8. I tried it with the default entity Susan. Ben
Ben Ritter
 
Posts: 351
Joined: Wed Nov 14, 2007 4:55 pm
Location: Malta, Illinois

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Bob James » Tue Oct 05, 2010 6:34 am

Karen,
Thanks for the offer to look at my model, but I think I have it now:
So the sequence is to make the material active, use "Material Selection" and then use "Hide All Un-selected".

CadFather: I did not see the other entry in the plugin list: "Hide All Un-selected".

That's sort of an unusual approach. I would suggest that the "Material Selection" entry have a fly-out menu for the Hide option.
Please, register (free) to access all the attachments on the forums.
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 605
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Advanced

Re: [Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Wed Oct 06, 2010 1:45 pm

Bob (and CadFather),

I wanted to leave them separate because I thought 'hide all unselected' could be useful for other applications... But I think I can figure out a fly-out.

--
Karen
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby CadFather » Wed Oct 06, 2010 4:22 pm

i for one prefer them separate
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 790
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [Plugin] Select by Material, and Hide All Unselected

Postby McGyver » Thu Oct 07, 2010 5:21 am

You rock!! I'm finishing up a huge model and just this morning I was thinking I wonder if there is anything that could... well, do what this ruby does!! THANK YOU!! :berserk:
McGyver
 
Posts: 114
Joined: Wed Feb 04, 2009 5:46 pm

Re: [Plugin] Select by Material, and Hide All Unselected

Postby Bob James » Thu Oct 07, 2010 5:38 am

CadFather wrote:i for one prefer them separate

I yield to the power :D (As long as they stay together in the plugin list)
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 605
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Advanced

Re: [Plugin] Select by Material, and Hide All Unselected

Postby ahnvtk » Thu Dec 23, 2010 3:01 am

This is useful, thanks. :thumb:

One limitation: it seems as if this will only select faces with a material if both sides of the face contain the material. For inconsistently textured scenes that would mean the material is overlooked.. Maybe it could have two modes: one where it will select only faces with the material on both sides, and another that selects faces if the material is on either side?
ahnvtk
 
Posts: 14
Joined: Wed Sep 08, 2010 4:02 pm
Name: Alex

Re: [Plugin] Select by Material, and Hide All Unselected

Postby kwalkerman » Sat Feb 12, 2011 8:17 pm

Right now it looks only at the front side. I could do another run that looked at the back side, if that would help?
kwalkerman
 
Posts: 135
Joined: Mon Feb 08, 2010 9:48 pm
Name: Karen

Re: [Plugin] Select by Material, and Hide All Unselected

Postby ahnvtk » Fri Jul 08, 2011 10:06 pm

kwalkerman wrote:Right now it looks only at the front side. I could do another run that looked at the back side, if that would help?


(Extremely late in reply - sorry)

Yeah, that would help - and then two options or modes depending on the result. 1) If the material on the back side is the same as the front, group it with everything else that has that material. or, 2) If the material on the back side is different, group it separately (in a group with all faces that have this back/front combination). That would be great.
ahnvtk
 
Posts: 14
Joined: Wed Sep 08, 2010 4:02 pm
Name: Alex

Re: [Plugin] Select by Material, and Hide All Unselected

Postby OG1 » Sat Aug 06, 2011 12:38 am

I know it's been a while since this topic was started and posted in, but I just had to say THANK YOU!!! This plugin has saved me from going more mental! The meshes I make need to be low poly, so using both sides of a face is mandatory! It usually has a different texture on each side. After I export my mesh, the editor I work in reports if I have unpainted faces and prevents me from continuing with my submission. I sometimes go bonkers trying to find the unpainted faces. They are usually small faces, faces that shouldn't even be on the mesh, or like the post in the other thread, "couldn't see the forest through the trees"! :)

The one thing I couldn't do, was to unhide the faces I hid, without doing the 'Undo'. (unless I missed something?) Anyways, not a problem doing that, since this plugin has just saved me hours, if not days, trying to find those little buggers.

Sorry for the long reply, but I am extremely grateful and thankful for this plugin, as with all the others in here that make my life easier. This one just made me saner! Thank you!!!
I got my bill for paying attention. I got robbed!
OG1
 
Posts: 15
Joined: Wed Oct 14, 2009 5:46 am
Name: Mary

Re: [Plugin] Select by Material, and Hide All Unselected

Postby dereeei » Mon Oct 31, 2011 8:45 am

Nice one! And useful !
It would be neat to have some visual clues about where is the selected "thing", like thomthom's Solid Inspector. In this way, it would me much easier to navigate in the place. On a large model, to hide everything is a time-consuming operation. Also, to unhide everything after that is nasty, if there are a lot of nested entities.
dereeei
 
Posts: 564
Joined: Tue Nov 16, 2010 1:48 pm
Name: derei

Re: [Plugin] Select by Material, and Hide All Unselected

Postby McGyver » Thu Nov 24, 2011 5:50 pm

I probably should of mentioned this a year ago... this is probably a Mac issue. Following the above directions, I can not get this plugin to work. Big models (over 16 MB) crash SU 8 and 6 when activating "Hide unselected"... and in general the plugin either only highlights the edges of the wrong material (randomly) or hides the entire model with a randomly chosen material deselected, but still hidden.
I'm guessing this is a Mac (intel core 2 duo running OS 10.5.8 ) issue, since nobody else has reported anything similar in over a year.

I'm not complaining, I just thought you might want to know about it... sorry I did not post this earlier, I was very busy when I had tried it and when it did not work... I sort of moved on and forgot about it... Sorry.
Please, register (free) to access all the attachments on the forums.
McGyver
 
Posts: 114
Joined: Wed Feb 04, 2009 5:46 pm

Re: [Plugin] Select by Material, and Hide All Unselected

Postby sauerkrauten » Wed Feb 13, 2013 10:06 am

McGyver wrote:You rock!! I'm finishing up a huge model and just this morning I was thinking I wonder if there is anything that could... well, do what this ruby does!! THANK YOU!! :berserk:


+1 :D
Great plugin Karen, very useful on large models.

Huge thanks :enlight:
sauerkrauten
 
Posts: 2
Joined: Wed Feb 23, 2011 8:40 pm
Name: sauerkrauten

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Vertex Tools for SketchUp. Take control over each vertex with this vertex editor for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: artzavil, bla bla, Gorin21, HAL, IntraLogiStix , meocram, mrsam_007, mvinbar, T774AM12RUS, viga1978 and 18 guests