针对有skin的模型进行批量去除顶点色和去除2U的操作

针对有skin的模型进行批量去除顶点色和去除2U的操作
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                  --去顶点色
             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]
             )
         )

2u