Hello~ This Script May Help you
Copy The code Below into Text then Change the Suffix type to .ms (Max Script)
Then Drag it into 3DSMax and Release
it will display a Dialog named "LayerManager" includ 3 button
1 "DeleteEmptyLayer" Used for Old Version
2 Select the Other Objects in the Same Layer with the Object You're Selecting
if Objects You're Selecting is in two or more Different Layers . They will Select All of them too
3 This is your wanted
Select the Object you want to Turn the Wire Color as LayerColor
Then Click the 3rd Button , Turn is On the Function Will Activate
Of Cause , to get the Final effect you want ,you need swich the Display Mode to Object Color as the Bro in 2 Level said.
rollout ET_LayerM "图层管理" width:114 height:70
(
local T_SelArray = #()
button DEmptyLayer "删除空图层" pos:[2,2] width:75 height:20 toolTip:"快速清理空图层\n右键:可将清理空图层加入右键菜单图层"
button SelectLayerByNow "全选图层包含物体" pos:[2,24] width:110 height:20 toolTip:"按当前选择物体全选其所在图层的所有物体"
checkbutton SwicthColorByLayer "切换图层线框色" pos:[2,46] width:95 height:20 toolTip:"将物体的线框色转为所属图层的颜色\n右键:随机图层线框色"
on ET_LayerM open do
(
T_SelArray = selection as Array
for i in selection do
(
if SwicthColorByLayer.state == on then
(
i.colorByLayer = true
T_SelArray = #()
append T_SelArray i
)
else
(
i.colorByLayer = false
T_SelArray = #()
append T_SelArray i
)
)
)
on ET_LayerM close do
(
T_SelArray = selection as Array
for i in T_SelArray do i.colorByLayer = false
)
on DEmptyLayer pressed do
(
ET_DeleteEmptyLayer()
)
on DEmptyLayer rightClick do
(
AddItemToQuadMenu (#nonePressed) "Default Viewport Quad" 1 "ET_DEmptyLayer" "ET_Tool" 7
)
on SelectLayerByNow pressed do
(
if selection != undefined do
(
for i in selection do
(
local S1 = i.layer.name
local S2 = LayerManager.getLayerFromName S1
S2.select on
)
)
)
on SwicthColorByLayer changed state do
(
T_SelArray = #()
for i in selection do
(
if SwicthColorByLayer.state == on then
(
i.colorByLayer = true
T_SelArray = #()
append T_SelArray i
)
else
(
i.colorByLayer = false
T_SelArray = #()
append T_SelArray i
)
)
)
on SwicthColorByLayer rightclick do
(
for i = 0 to layerManager.count-1 do
(
nowLayer = layerManager.getLayer i
nowLayer.wireColor = color (random 60 240) (random 60 240) (random 60 240)
nowLayer.backfacecull = true
)
)
)
Createdialog ET_LayerM