From f9db6771f2f66e198975a16201e4ea3d49bdd325 Mon Sep 17 00:00:00 2001 From: aardschok Date: Mon, 30 Oct 2017 16:14:32 +0100 Subject: [PATCH] reduced code to simple loading of file --- colorbleed/plugins/maya/load/load_look.py | 25 +++++------------------ 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/colorbleed/plugins/maya/load/load_look.py b/colorbleed/plugins/maya/load/load_look.py index da277691b2..16428ef034 100644 --- a/colorbleed/plugins/maya/load/load_look.py +++ b/colorbleed/plugins/maya/load/load_look.py @@ -27,26 +27,11 @@ class LookLoader(colorbleed.maya.plugin.ReferenceLoader): import maya.cmds as cmds from avalon import maya - import colorbleed.maya.lib as lib - # try / except here is to ensure that the get_reference_node - # does not fail when the file doesn't exist yet - reference_node = None - try: - reference_node = lib.get_reference_node(self.fname) - except Exception as e: - self.log.error(e) - pass - - if reference_node is None: - self.log.info("Loading lookdev for the first time ...") - with maya.maintained_selection(): - nodes = cmds.file(self.fname, - namespace=namespace, - reference=True, - returnNewNodes=True) - else: - self.log.info("Reusing existing lookdev ...") - nodes = None + with maya.maintained_selection(): + nodes = cmds.file(self.fname, + namespace=namespace, + reference=True, + returnNewNodes=True) self[:] = nodes