Add functionality back in to store playback time range with the mayaScene publish

This commit is contained in:
Roy Nieterau 2022-09-09 12:02:10 +02:00
parent 872d85f91d
commit ad9e172e4a

View file

@ -0,0 +1,26 @@
from maya import cmds
import pyblish.api
class CollectMayaSceneTime(pyblish.api.InstancePlugin):
"""Collect Maya Scene playback range
This allows to reproduce the playback range for the content to be loaded.
It does *not* limit the extracted data to only data inside that time range.
"""
order = pyblish.api.CollectorOrder + 0.2
label = 'Collect Maya Scene Time'
families = ["mayaScene"]
def process(self, instance):
instance.data.update({
"frameStart": cmds.playbackOptions(query=True, minTime=True),
"frameEnd": cmds.playbackOptions(query=True, maxTime=True),
"frameStartHandle": cmds.playbackOptions(query=True,
animationStartTime=True),
"frameEndHandle": cmds.playbackOptions(query=True,
animationEndTime=True),
})