[Bf-blender-cvs] [213749f2f45] temp-group-collections: Improve debug printing for layers evaluation

Dalai Felinto noreply at git.blender.org
Wed Nov 1 18:14:50 CET 2017


Commit: 213749f2f45d6eca512837937dd1ae4137c26ed4
Author: Dalai Felinto
Date:   Mon Oct 30 17:27:01 2017 -0200
Branches: temp-group-collections
https://developer.blender.org/rB213749f2f45d6eca512837937dd1ae4137c26ed4

Improve debug printing for layers evaluation

===================================================================

M	source/blender/blenkernel/intern/layer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index f908b76d1b3..e2c8f7e2233 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -2070,17 +2070,25 @@ void BKE_layer_eval_layer_collection_pre(const struct EvaluationContext *UNUSED(
 	scene_layer->flag |= SCENE_LAYER_ENGINE_DIRTY;
 }
 
+static const char *collection_type_lookup[] =
+{
+    "None", /* COLLECTION_TYPE_NONE */
+    "Group", /* COLLECTION_TYPE_GROUP */
+    "Group Internal", /* COLLECTION_TYPE_GROUP_INTERNAL */
+};
+
 void BKE_layer_eval_layer_collection(const struct EvaluationContext *UNUSED(eval_ctx),
                                      LayerCollection *layer_collection,
                                      LayerCollection *parent_layer_collection)
 {
-	DEBUG_PRINT("%s on %s (%p), parent %s (%p)\n",
+	DEBUG_PRINT("%s on %s (%p) [%s], parent %s (%p) [%s]\n",
 	            __func__,
 	            layer_collection->scene_collection->name,
 	            layer_collection->scene_collection,
+	            collection_type_lookup[layer_collection->scene_collection->type],
 	            (parent_layer_collection != NULL) ? parent_layer_collection->scene_collection->name : "NONE",
-	            (parent_layer_collection != NULL) ? parent_layer_collection->scene_collection : NULL);
-
+	            (parent_layer_collection != NULL) ? parent_layer_collection->scene_collection : NULL,
+	            (parent_layer_collection != NULL) ? collection_type_lookup[parent_layer_collection->scene_collection->type] : "");
 	BLI_assert(layer_collection != parent_layer_collection);
 
 	/* visibility */



More information about the Bf-blender-cvs mailing list