diff --git a/pype/plugins/unreal/load/load_animation.py b/pype/plugins/unreal/load/load_animation.py index 33fd265d1a..5e106788ce 100644 --- a/pype/plugins/unreal/load/load_animation.py +++ b/pype/plugins/unreal/load/load_animation.py @@ -15,7 +15,7 @@ class AnimationFBXLoader(api.Loader): icon = "cube" color = "orange" - def load(self, context, name, namespace, options = None): + def load(self, context, name, namespace, options=None): """ Load and containerise representation into Content Browser. @@ -88,7 +88,7 @@ class AnimationFBXLoader(api.Loader): task.options.set_editor_property('import_animations', True) task.options.skeletal_mesh_import_data.set_editor_property( - 'import_content_type', + 'import_content_type', unreal.FBXImportContentType.FBXICT_SKINNING_WEIGHTS ) @@ -162,7 +162,7 @@ class AnimationFBXLoader(api.Loader): task.options.set_editor_property('import_animations', True) task.options.skeletal_mesh_import_data.set_editor_property( - 'import_content_type', + 'import_content_type', unreal.FBXImportContentType.FBXICT_SKINNING_WEIGHTS ) @@ -177,7 +177,7 @@ class AnimationFBXLoader(api.Loader): container["objectName"]) # update metadata unreal_pipeline.imprint( - container_path, + container_path, { "representation": str(representation["_id"]), "parent": str(representation["parent"]) @@ -202,4 +202,3 @@ class AnimationFBXLoader(api.Loader): if len(asset_content) == 0: unreal.EditorAssetLibrary.delete_directory(parent_path) - diff --git a/pype/plugins/unreal/load/load_rig.py b/pype/plugins/unreal/load/load_rig.py index ab4cfe81d9..56351e388b 100644 --- a/pype/plugins/unreal/load/load_rig.py +++ b/pype/plugins/unreal/load/load_rig.py @@ -75,16 +75,16 @@ class SkeletalMeshFBXLoader(api.Loader): options.set_editor_property('create_physics_asset', False) options.set_editor_property('mesh_type_to_import', - unreal.FBXImportType.FBXIT_SKELETAL_MESH) + unreal.FBXImportType.FBXIT_SKELETAL_MESH) options.skeletal_mesh_import_data.set_editor_property( - 'import_content_type', + 'import_content_type', unreal.FBXImportContentType.FBXICT_ALL ) # set to import normals, otherwise Unreal will compute them # and it will take a long time, depending on the size of the mesh options.skeletal_mesh_import_data.set_editor_property( - 'normal_import_method', + 'normal_import_method', unreal.FBXNormalImportMethod.FBXNIM_IMPORT_NORMALS ) @@ -144,16 +144,16 @@ class SkeletalMeshFBXLoader(api.Loader): options.set_editor_property('create_physics_asset', False) options.set_editor_property('mesh_type_to_import', - unreal.FBXImportType.FBXIT_SKELETAL_MESH) + unreal.FBXImportType.FBXIT_SKELETAL_MESH) options.skeletal_mesh_import_data.set_editor_property( - 'import_content_type', + 'import_content_type', unreal.FBXImportContentType.FBXICT_ALL ) # set to import normals, otherwise Unreal will compute them # and it will take a long time, depending on the size of the mesh options.skeletal_mesh_import_data.set_editor_property( - 'normal_import_method', + 'normal_import_method', unreal.FBXNormalImportMethod.FBXNIM_IMPORT_NORMALS ) @@ -164,7 +164,7 @@ class SkeletalMeshFBXLoader(api.Loader): container["objectName"]) # update metadata unreal_pipeline.imprint( - container_path, + container_path, { "representation": str(representation["_id"]), "parent": str(representation["parent"]) diff --git a/pype/plugins/unreal/load/load_setdress.py b/pype/plugins/unreal/load/load_setdress.py index 191ff395c3..08330e349b 100644 --- a/pype/plugins/unreal/load/load_setdress.py +++ b/pype/plugins/unreal/load/load_setdress.py @@ -1,5 +1,4 @@ import json -from os import pipe from avalon import api import unreal @@ -97,7 +96,7 @@ class AnimationCollectionLoader(api.Loader): data = json.load(fp) animation_containers = [ - i for i in pipeline.ls() if + i for i in pipeline.ls() if i.get('asset') == container.get('asset') and i.get('family') == 'animation'] @@ -118,7 +117,7 @@ class AnimationCollectionLoader(api.Loader): container["objectName"]) # update metadata pipeline.imprint( - container_path, + container_path, { "representation": str(representation["_id"]), "parent": str(representation["parent"]) diff --git a/pype/plugins/unreal/load/load_staticmeshfbx.py b/pype/plugins/unreal/load/load_staticmeshfbx.py index a28b6e1226..149bafcacc 100644 --- a/pype/plugins/unreal/load/load_staticmeshfbx.py +++ b/pype/plugins/unreal/load/load_staticmeshfbx.py @@ -78,8 +78,6 @@ class StaticMeshFBXLoader(api.Loader): lib.create_avalon_container( container=container_name, path=asset_dir) - namespace = asset_dir - data = { "schema": "avalon-core:container-2.0", "id": pipeline.AVALON_CONTAINER_ID, @@ -132,7 +130,7 @@ class StaticMeshFBXLoader(api.Loader): container["objectName"]) # update metadata unreal_pipeline.imprint( - container_path, + container_path, { "representation": str(representation["_id"]), "parent": str(representation["parent"]) @@ -157,4 +155,3 @@ class StaticMeshFBXLoader(api.Loader): if len(asset_content) == 0: unreal.EditorAssetLibrary.delete_directory(parent_path) -