[Bf-blender-cvs] [4ce38abfcd1] master: Depsgraph: Add named constant with number of node types

Sergey Sharybin noreply at git.blender.org
Fri Dec 15 17:48:54 CET 2017


Commit: 4ce38abfcd1eba5e7025d76f5cf1184950881579
Author: Sergey Sharybin
Date:   Fri Dec 15 17:39:01 2017 +0100
Branches: master
https://developer.blender.org/rB4ce38abfcd1eba5e7025d76f5cf1184950881579

Depsgraph: Add named constant with number of node types

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

M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 50e49813c58..b2dbe5d2a62 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -124,6 +124,9 @@ typedef enum eDepsNode_Type {
 	DEG_NODE_TYPE_SHADING,
 	/* Cache Component */
 	DEG_NODE_TYPE_CACHE,
+
+	/* Total number of meaningful node types. */
+	NUM_DEG_NODE_TYPES,
 } eDepsNode_Type;
 
 /* Identifiers for common operations (as an enum). */
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 107bbda1030..79ef0f32dda 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -176,6 +176,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 						case DEG_NODE_TYPE_TIMESOURCE:
 						case DEG_NODE_TYPE_ID_REF:
 						case DEG_NODE_TYPE_SEQUENCER:
+						case NUM_DEG_NODE_TYPES:
 							/* Ignore, does not translate to object component. */
 							BLI_assert(!"This should never happen!");
 							break;



More information about the Bf-blender-cvs mailing list