fix frame handling and collision name determination

This commit is contained in:
Ondrej Samohel 2022-03-01 15:18:38 +01:00
parent 298da27fee
commit 28e11a5b2d
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 5 additions and 3 deletions

View file

@ -154,8 +154,10 @@ class FBXExtractor:
self.log.info("Export options: {0}".format(options))
# Collect the start and end including handles
start = instance.data["frameStartHandle"]
end = instance.data["frameEndHandle"]
start = instance.data.get("frameStartHandle") or \
instance.context.data.get("frameStartHandle")
end = instance.data.get("frameEndHandle") or \
instance.context.data.get("frameEndHandle")
options['bakeComplexStart'] = start
options['bakeComplexEnd'] = end

View file

@ -29,7 +29,7 @@ class CollectUnrealStaticMesh(pyblish.api.InstancePlugin):
# take the name from instance (without the `staticMesh_` prefix)
instance.data["staticMeshCombinedName"] = "{}_{}".format(
sm_prefix,
instance.name[len(instance.data.get("family")) + 3:]
instance.name[len(instance.data.get("family")) + 1:]
)
geometry_set = [i for i in instance if i == "geometry_SET"]