remove the duplicated collect verion

This commit is contained in:
Kayla Man 2024-06-05 13:27:20 +08:00
parent 8403e2f218
commit b55ead017a

View file

@ -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}")