Quellcode durchsuchen

AssImp set to be the default FBX processor (#78) (#136)

* AssImp set to be the default FBX processor (#78)

If you encounter issues, reach out to the Helios team with details, and then switch back to FBX SDK locally by changing FBXImporter.h

* Merge pull request #219 from aws-lumberyard-dev/sceneapi_scripting

LYN-3030: Fix to export_chunks_builder.py to match the AssImp node paths

* Hide some automated test folders from the asset processor for automatedtesting. This is necessary because these assets should only be processed when running the test, and not any time AP is launched for this project.

* Putting these test assets back to visible to Asset Processor. These tests need to be updated at some point to handle that, but they won't work with this change for now. Note that until this is addressed, these tests may randomly time out if they're the first tests run on a clean asset processor, and these tests launch AP without using a unique port, so the test can also fail if an Asset Processor executable is hanging open.

Grabbed the change I missed from the 1.0 branch merge, no idea how this got lost.

* Moved from main to periodic. Allen and Fuzzy were already on board, and I think with the potential flakiness in this test, we don't want this in main.

Co-authored-by: jackalbe <[email protected]>
AMZN-stankowi vor 4 Jahren
Ursprung
Commit
f44f06c9f0

+ 8 - 9
AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py

@@ -22,7 +22,7 @@ import ly_test_tools.environment.file_system as file_system
 import ly_test_tools.log.log_monitor
 import ly_test_tools.environment.waiter as waiter
 
[email protected]_sandbox
[email protected]_periodic
 @pytest.mark.parametrize('launcher_platform', ['windows_editor'])
 @pytest.mark.parametrize('project', ['AutomatedTesting'])
 @pytest.mark.parametrize('level', ['auto_test'])
@@ -31,14 +31,13 @@ class TestPythonAssetProcessing(object):
         unexpected_lines = []
         expected_lines = [
             'Mock asset exists',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_negative.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_positive.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found',
-            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found'
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel) found',
+            'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel) found'
         ]
         timeout = 180
         halt_on_unexpected = False

+ 10 - 9
AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py

@@ -26,8 +26,9 @@ assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdB
 if (assetId.is_valid() is False):
     raise_and_stop(f'Mock AssetId is not valid! Got {assetId.to_string()} instead')
 
-if (assetId.to_string().endswith(':54c06b89') is False):
-    raise_and_stop(f'Mock AssetId has unexpected sub-id for {mockAssetPath}!')
+assetIdString = assetId.to_string()
+if (assetIdString.endswith(':528cca58') is False):
+    raise_and_stop(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!')
 
 print ('Mock asset exists')
 
@@ -41,12 +42,12 @@ def test_azmodel_product(generatedModelAssetPath, expectedSubId):
     else:
         print(f'Expected subId for asset ({generatedModelAssetPath}) found')
 
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel', '10412075')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_positive.azmodel', '10d16e68')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_negative.azmodel', '10a71973')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Y_positive.azmodel', '10130556')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Y_negative.azmodel', '1065724d')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Z_positive.azmodel', '1024be55')
-test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Z_negative.azmodel', '1052c94e')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel', '10315ae0')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel', '10661093')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel', '10af8810')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel', '10f8c263')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel', '100ac47f')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel', '105d8e0c')
+test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel', '1002d464')
 
 azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt')

+ 6 - 14
AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/export_chunks_builder.py

@@ -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()

+ 1 - 1
Code/Tools/SceneAPI/FbxSceneBuilder/FbxImporter.cpp

@@ -73,7 +73,7 @@ namespace AZ
                 SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
                 if (serializeContext)
                 {
-                    serializeContext->Class<FbxImporter, SceneCore::LoadingComponent>()->Version(1);
+                    serializeContext->Class<FbxImporter, SceneCore::LoadingComponent>()->Version(2); // SPEC-5776
                 }
             }
 

+ 1 - 1
Code/Tools/SceneAPI/FbxSceneBuilder/FbxImporter.h

@@ -51,7 +51,7 @@ namespace AZ
 
                 AZStd::unique_ptr<SDKScene::SceneWrapperBase> m_sceneWrapper;
                 AZStd::shared_ptr<FbxSceneSystem> m_sceneSystem;
-                bool m_useAssetImporterSDK = false;
+                bool m_useAssetImporterSDK = true;
             };
         } // namespace FbxSceneBuilder
     } // namespace SceneAPI

+ 1 - 1
Gems/Blast/Editor/Scripts/bootstrap.py

@@ -9,5 +9,5 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 """
 
-# LYN-652 to re-enable the next line
+# LYN-652 to re-enable once the Blast gem tests are stable
 # import asset_builder_blast