mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
remove the duplicated collect verion
This commit is contained in:
parent
8403e2f218
commit
b55ead017a
1 changed files with 3 additions and 7 deletions
|
|
@ -1,14 +1,13 @@
|
|||
import pyblish.api
|
||||
|
||||
from ayon_core.pipeline import registered_host
|
||||
from ayon_core.lib import get_version_from_path
|
||||
|
||||
|
||||
class CollectContextData(pyblish.api.ContextPlugin):
|
||||
"""Collect current context publish"""
|
||||
class CollectCurrentFile(pyblish.api.ContextPlugin):
|
||||
"""Inject the current working file into context"""
|
||||
|
||||
order = pyblish.api.CollectorOrder - 0.49
|
||||
label = "Collect Context Data"
|
||||
label = "Current Workfile"
|
||||
hosts = ["substancepainter"]
|
||||
|
||||
def process(self, context):
|
||||
|
|
@ -16,6 +15,3 @@ class CollectContextData(pyblish.api.ContextPlugin):
|
|||
path = host.get_current_workfile()
|
||||
context.data["currentFile"] = path
|
||||
self.log.debug(f"Current workfile: {path}")
|
||||
version = int(get_version_from_path(path))
|
||||
context.data["version"] = version
|
||||
self.log.debug(f"Current Version: {version}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue