how to get viewport color to match layer color after applying material

how to get viewport color to match layer color after applying material

Anonymous
Not applicable
1,369 Views
3 Replies
Message 1 of 4

how to get viewport color to match layer color after applying material

Anonymous
Not applicable

hi, i'm new to 3dsmax and just made a model with several layers and the viewport shows the color of the layer the object is in, which is what i want

 

then i started applying materials to some objects an the object in the viewport color changed to the material

 

but now i want it back to the layer color, but i want to keep the material for rendering

i can't figure out how to get the viewport to display layer color again

 

thanks

 

 

 

0 Likes
Accepted solutions (1)
1,370 Views
3 Replies
Replies (3)
Message 2 of 4

10DSpace
Advisor
Advisor
Accepted solution

@Anonymous 

 

There may be some confusion about terminology here, but I will address what I think you mean which is how to toggle between the display in the viewport of an object's color and it's material once it has an assigned material.  There is a toggle to do this in the display menu:

 

 object Color vs Material color.png

 

The toggle is for the entire scene and not just the selected object.   

 

Regarding terminology, Layer Explorer shows in the Color column, the color of the individual objects in a layer as well as the layer color.  These can be set separately.  Hope this is clear. 

Message 3 of 4

Anonymous
Not applicable

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

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

that's exactly what i needed, thanks