disableVertexCacheAnimation

snippets/disableVertexCacheAnimation.py
 1# © 2024 Autodesk, Inc. All rights reserved.
 2
 3def enableVertexCache( node, state):
 4    if node.hasAttachment("AnimAttachment"):
 5        animAttachment = node.getAttachment("AnimAttachment")
 6        animRootId = vrFieldAccess(animAttachment).getFieldContainerID("animationRoot")
 7        animRoot = vrNodePtr(animRootId)
 8        for childIdx in range(animRoot.getNChildren()):
 9            childNode = animRoot.getChild(childIdx)
10            if childNode.getType() == "TimeShapeCache":
11                childNode.setActive(state)
12            
13node = findNode("Tuch")
14enableVertexCache(node, false)