mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
fix logging
This commit is contained in:
parent
487b273a09
commit
9604dca259
3 changed files with 9 additions and 4 deletions
|
|
@ -110,7 +110,7 @@ class FBXExtractor:
|
|||
|
||||
def __init__(self, log=None):
|
||||
# Ensure FBX plug-in is loaded
|
||||
self.log = log or logging.getLogger(__class__.__name__)
|
||||
self.log = log or logging.getLogger(self.__class__.__name__)
|
||||
cmds.loadPlugin("fbxmaya", quiet=True)
|
||||
|
||||
def parse_overrides(self, instance, options):
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ class ExtractUnrealStaticMesh(openpype.api.Extractor):
|
|||
families = ["staticMesh"]
|
||||
|
||||
def process(self, instance):
|
||||
fbx_exporter = fbx.FBXExtractor(log=self.log)
|
||||
to_combine = instance.data.get("membersToCombine")
|
||||
static_mesh_name = instance.data.get("staticMeshCombinedName")
|
||||
duplicates = []
|
||||
|
|
@ -46,13 +45,13 @@ class ExtractUnrealStaticMesh(openpype.api.Extractor):
|
|||
)
|
||||
cmds.duplicate(to_combine[0], name=static_mesh_name, ic=True)
|
||||
|
||||
delete_bin.extend(static_mesh_name)
|
||||
delete_bin.extend([static_mesh_name])
|
||||
delete_bin.extend(duplicates)
|
||||
|
||||
members = [static_mesh_name]
|
||||
members += instance.data["collisionMembers"]
|
||||
|
||||
fbx_exporter = fbx.FBXExtractor()
|
||||
fbx_exporter = fbx.FBXExtractor(log=self.log)
|
||||
|
||||
# Define output path
|
||||
staging_dir = self.staging_dir(instance)
|
||||
|
|
@ -74,6 +73,9 @@ class ExtractUnrealStaticMesh(openpype.api.Extractor):
|
|||
self.log.info("Un-parenting: {}".format(members))
|
||||
fbx_exporter.export(members, path)
|
||||
|
||||
if "representations" not in instance.data:
|
||||
instance.data["representations"] = []
|
||||
|
||||
representation = {
|
||||
'name': 'fbx',
|
||||
'ext': 'fbx',
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ class ValidateUnrealStaticMeshName(pyblish.api.InstancePlugin):
|
|||
["static_mesh_prefix"]
|
||||
)
|
||||
|
||||
to_combine = instance.data.get("membersToCombine")
|
||||
if not to_combine:
|
||||
raise ValueError("Missing geometry to export.")
|
||||
combined_geometry_name = instance.data.get(
|
||||
"staticMeshCombinedName", None)
|
||||
if cls.validate_mesh:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue