|
@@ -1,7 +1,6 @@
|
|
|
"""
|
|
|
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
|
|
its licensors.
|
|
|
-
|
|
|
For complete copyright and license terms please see the LICENSE at the root of this
|
|
|
distribution (the "License"). All use of this software is governed by the License,
|
|
|
or, if provided, by the license below or the license accompanying this file. Do not
|
|
@@ -27,7 +26,10 @@ def get_mesh_node_names(sceneGraph):
|
|
|
nodeContent = sceneGraph.get_node_content(node)
|
|
|
if nodeContent is not None and nodeContent.CastWithTypeName('MeshData'):
|
|
|
if sceneGraph.is_node_end_point(node) is False:
|
|
|
- meshDataList.append(sceneData.SceneGraphName(sceneGraph.get_node_name(node)))
|
|
|
+ nodeName = sceneData.SceneGraphName(sceneGraph.get_node_name(node))
|
|
|
+ nodePath = nodeName.get_path()
|
|
|
+ if (len(nodeName.get_path())):
|
|
|
+ meshDataList.append(sceneData.SceneGraphName(sceneGraph.get_node_name(node)))
|
|
|
|
|
|
# advance to next node
|
|
|
if sceneGraph.has_node_sibling(node):
|
|
@@ -54,17 +56,7 @@ def update_manifest(scene):
|
|
|
meshGroup['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, sourceFilenameOnly + chunkPath)) + '}'
|
|
|
sceneManifest.mesh_group_add_comment(meshGroup, 'auto generated by scene manifest')
|
|
|
sceneManifest.mesh_group_add_advanced_coordinate_system(meshGroup, None, None, None, 1.0)
|
|
|
-
|
|
|
- # create selection node list
|
|
|
- pathSet = set()
|
|
|
- for meshIndex in range(len(meshNameList)):
|
|
|
- targetPath = meshNameList[meshIndex].get_path()
|
|
|
- if (activeMeshIndex == meshIndex):
|
|
|
- sceneManifest.mesh_group_select_node(meshGroup, targetPath)
|
|
|
- else:
|
|
|
- if targetPath not in pathSet:
|
|
|
- pathSet.update(targetPath)
|
|
|
- sceneManifest.mesh_group_unselect_node(meshGroup, targetPath)
|
|
|
+ sceneManifest.mesh_group_select_node(meshGroup, chunkPath)
|
|
|
|
|
|
return sceneManifest.export()
|
|
|
|
|
@@ -85,4 +77,4 @@ def main():
|
|
|
mySceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- main()
|
|
|
+ main()
|