3dmax 去除顶点色去除alpha去除2U ,模型优化,一键处理

这篇博客介绍了一个MaxScript脚本,用于3ds Max中批量清除选定对象的颜色、Alpha通道和UV2通道,简化了模型整理过程。只需在3ds Max安装路径的scripts文件夹下运行脚本,配合选择模式进行操作。
摘要由CSDN通过智能技术生成

上区别图
在这里插入图片描述
上工具图
在这里插入图片描述
上码

function ColorAlphaClear =
	(
	  
			sel = getCurrentSelection()
			for a =1 to sel.count do
				(
					if sel[a].modifiers[#skin] != undefined then
						(
							channelInfo.ClearChannel sel[a] 0                --去顶点色
							modPanel.setCurrentObject sel[a].baseObject      --回到最底下层级
							--modPanel.addModToSelection(UVW_Mapping_Clear ()) --再加修改命令
							deleteModifier $ 1                               --再删除最上面的
							maxOps.CollapseNodeTo sel[a] 2 off                --塌陷到下方       
							)
							else 
							(
								channelInfo.ClearChannel sel[a] 0
								converttopoly sel[a]
							)
				)
							sel = getCurrentSelection()
			for a =1 to sel.count do
				(
					if sel[a].modifiers[#skin] != undefined then
						(
							channelInfo.ClearChannel sel[a] -2                --去Alpha
							modPanel.setCurrentObject sel[a].baseObject      --回到最底下层级
							--modPanel.addModToSelection(UVW_Mapping_Clear ()) --再加修改命令
							deleteModifier $ 1                               --再删除最上面的
							maxOps.CollapseNodeTo sel[a] 2 off                --塌陷到下方       
							)
							else 
							(
								channelInfo.ClearChannel sel[a] -2
								converttopoly sel[a]
							)
				)
			sel = getCurrentSelection()
			for a=1 to sel.count do
				(
				 if sel[a].modifiers[#skin] != undefined then
					(
						--channelInfo.ClearChannel sel[a] 2                  --去uv2
						--modPanel.setCurrentObject sel[a].baseObject        --回到最底下层级
						--modPanel.addModToSelection(UVW_Mapping_Clear ())  --再加修改命令
						--deleteModifier $ 1                               --再删除最上面的
						--maxOps.CollapseNodeTo sel[a] 2 off                --塌陷到下方
					)
					else 
						(
							--channelInfo.ClearChannel sel[a] 2
							--converttopoly sel[a]
						)
					)
			messagebox("ok")
		
	)
rollout cn_rollout "ColorAplhaClear"
(	

	button createNormalsButton "ok" width:150
	button aboutButton "about" width:150
	
	on createNormalsButton pressed do 
	(
		ColorAlphaClear()
	)
	on aboutButton pressed do 
	(
		message = StringStream ""
		format "Selected Mode ColorAlphaClear\...................." cn_rollout_VERSION to:message
		messageBox message
	)
)
	
if cn_floater != undefined then CloseRolloutFloater cn_floater
cn_floater = newRolloutFloater "ColorAlphaClear" 200 100
addRollout cn_rollout cn_floater


使用方法简述一下:
放代码在3dmax安装路径 如:D:\Program Files\Autodesk\3ds Max 2014\scripts 下
3dmax种选择 maxscript/运行脚本 选择此脚本

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值