Merge pull request #1942 from pypeclub/enhancement/publish_alembic_with_material_slots

Add face sets to exported alembics
This commit is contained in:
Milan Kolar 2021-08-20 11:51:23 +02:00 committed by GitHub
commit 3070e8a026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 1 deletions

View file

@ -24,6 +24,7 @@ class CreateAnimation(plugin.Creator):
# Write vertex colors with the geometry.
self.data["writeColorSets"] = False
self.data["writeFaceSets"] = False
# Include only renderable visible shapes.
# Skips locators and empty transforms

View file

@ -15,6 +15,7 @@ class CreateModel(plugin.Creator):
# Vertex colors with the geometry
self.data["writeColorSets"] = False
self.data["writeFaceSets"] = False
# Include attributes by attribute name or prefix
self.data["attr"] = ""

View file

@ -20,6 +20,7 @@ class CreatePointCache(plugin.Creator):
self.data.update(lib.collect_animation_data())
self.data["writeColorSets"] = False # Vertex colors with the geometry.
self.data["writeFaceSets"] = False # Vertex colors with the geometry.
self.data["renderableOnly"] = False # Only renderable visible shapes
self.data["visibleOnly"] = False # only nodes that are visible
self.data["includeParentHierarchy"] = False # Include parent groups

View file

@ -57,7 +57,8 @@ class ExtractAnimation(openpype.api.Extractor):
"uvWrite": True,
"selection": True,
"worldSpace": instance.data.get("worldSpace", True),
"writeColorSets": instance.data.get("writeColorSets", False)
"writeColorSets": instance.data.get("writeColorSets", False),
"writeFaceSets": instance.data.get("writeFaceSets", False)
}
if not instance.data.get("includeParentHierarchy", True):

View file

@ -28,6 +28,7 @@ class ExtractModel(openpype.api.Extractor):
hosts = ["maya"]
families = ["model"]
scene_type = "ma"
optional = True
def process(self, instance):
"""Plugin entry point."""

View file

@ -38,6 +38,7 @@ class ExtractAlembic(openpype.api.Extractor):
# Get extra export arguments
writeColorSets = instance.data.get("writeColorSets", False)
writeFaceSets = instance.data.get("writeFaceSets", False)
self.log.info("Extracting pointcache..")
dirname = self.staging_dir(instance)
@ -53,6 +54,7 @@ class ExtractAlembic(openpype.api.Extractor):
"writeVisibility": True,
"writeCreases": True,
"writeColorSets": writeColorSets,
"writeFaceSets": writeFaceSets,
"uvWrite": True,
"selection": True,
"worldSpace": instance.data.get("worldSpace", True)