From 4852d57ef62f4fea124d4a23767c9783d87b8079 Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 9 May 2024 02:28:50 +0200 Subject: [PATCH] Change how the color collection are config --- Fange Pipeline/operators/outline.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Fange Pipeline/operators/outline.py b/Fange Pipeline/operators/outline.py index 08472cc..283ca60 100644 --- a/Fange Pipeline/operators/outline.py +++ b/Fange Pipeline/operators/outline.py @@ -12,15 +12,16 @@ class ConfigBlendScene(bpy.types.Operator): self._outline = Outline() def execute(self, context): - print(f'[Pipeline] Generate outline') - for key, value in self._outline.collections.items(): - print(f'[Pipeline] Check the collection {key}') collection = bpy.data.collections.get(key) + # Make the collection if this item not exist if collection is None: collection = bpy.data.collections.new(value.name) - collection.color_tag = value.color context.scene.collection.children.link(collection) + # Check if the color are correctly setup, if not update-it + if collection.color_tag is not value.color: + collection.color_tag = value.color + return {'FINISHED'}