Is anyone aware of an internal MEL/Python command or flag that will return all Nodes that would be counted as “Polygon Construction History”?
Nodes like “polySplit” or “polyMapSewMove”?
This is what I am currently doing:
constructionHistoryNodes = [
'polySplit', 'deleteComponent', 'polyAutoProj', 'polyCollapseEdge',
'polyDelEdge', 'polyExtrudeFace', 'polyMergeVert', 'polyMoveFace',
'polySoftEdge', 'polySplitRing', 'polyMapSewMove', 'polyColorPerVertex',
'polyTweak', 'materialInfo', 'polyAppend', 'polyBevel', 'polyBridgeEdge',
'polyCloseBorder', 'polyCreateFace', 'polyCube', 'polyCut',
'polyCylinder', 'polyExtrudeEdge', 'polyMapDel', 'polyNormalPerVertex',
'polyPlanarProj', 'polyPlane', 'polyPoke', 'polySplitVert',
'polySubdEdge', 'polyTriangulate', 'polyTweakUV', 'transformGeometry',
'rigidSolver', 'groupId', 'groupParts', 'polyColorMod', 'blendColorSets',
'polyNormal', 'polyUnite', 'polyChipOff', 'polySeparate']
historicalNodes = list(set(cmds.ls(type=constructionHistoryNodes)))
Obviously this has problems because the list may not be complete. But if i had a way to get all the nodes, I wouldn’t need the list in the first place!
The reason I need this information is because we have Maya files where there exists a large number of these nodes that are orphaned, i.e. no longer part of a construction history chain. Maya’s native Optimize Scene Size does not catch and remove these nodes, so i am looking for them myself.