Forum
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Remove vertex colors from garment processor meshes 8 months 3 days ago #535

  • admin
  • admin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 157
  • Thank you received: 20
The garment processor adds vertex colours to the meshes to make it easier to check detail assignments. Unfortunately that bloats the scene file size by 5-10x making load and save very slow. Once you have sorted the detail assignments, then run this script to strip out the vertex colours.

WARNING - once you have run this script do not enable stage 5 colour again as it may crash your scene. You can still reassign details with stage 5, but once you have run this script please DO NOT enable colours again.

Select deformerGeometry and run this python script:
import maya.cmds as cmds
sl = cmds.ls(sl=True)
ch = cmds.listRelatives(sl, children=True, allDescendents=True, type="mesh")
for s in ch:          
    conn = cmds.listConnections((s + ".inMesh"), d=False, s=True, sh=True, type="polyColorPerVertex")          
    if conn is not None:                  
        cmds.delete(conn)          
    cmds.select(s)          
    csets = cmds.polyColorSet(q=True, allColorSets=True)         
    if csets is not None:     
        for cset in csets:                          
            cmds.polyColorSet(delete=True, colorSet=cset)

If you have any questions about this script please start a topic below.
 
Last edit: by admin.
The topic has been locked.
  • Page:
  • 1
Time to create page: 0.046 seconds