Select by colour - ruby?
-
hello,
i use the SELECTOR for selection by geometrydoes anybody know a ruby for SELECTION BY COLOUR ?
thanx stan
-
You can rightclick on a color in the material browser to get a select option...
-
It's built into the Materials Browser context-menus, but that only selects faces in the current active context that use the chosen material, ignoring any groups, instances, edges, text etc using the material.
This one-liner copy/pasted+<enter> in the Ruby Console will select everything using the material specified by name - edit the 'mname=' to suit the material you seek...
mname="Material1";m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.each{|e|s.add(e)if e.respond_to?(;material) && e.material && e.material.display_name==mname}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement