Hide/unhide rest of model


When I’m editing a nested component/group inside a component/group the ‘hide rest of model’ works only for the complete model. It toggles the complete model on of off.

Is it possible to toggle between ‘show rest of component’ on/off instead of ‘show rest of the complete model’ when editing a group or component?

This is a time saver because I can see exactly what I’m doing when editing a nested group inside a component because it shows me what else is inside this component.


1 Like

As an alternative, maybe you could create a layer for the mother component, create a scene which only has that layer visible, and then have neither other components nor the rest of the model hidden. That should show all of the child components together without pieces disappearing as you edit deeper into the nestings.

I definitely agree, this would be a really great option to add. Many times when editing a nested group or component, you only want to see the parent of that group or component for reference and not the entire model. Hope this becomes an option!

This frustrated me as well. I use Shift-H as a shortcut for Hide Rest of Model, which is usually very convenient (even in the midst of drawing geometry). But sometimes there is just too much other junk in the way in the complete model. I would often rely on x-ray vision to “peer through” the unrelated junk to find reference geometry, but that can be challenging. I don’t really think about layers for handling this, since I use them more to group conceptual entities independent of their nesting (e.g. “furniture”, “people”, “building”).

What I really wanted was similar to what you ask for: the ability to hide the rest of the model except everything up to the top level of this opened and active group or component. I.e. not just leaving parents visible, but grandparents and so on up to the root of the tree. E.g. in an outline of:

  • Component 1
    • Group 1
    • Group 2
      • Component 3
      • Group 3
  • Component 3
    • Group 4
    • Group 5
  • Group 6
  • Group 7

If I was say actively editing Group 5, I could toggle Component 1, Group 6, and Group 7 to hidden, leaving Component 3 visible. And toggle them back again. So I wrote the attached plugin which does just this.

Just drop it in your Sketchup’s plugin folder. You’ll see a new menu item in Extensions. I personally assign it to Control-Shift-H. If you run it deep inside a hierarchy, it will hide every container at the top level that is not a direct ancestor of the current group or component. It leaves everything on hidden layers alone. If you back out to the top level without unhiding (by clicking, Esc key, etc.), it will unhide all top level containers for you. And if you directly open other nested geometry under another top-level ancestor while the option is active (e.g. from the outliner), it will reapply it. Probably easiest just to try it to get the gist.

I find it incredibly useful to toggle visibility of both rest-of-model and only-this-context-up-the-tree. Obviously, if you have all your entities in a single top level group or component, it won’t be useful. But then again that style of hierarchy isn’t so useful anyway.

Hope people enjoy!

hide_others_toplevel.rb (2.1 KB)

You can save out the component to a file and edit that file with the rest of model shown. This also increases performance, reduces clipping and makes orbit work better.

1 Like

Fantastic, thank you!! I’ve been using this for a short while and it definitely speeds up my drawing.

If possible, I would love to see one alternative: Is it possible to alter the plugin so that instead of showing the entire parent tree, it only shows the immediate parent? (or perhaps the parent + grandparent)?

The reason I ask is that because of the way we use nested groups/components(each of our top-level components has a whole lot of stuff nested inside), there can still be a lot of geometry obscuring the viewing area even when using your plugin.

Thanks again for making this, cheers.

It’s a good suggestion, and similar to the idea I had originally, but it’s rather more complicated to implement. First, you can’t hide your parent/grandparent (or any ancestor for that matter), since hidden status is inherited down the tree. But you can certainly hide all the unimportant aunts/uncles, great aunts/uncles, etc.

I ended up with the attached plugin. It’s a substantial enough change that I renamed it to HideMoreLess.


  • Instead of a single command, there are now 2, under EditHide Less and Hide More. I bind them to Ctrl - and Ctrl +, but of course you could pick anything.
  • One invocation of Hide More functions just like the original plugin: it hides all non-ancestor top level groups/components (only, bare geometry is left alone). An additional invocation of Hide More then goes one level deeper (with feedback in the status window), and so on, until you hit the maximum depth, which is reported.
  • To unhide, you can Hide Less, or simply close the component. Closing all the way out to the top level disables and unhides everything which HideMoreLess hid.
  • Jumping directly from one deeply nested component to another on a completely distinct path (e.g. in the Outliner), will reapply the existing depth setting (up to the maximum).
  • Anything which is already hidden will be left alone, so that unwanted hidden components don’t reappear.
  • Models are independent, so you can have different hide depths on different models at the same time (on Mac).

My complete bindings:

  • Shift-h Hide Rest of Model
  • Ctrl-Shift-h Hide Similar Components
  • Ctrl - Hide Less
  • Ctrl + Hide More

I find this set really convenient. Sometimes you want to work only on the group or component at hand. But sometimes you need more context. If you toggle “rest of model” back on (Shift-h) and find it’s TMI, a quick Ctrl + or two will clear the unrelated stuff away and drill down to just the surrounding context. It can even be useful to invoke during drawing/measurement actions: alternate between a bit more and then less context to reveal the geometry of interest. It really shines when you nest down fairly deeply: 5 levels or more. It will probably be most useful when components that are nearby in the hierarchy are physically close together.

One remaining issue that I haven’t worked out is that saving the model seems to close, and then reopen, all open entities. I’m not sure if this is a known behavior (though I guess I had noticed any time you open a file in Sketchup, you sit at the top level: no groups/components are open, independent of how it was when you saved). This component closing of course triggers the onClose observer events, which has the result of disabling the hidden state.

In some ways this is a good thing: saving a model with many things hidden that have to be manually unhidden is a pain (the hide depth can’t be saved with the file). But it means that after each save, you have to Hide More however many times to get back to where you were. I’ve tried to work around this with ModelObserver's onPreSaveModel, but that seems to arrive too late, after all entities are closed and then reopened. Probably it’s not that problematic unless you have really deep nesting, but if anyone has any ideas on how to catch Sketchup before it closes/reopens all the open components during a Save, I’d appreciate hearing.

hide_moreless.rb (5.7 KB)


Awesome! I really appreciate all the effort and the response here. I probably won’t be able to give this a full try for a couple of days, but from the sounds of it it will be very useful. Thanks also for the explanation of sketchup’s behavior (i.e. hidden state is inherited from parents) as I really don’t know anything about the inner workings.

We often have a couple of large top-level components, each with fairly deep nesting and lots of aunts/uncles. I’ll have to count them up some time out of curiousity.

The fact that saving the model disables the hidden state is fine for my current use -we have several folks who at times might be working in the same model, so that way I don’t have to try and figure out what the other designers were up to when I open one of their models.

Hi, It is so nice to see a beautiful extension to use, but unfortunately I am doing something wrong i believe and I am getting error message when I install thru Extension manager. My steps,
1- I placed the .rg file to plugins folder
2- ziped and renamed as .rbz
3- I do not know if it installs or not but i try to install thru Ext. manager and I am getting error here.
I hope I can able to use this extension.

The mentioned file should be .rb . …and a way as you are installing a kind of “dirty”, but can be done. However I did not checked this particular file.

If you placed the .rb file to your plugins folder, you do not need to do anything else, just restart Sketchup.

1 Like

This was my method as well. Works for 2020 just fine.

Some methods of zipping are apparently producing incompatible .rbz files (depending on the directory structure they create). I have a new release of HideMoreLess which disables “hide rest of model” automatically when invoked, and (more significantly) reapplies the hidden status after Save occurs (including auto-save); see https://github.com/jdtsmith/hidemoreless. The latter was rather challenging since Save Observers fire after the active path is closed.

I’ll try to get it in the Extension Warehouse at some point to simplify install, but for now you can make your own zip or drop in plugins directly.

you can use zip in Terminal.app to create .rbz on a mac…

there are flags for excluding content in the zip and in the sub folder…