mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
add collector to tray publisher for getting frame range data
This commit is contained in:
parent
2f95aab31e
commit
c388ee9463
3 changed files with 41 additions and 0 deletions
33
openpype/plugins/publish/collect_anatomy_frame_range.py
Normal file
33
openpype/plugins/publish/collect_anatomy_frame_range.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import pyblish.api
|
||||
|
||||
|
||||
class CollectAnatomyFrameRange(pyblish.api.InstancePlugin):
|
||||
"""Collect Frame Range specific Anatomy data.
|
||||
|
||||
Plugin is running for all instances on context even not active instances.
|
||||
"""
|
||||
|
||||
order = pyblish.api.CollectorOrder + 0.491
|
||||
label = "Collect Anatomy Frame Range"
|
||||
hosts = ["traypublisher"]
|
||||
|
||||
def process(self, instance):
|
||||
self.log.info("Collecting Anatomy frame range.")
|
||||
asset_doc = instance.data.get("assetEntity")
|
||||
if not asset_doc:
|
||||
self.log.info("Missing required data..")
|
||||
return
|
||||
|
||||
asset_data = asset_doc["data"]
|
||||
for key in (
|
||||
"fps",
|
||||
"frameStart",
|
||||
"frameEnd",
|
||||
"handleStart",
|
||||
"handleEnd"
|
||||
):
|
||||
if key not in instance.data and key in asset_data:
|
||||
value = asset_data[key]
|
||||
instance.data[key] = value
|
||||
|
||||
self.log.info("Anatomy frame range collection finished.")
|
||||
|
|
@ -318,6 +318,10 @@
|
|||
}
|
||||
},
|
||||
"publish": {
|
||||
"CollectAnatomyFrameRange": {
|
||||
"enabled": true,
|
||||
"active": true
|
||||
},
|
||||
"ValidateFrameRange": {
|
||||
"enabled": true,
|
||||
"optional": true,
|
||||
|
|
|
|||
|
|
@ -343,6 +343,10 @@
|
|||
"type": "schema_template",
|
||||
"name": "template_validate_plugin",
|
||||
"template_data": [
|
||||
{
|
||||
"key": "CollectAnatomyFrameRange",
|
||||
"label": "Collect Anatomy frame range"
|
||||
},
|
||||
{
|
||||
"key": "ValidateFrameRange",
|
||||
"label": "Validate frame range"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue