From 301a8e5c19ae7dc5c90f2835f56719a1dd909242 Mon Sep 17 00:00:00 2001 From: wikoreman Date: Fri, 20 Jul 2018 16:55:19 +0200 Subject: [PATCH] toggle reflection / refraction on --- colorbleed/plugins/maya/load/load_yeti_cache.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/maya/load/load_yeti_cache.py b/colorbleed/plugins/maya/load/load_yeti_cache.py index dd6ebbeb05..90d7cf5678 100644 --- a/colorbleed/plugins/maya/load/load_yeti_cache.py +++ b/colorbleed/plugins/maya/load/load_yeti_cache.py @@ -7,6 +7,7 @@ from maya import cmds from avalon import api from avalon.maya import lib as avalon_lib, pipeline +from avalon.vendor import six from colorbleed.maya import lib @@ -176,14 +177,19 @@ class YetiCacheLoader(api.Loader): nodes.append(transform_node) nodes.append(yeti_node) + # Update visibility reflaction and refraction in node settings + attributes = node_settings["attrs"] + attributes.update({"visibleInReflections": True, + "visibleInRefractions": True}) + # Apply attributes to pgYetiMaya node kwargs = {} - for attr, value in node_settings["attrs"].items(): + for attr, value in attributes.items(): if value is None: continue attribute = "%s.%s" % (yeti_node, attr) - if isinstance(value, (str, unicode)): + if isinstance(value, (str, six.string_types)): cmds.setAttr(attribute, value, type="string") continue