Depsgraph: Add named constant with number of node types

This commit is contained in:
Sergey Sharybin 2017-12-15 17:39:01 +01:00
parent 68a7f5e594
commit 4ce38abfcd
2 changed files with 4 additions and 0 deletions

View File

@ -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). */

View File

@ -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;