From 11a8b952d79cfbfefb8bbf503b890cdfca92f73e Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 13 Apr 2018 17:30:32 +0200 Subject: [PATCH] Assert file exists on load in ReferenceLoader to avoid empty reference --- colorbleed/maya/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/colorbleed/maya/plugin.py b/colorbleed/maya/plugin.py index 5e5dcd018a..4ca3c67ac0 100644 --- a/colorbleed/maya/plugin.py +++ b/colorbleed/maya/plugin.py @@ -39,9 +39,12 @@ class ReferenceLoader(api.Loader): namespace=None, data=None): + import os from avalon.maya import lib from avalon.maya.pipeline import containerise + assert os.path.exists(self.fname), "%s does not exist." % self.fname + asset = context['asset'] namespace = namespace or lib.unique_namespace(