mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 17:04:54 +01:00
OP-3940 - added new collector for Photoshop
Single point of control if image and review instances should have their version synchronized according to workfile version.
This commit is contained in:
parent
3703ec07bc
commit
d93a18fd89
1 changed files with 28 additions and 0 deletions
28
openpype/hosts/photoshop/plugins/CollectVersion.py
Normal file
28
openpype/hosts/photoshop/plugins/CollectVersion.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import pyblish.api
|
||||
|
||||
|
||||
class CollectVersion(pyblish.api.InstancePlugin):
|
||||
"""Collect version for publishable instances.
|
||||
|
||||
Used to synchronize version from workfile to all publishable instances:
|
||||
- image (manually created or color coded)
|
||||
- review
|
||||
|
||||
Dev comment:
|
||||
Explicit collector created to control this from single place and not from
|
||||
3 different.
|
||||
"""
|
||||
order = pyblish.api.CollectorOrder + 0.200
|
||||
label = 'Collect Version'
|
||||
|
||||
hosts = ["photoshop"]
|
||||
families = ["image", "review"]
|
||||
|
||||
# controlled by Settings
|
||||
sync_workfile_version = False
|
||||
|
||||
def process(self, instance):
|
||||
if self.sync_workfile_version:
|
||||
workfile_version = instance.context.data["version"]
|
||||
self.log.debug(f"Applying version {workfile_version}")
|
||||
instance.data["version"] = workfile_version
|
||||
Loading…
Add table
Add a link
Reference in a new issue