Depsgraph: Cleanup, make naming more understandable
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 15 Dec 2017 16:46:30 +0000 (17:46 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 15 Dec 2017 16:46:30 +0000 (17:46 +0100)
source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
source/blender/depsgraph/intern/depsgraph.cc
source/blender/depsgraph/intern/depsgraph_intern.h
source/blender/depsgraph/intern/depsgraph_type_defines.cc
source/blender/depsgraph/intern/nodes/deg_node.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc

index 51d4ed914199c20df0193f2a4dc6d5eccc5d9e8b..d7457b9eb6c92a40342a17223bcdf6fe158fafce 100644 (file)
@@ -177,7 +177,7 @@ static void deg_debug_graphviz_legend(const DebugContext &ctx)
 #ifdef COLOR_SCHEME_NODE_TYPE
        const int (*pair)[2];
        for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; ++pair) {
-               DepsNodeFactory *nti = DEG_get_node_factory((eDepsNode_Type)(*pair)[0]);
+               DepsNodeFactory *nti = deg_type_get_factory((eDepsNode_Type)(*pair)[0]);
                deg_debug_graphviz_legend_color(ctx,
                                                nti->tname().c_str(),
                                                deg_debug_colors_light[(*pair)[1] % deg_debug_max_colors]);
index dd7284eb629f798e4ba1b73935bb5cef60e3ecab..30ab21b1d8cc66f6cc38f01320dc4276d4a7d210 100644 (file)
@@ -257,7 +257,7 @@ static void id_node_deleter(void *value)
 TimeSourceDepsNode *Depsgraph::add_time_source()
 {
        if (time_source == NULL) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_TIMESOURCE);
+               DepsNodeFactory *factory = deg_type_get_factory(DEG_NODE_TYPE_TIMESOURCE);
                time_source = (TimeSourceDepsNode *)factory->create_node(NULL, "", "Time Source");
        }
        return time_source;
@@ -277,7 +277,7 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, const char *name)
 {
        IDDepsNode *id_node = find_id_node(id);
        if (!id_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_ID_REF);
+               DepsNodeFactory *factory = deg_type_get_factory(DEG_NODE_TYPE_ID_REF);
                id_node = (IDDepsNode *)factory->create_node(id, "", name);
                id->tag |= LIB_TAG_DOIT;
                /* register */
index 2d8e7dc841cbb38371c63fc392b30615dc0ac4bc..0cef5f614cb4055a50eeb667fa395644d434c491 100644 (file)
@@ -102,7 +102,7 @@ struct DepsNodeFactoryImpl : public DepsNodeFactory {
 void deg_register_node_typeinfo(DepsNodeFactory *factory);
 
 /* Get typeinfo for specified type */
-DepsNodeFactory *deg_get_node_factory(const eDepsNode_Type type);
+DepsNodeFactory *deg_type_get_factory(const eDepsNode_Type type);
 
 /* Get typeinfo for provided node */
 DepsNodeFactory *deg_node_get_factory(const DepsNode *node);
index b81914b461bcf40d60bf058fab6ae85526c37d44..f51bfaff06e7d3b0c7256c5e3b4181b1e08323b5 100644 (file)
@@ -65,7 +65,7 @@ void deg_register_node_typeinfo(DepsNodeFactory *factory)
 /* Getters ------------------------------------------------- */
 
 /* Get typeinfo for specified type */
-DepsNodeFactory *deg_get_node_factory(const eDepsNode_Type type)
+DepsNodeFactory *deg_type_get_factory(const eDepsNode_Type type)
 {
        /* look up type - at worst, it doesn't exist in table yet, and we fail */
        return depsnode_typeinfo_registry[type];
@@ -77,7 +77,7 @@ DepsNodeFactory *deg_node_get_factory(const DepsNode *node)
        if (node != NULL) {
                return NULL;
        }
-       return deg_get_node_factory(node->type);
+       return deg_type_get_factory(node->type);
 }
 
 /* Stringified opcodes ------------------------------------- */
index a15317586c1583f88f7d16fe4c40981d0f808216..1d4d542e7cc0e1d29b2be9b37ec6ee109ca24626 100644 (file)
@@ -202,7 +202,7 @@ ComponentDepsNode *IDDepsNode::add_component(eDepsNode_Type type,
 {
        ComponentDepsNode *comp_node = find_component(type, name);
        if (!comp_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(type);
+               DepsNodeFactory *factory = deg_type_get_factory(type);
                comp_node = (ComponentDepsNode *)factory->create_node(this->id, "", name);
 
                /* Register. */
index 010f12409b450fd275e2c48020c820aa3120a5e6..17f35acee79c9eb7755276c373fe6ca1598eec0c 100644 (file)
@@ -231,7 +231,7 @@ OperationDepsNode *ComponentDepsNode::add_operation(const DepsEvalOperationCb& o
 {
        OperationDepsNode *op_node = find_operation(opcode, name, name_tag);
        if (!op_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_OPERATION);
+               DepsNodeFactory *factory = deg_type_get_factory(DEG_NODE_TYPE_OPERATION);
                op_node = (OperationDepsNode *)factory->create_node(this->owner->id, "", name);
 
                /* register opnode in this component's operation set */