Selecting all components within a component
-
Use the Outliner ?
It's possible to make multiple selections within the same context [+Ctrl] -
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
unless file_loaded?((__FILE__)) UI.add_context_menu_handler do |menu| sel = Sketchup.active_model.selection if sel.first.is_a?(Sketchup;;ComponentInstance) menu.add_separator menu.add_item('Colour Nested Components') { sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci| ci.material=Sketchup.active_model.materials.current } } end end file_loaded((__FILE__)) end
-
@tig said:
Use the Outliner ?
It's possible to make multiple selections within the same context [+Ctrl]Where do I find the outliner tool?
-
@sdmitch said:
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
unless file_loaded?((__FILE__)) > UI.add_context_menu_handler do |menu| > sel = Sketchup.active_model.selection > if sel.first.is_a?(Sketchup;;ComponentInstance) > menu.add_separator > menu.add_item('Colour Nested Components') { > sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci| > ci.material=Sketchup.active_model.materials.current > } > } > end > end > file_loaded((__FILE__)) > end >
Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store
-
-
@larv said:
@sdmitch said:
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
unless file_loaded?((__FILE__)) > > UI.add_context_menu_handler do |menu| > > sel = Sketchup.active_model.selection > > if sel.first.is_a?(Sketchup;;ComponentInstance) > > menu.add_separator > > menu.add_item('Colour Nested Components') { > > sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci| > > ci.material=Sketchup.active_model.materials.current > > } > > } > > end > > end > > file_loaded((__FILE__)) > > end > >
Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store
Yes it is a "plugin" and needs to be loaded or copied to the Plugins/Extensions folder
-
@sdmitch said:
@larv said:
@sdmitch said:
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
unless file_loaded?((__FILE__)) > > > UI.add_context_menu_handler do |menu| > > > sel = Sketchup.active_model.selection > > > if sel.first.is_a?(Sketchup;;ComponentInstance) > > > menu.add_separator > > > menu.add_item('Colour Nested Components') { > > > sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci| > > > ci.material=Sketchup.active_model.materials.current > > > } > > > } > > > end > > > end > > > file_loaded((__FILE__)) > > > end > > >
Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store
Yes it is a "plugin" and needs to be loaded or copied to the Plugins/Extensions folder
Thanks I will try it
EDIT: I put the file in the pluginsfolder, restarted sketchup, but its not there when I right-click on a group or component containing other groups or components.
-
@tig said:
Use the Outliner ?
It's possible to make multiple selections within the same context [+Ctrl]OK, thanks I found it. It seems to be an easy way to select different groups within a model, but I didn´t find a way to select everything and change the colour.
I think SDMitch plugin tip is just what I need! Going to check that out
-
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
It doesn't appear in the context menu because, as written, it only recognizes right clicks on components which what you asked for. Also, it will find only components in the component selected. Do you want it to treat groups and components equally?
-
@sdmitch said:
@larv said:
If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
It doesn't appear in the context menu because, as written, it only recognizes right clicks on components which what you asked for. Also, it will find only components in the component selected. Do you want it to treat groups and components equally?
Yes, that would be great. When dowloading models there´s often a mixture of groups and components.
Personaly I cant really tell the difference between the two and usually just click on "make component". -
@larv said:
Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
Global Material Changer
http://sketchucation.com/forums/viewtopic.php?p=96863#p96863 -
@numerobis said:
@larv said:
Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.
Global Material Changer
http://sketchucation.com/forums/viewtopic.php?p=96863#p96863Oh man... I HAVE that plugin, been using it alot, but I never noticed the "ANY" (=all) selection. So thanks alot! perfect
Advertisement