added creator for multiverse usd override

This commit is contained in:
Bo Zhou 2022-03-11 11:40:32 +09:00
parent a2ee890a53
commit 310c572e65

View file

@ -0,0 +1,35 @@
from openpype.hosts.maya.api import plugin, lib
class CreateMultiverseUsdOver(plugin.Creator):
"""Multiverse USD data"""
name = "usd"
label = "Multiverse USD"
family = "usd"
icon = "cubes"
def __init__(self, *args, **kwargs):
super(CreateMultiverseUsdOver, self).__init__(*args, **kwargs)
self.data["writeAll"] = False
self.data["writeTransforms"] = True
self.data["writeVisibility"] = True
self.data["writeAttributes"] = True
self.data["writeMaterials"] = True
self.data["writeVariants"] = True
self.data["writeVariantsDefinition"] = True
self.data["writeActiveState"] = True
self.data["writeNamespaces"] = False
# The attributes below are about animated cache.
self.data["writeTimeRange"] = True
self.data["timeRangeNumTimeSamples"] = 0
self.data["timeRangeSamplesSpan"] = 0.0
animation_data = lib.collect_animation_data(True)
self.data["timeRangeStart"] = animation_data["frameStart"]
self.data["timeRangeEnd"] = animation_data["frameEnd"]
self.data["timeRangeIncrement"] = animation_data["step"]
self.data["timeRangeFramesPerSecond"] = animation_data["fps"]