mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Pep8 compliance
This commit is contained in:
parent
a06bac68ed
commit
b59887b585
4 changed files with 14 additions and 19 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"])
|
||||
|
|
|
|||
|
|
@ -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"])
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue