From 0aeeec4e352a359750038e1386eefb7a9e5aad60 Mon Sep 17 00:00:00 2001 From: wijnand Date: Fri, 4 May 2018 11:07:29 +0200 Subject: [PATCH] Updated module name, added check for valid color --- .../inventory/{select_loader_color.py => set_tool_color.py} | 3 +++ 1 file changed, 3 insertions(+) rename colorbleed/plugins/fusion/inventory/{select_loader_color.py => set_tool_color.py} (94%) diff --git a/colorbleed/plugins/fusion/inventory/select_loader_color.py b/colorbleed/plugins/fusion/inventory/set_tool_color.py similarity index 94% rename from colorbleed/plugins/fusion/inventory/select_loader_color.py rename to colorbleed/plugins/fusion/inventory/set_tool_color.py index e0cb46e4e5..3ebc07aebc 100644 --- a/colorbleed/plugins/fusion/inventory/select_loader_color.py +++ b/colorbleed/plugins/fusion/inventory/set_tool_color.py @@ -22,6 +22,9 @@ class FusionSetToolColor(api.InventoryAction): first = containers[0] color = QtGui.QColor(first.get("color", self._fallback_color)) picked_color = QtWidgets.QColorDialog().getColor(color) + if not picked_color.isValid(): + return result + with avalon.fusion.comp_lock_and_undo_chunk(comp): for container in containers: # Convert color to RGB 0-1 floats