mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
- `frameRate` to `fps` - `startFrame` to `frameStart` - `endFrame` to `frameEnd` - `fstart` to `frameStart` - `fend` to `frameEnd` - `handle_start` to `handleStart` - `handle_end` to `handleEnd` - `resolution_width` to `resolutionWidth` - `resolution_height` to `resolutionHeight` - `pixel_aspect` to `pixelAspect`
26 lines
747 B
Python
26 lines
747 B
Python
from maya import cmds
|
|
|
|
import pyblish.api
|
|
|
|
|
|
class CollectModelData(pyblish.api.InstancePlugin):
|
|
"""Collect model data
|
|
|
|
Ensures always only a single frame is extracted (current frame).
|
|
|
|
Note:
|
|
This is a workaround so that the `pype.model` family 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
|