fix(nk): version check

This commit is contained in:
Jakub Jezek 2020-02-12 15:36:14 +01:00
parent 91aaa40583
commit 4ace0b2d7c
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3

View file

@ -58,7 +58,11 @@ class CollectBackdrops(pyblish.api.InstancePlugin):
last_frame = int(nuke.root()["last_frame"].getValue())
# get version
version = pype.get_version_from_path(nuke.root().name())
version = instance.context.data.get('version')
if not version:
raise RuntimeError("Script name has no version in the name.")
instance.data['version'] = version
# Add version data to instance