ScriptSpot

Script

selected by wirecolor

By k.asa · Credited author: asa · 2009-01-28

Version requirement
Max2009
Votes
12

Tags: selected by wirecolor

Description

Hi all,

I was wondering if there is already a script or you have a simple solution for the following:

I want to select some objects (A) by other object(B) that has the same color as the objects (A).
(Max file have any wirecolr objects in sceen.)

Sorry I'm not good at English.

best regards.

Comments (7)

only for visible obj?

tarsonis · 2017-07-28

Hey there. Thanks for the code. Unfortunetly it also selects obj that are hidden by layer. I tried to write a function "where not a.ishidden" but it doesn work. Anyone able to help.

Would need the part where it sees what is visible/or not hidden and then selects by wirecolor
i = $.wirecolor
select (for o in objects where o.wirecolor == i collect o)

slimatron · 2010-08-24

even simpler:

max select by color

fajar · 2009-06-19

rollout Selec "Select"
(
button one "Select by Color"
on one pressed do
if selection.count== 1 then
(
i = $.wirecolor
select (for o in objects where o.wirecolor == i collect o)
)
else
(
messageBox "Select only one objct please" Title: "Selection Error..."
)
)
createDialog selec

inspired by MartinSkinner
I just make a dialog

VegeBird · 2009-01-28

hi... use the tool at the toolbars --
Edit > select by > Color

or you can assign shortcuts the "select by color " tools.

vsai · 2009-01-28

You can also select by wirecolor in the same dialog where you SET the wirecolor for an object manually, there is a small button with 4 little blocks on it that will select all of the same color object you have currently selected.

 

its a bit hidden.

 

horrible explanation, oh well!

martinskinner · 2009-01-28

hi, should be easy enough. run the following lines seperately in the Maxscript listener.

with first object selected run:-

i = $.wirecolor

then run:-

select (for o in objects where o.wirecolor == i collect o)

this will select all objects with wirecolor of the original selected object.

k.asa · 2009-01-28

thank you for your kindness.
i successfully did it !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!yes!

best regards k.asa