Bases: MayaInstancePlugin
Collect model data
Ensures always only a single frame is extracted (current frame).
Todo
Validate if is this plugin still useful.
Note
This is a workaround so that the model product base type can use the same pointcache extractor implementation as animation and pointcaches. This always enforces the "current" frame to be published.
Source code in client/ayon_maya/plugins/publish/collect_model.py
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | class CollectModelData(plugin.MayaInstancePlugin):
"""Collect model data
Ensures always only a single frame is extracted (current frame).
Todo:
Validate if is this plugin still useful.
Note:
This is a workaround so that the `model` product base type can use the
same pointcache extractor implementation as animation and pointcaches.
This always enforces the "current" frame to be published.
"""
order = pyblish.api.CollectorOrder + 0.2
label = 'Collect Model Data'
families = ["model"]
def process(self, instance):
# Extract only current frame (override)
frame = cmds.currentTime(query=True)
instance.data["frameStart"] = frame
instance.data["frameEnd"] = frame
# Explicitly set no handles at all
instance.data["handleStart"] = 0
instance.data["handleEnd"] = 0
instance.data["frameStartHandle"] = frame
instance.data["frameEndHandle"] = frame
|