针对有skin的模型进行批量去除顶点色和去除2U的操作
针对有skin的模型进行批量去除顶点色和去除2U的操作
1 sel = getCurrentSelection() 2 for a =1 to sel.count do 3 ( 4 if sel[a].modifiers[#skin] != undefined then 5 ( 6 channelInfo.ClearChannel sel[a] 0 --去顶点色 7 modPanel.setCurrentObject sel[a].baseObject --回到最底下层级 8 modPanel.addModToSelection(UVW_Mapping_Clear ()) --再加修改命令 9 deleteModifier $ 1 --再删除最上面的 10 maxOps.CollapseNodeTo sel[a] 2 off --塌陷到下方 11 ) 12 else 13 ( 14 channelInfo.ClearChannel sel[a] 0 15 converttopoly sel[a] 16 ) 17 ) 18 sel = getCurrentSelection() 19 for a=1 to sel.count do 20 ( 21 if sel[a].modifiers[#skin] != undefined then 22 ( 23 channelInfo.ClearChannel sel[a] 2 --去顶点色 24 modPanel.setCurrentObject sel[a].baseObject --回到最底下层级 25 modPanel.addModToSelection(UVW_Mapping_Clear ()) --再加修改命令 26 deleteModifier $ 1 --再删除最上面的 27 maxOps.CollapseNodeTo sel[a] 2 off --塌陷到下方 28 ) 29 else 30 ( 31 channelInfo.ClearChannel sel[a] 2 32 converttopoly sel[a] 33 ) 34 )