[Bf-blender-cvs] [642392d] depsgraph_refactor: Move opcodes enum to despgraph_types.h + modified OperationKey to use this

Joshua Leung noreply at git.blender.org
Wed Dec 17 04:41:06 CET 2014


Commit: 642392d7dd7184436cc6627c03c3ccde38e09ab1
Author: Joshua Leung
Date:   Sun Dec 14 21:54:04 2014 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rB642392d7dd7184436cc6627c03c3ccde38e09ab1

Move opcodes enum to despgraph_types.h + modified OperationKey to use this

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

M	source/blender/depsgraph/intern/depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/intern/depsnode_operation.h

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build.h b/source/blender/depsgraph/intern/depsgraph_build.h
index ff22b01..e586ff5 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.h
+++ b/source/blender/depsgraph/intern/depsgraph_build.h
@@ -137,17 +137,36 @@ struct ComponentKey
 
 struct OperationKey
 {
-	OperationKey() : id(NULL), component_type(DEPSNODE_TYPE_UNDEFINED), component_name(""), name("") {}
+	OperationKey() : 
+	    id(NULL), component_type(DEPSNODE_TYPE_UNDEFINED), component_name(""), opcode(DEG_OPCODE_OPERATION), name("")
+	{}
+	
 	OperationKey(ID *id, eDepsNode_Type component_type, const string &name) :
-	    id(id), component_type(component_type), component_name(""), name(name)
+	    id(id), component_type(component_type), component_name(""), opcode(DEG_OPCODE_OPERATION), name(name)
 	{}
 	OperationKey(ID *id, eDepsNode_Type component_type, const string &component_name, const string &name) :
-	    id(id), component_type(component_type), component_name(component_name), name(name)
+	    id(id), component_type(component_type), component_name(component_name), opcode(DEG_OPCODE_OPERATION), name(name)
+	{}
+	
+	OperationKey(ID *id, eDepsNode_Type component_type, eDepsOperation_Code opcode) :
+	    id(id), component_type(component_type), component_name(""), opcode(opcode), name("")
+	{}
+	OperationKey(ID *id, eDepsNode_Type component_type, const string &component_name, eDepsOperation_Code opcode) :
+	    id(id), component_type(component_type), component_name(component_name), opcode(opcode), name("")
 	{}
 	
+	OperationKey(ID *id, eDepsNode_Type component_type, eDepsOperation_Code opcode, const string &name) :
+	    id(id), component_type(component_type), component_name(""), opcode(opcode), name(name)
+	{}
+	OperationKey(ID *id, eDepsNode_Type component_type, const string &component_name, eDepsOperation_Code opcode, const string &name) :
+	    id(id), component_type(component_type), component_name(component_name), opcode(opcode), name(name)
+	{}
+	
+	
 	ID *id;
 	eDepsNode_Type component_type;
 	string component_name;
+	eDepsOperation_Code opcode;
 	string name;
 };
 
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index c32a385..2d8c038 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -88,7 +88,13 @@ typedef enum eDepsNode_Type {
 	DEPSNODE_TYPE_EVAL_PARTICLES   = 23,       /* Particle Systems Component */
 } eDepsNode_Type;
 
-/* Standard operation names */
+/* Identifiers for common operations (as an enum) */
+typedef enum eDepsOperation_Code {
+	#define DEF_DEG_OPCODE(label) DEG_OPCODE_##label,
+	#include "depsnode_opcodes.h"
+	#undef DEF_DEG_OPCODE
+} eDepsOperation_Code;
+
 /* XXX this needs to be revisited, probably operation types could be
  * combined in a concise struct with name+callback+eDepsOperation_Type
  */
diff --git a/source/blender/depsgraph/intern/depsnode_operation.h b/source/blender/depsgraph/intern/depsnode_operation.h
index ae7ba9f..0441edf 100644
--- a/source/blender/depsgraph/intern/depsnode_operation.h
+++ b/source/blender/depsgraph/intern/depsnode_operation.h
@@ -47,13 +47,6 @@ struct ID;
 struct Depsgraph;
 struct DepsgraphCopyContext;
 
-/* Identifiers for common operations (as an enum) */
-typedef enum eDepsOperation_Code {
-	#define DEF_DEG_OPCODE(label) DEG_OPCODE_##label,
-	#include "depsnode_opcodes.h"
-	#undef DEF_DEG_OPCODE
-} eDepsOperation_Code;
-
 /* Flags for Depsgraph Nodes */
 typedef enum eDepsOperation_Flag {
 	/* node needs to be updated */




More information about the Bf-blender-cvs mailing list