From 4e760c593d2547d3b8772f3dc630fc1823ea1bc7 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 9 Oct 2018 13:02:49 +0200 Subject: [PATCH] Make listConnections call for getting shaders more explicit --- colorbleed/maya/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/colorbleed/maya/lib.py b/colorbleed/maya/lib.py index 9727666765..3e6e7cb9d0 100644 --- a/colorbleed/maya/lib.py +++ b/colorbleed/maya/lib.py @@ -553,6 +553,10 @@ def get_shader_assignments_from_shapes(shapes): # Get unique shading groups for the shape shading_groups = cmds.listConnections(shape, + source=False, + destination=True, + plugs=False, + connections=False, type="shadingEngine") or [] shading_groups = list(set(shading_groups)) for shading_group in shading_groups: