selected by wirecolor

12 votes
Author Name: 
asa

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.

Version Requirement: 
Max2009
Video URL: 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tarsonis's picture

only for visible obj?

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's picture

even simpler: max select by

even simpler:

max select by color

fajar's picture

rollout Selec

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's picture

hi... use the tool at the

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

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

vsai's picture

You can also select by

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! 

k.asa's picture

thank you for your

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

best regards k.asa

martinskinner's picture

hi, should be easy enough.

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.