From d01427c4962d6b973573806c8c4701373b188cc3 Mon Sep 17 00:00:00 2001 From: aardschok Date: Fri, 18 Aug 2017 10:44:53 +0200 Subject: [PATCH] fixed variable called before declared --- colorbleed/plugins/publish/collect_assumed_destination.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/publish/collect_assumed_destination.py b/colorbleed/plugins/publish/collect_assumed_destination.py index ca31c2e841..a853499d67 100644 --- a/colorbleed/plugins/publish/collect_assumed_destination.py +++ b/colorbleed/plugins/publish/collect_assumed_destination.py @@ -5,7 +5,7 @@ import avalon.io as io class CollectAssumedDestination(pyblish.api.InstancePlugin): - """This plug-ins displays the comment dialog box per default""" + """Generate the assumed destination path where the file will be stored""" label = "Collect Assumed Destination" order = pyblish.api.CollectorOrder + 0.499 @@ -81,12 +81,14 @@ class CollectAssumedDestination(pyblish.api.InstancePlugin): "parent": asset["_id"]}) # assume there is no version yet, we start at `1` + version = None version_number = 1 if subset is not None: version = io.find_one({"type": "version", "parent": subset["_id"]}, sort=[("name", -1)]) - # if there is a subset there ought to be version + # if there is a subset there ought to be version + if version is not None: version_number += version["name"] template_data = {"root": os.environ["AVALON_PROJECTS"],