[Bf-blender-cvs] [8b9ba7e] depsgraph_refactor: Cleanup: Replace invalid NULL for empty strings by "".
Lukas Tönne
noreply at git.blender.org
Mon Apr 7 18:29:59 CEST 2014
Commit: 8b9ba7e23542455a84840424d94d7cbe3e2a611e
Author: Lukas Tönne
Date: Mon Apr 7 17:44:47 2014 +0200
https://developer.blender.org/rB8b9ba7e23542455a84840424d94d7cbe3e2a611e
Cleanup: Replace invalid NULL for empty strings by "".
===================================================================
M source/blender/depsgraph/intern/depsgraph.cpp
M source/blender/depsgraph/intern/depsgraph_build.cpp
M source/blender/depsgraph/intern/depsgraph_core.cpp
M source/blender/depsgraph/intern/depsgraph_eval.cpp
M source/blender/depsgraph/intern/depsgraph_query.cpp
M source/blender/depsgraph/intern/depsnode.cpp
M source/blender/depsgraph/intern/depsnode_component.cpp
M source/blender/depsgraph/intern/depsnode_operation.cpp
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph.cpp b/source/blender/depsgraph/intern/depsgraph.cpp
index 846d280..7cf78e1 100644
--- a/source/blender/depsgraph/intern/depsgraph.cpp
+++ b/source/blender/depsgraph/intern/depsgraph.cpp
@@ -246,7 +246,7 @@ IDDepsNode *Depsgraph::get_id_node(ID *id, const string &name)
IDDepsNode *id_node = find_id_node(id);
if (!id_node) {
DepsNodeFactory *factory = DEG_get_node_factory(DEPSNODE_TYPE_ID_REF);
- id_node = (IDDepsNode *)factory->create_node(id, NULL, name);
+ id_node = (IDDepsNode *)factory->create_node(id, "", name);
/* register */
this->id_hash[id] = id_node;
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cpp b/source/blender/depsgraph/intern/depsgraph_build.cpp
index 0337d25..9d63be8 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build.cpp
@@ -137,7 +137,7 @@ void DEG_add_scene_relation(DepsNodeHandle *handle, struct Scene *scene, eDepsSc
DepsNode *node = handle->node;
eDepsNode_Type type = deg_build_scene_component_type(component);
- DepsNode *comp_node = graph->find_node((ID *)scene, NULL, type, NULL);
+ DepsNode *comp_node = graph->find_node((ID *)scene, "", type, "");
if (comp_node)
graph->add_new_relation(comp_node, node, DEPSREL_TYPE_STANDARD, string(description));
}
@@ -148,7 +148,7 @@ void DEG_add_object_relation(DepsNodeHandle *handle, struct Object *ob, eDepsObj
DepsNode *node = handle->node;
eDepsNode_Type type = deg_build_object_component_type(component);
- DepsNode *comp_node = graph->find_node((ID *)ob, NULL, type, NULL);
+ DepsNode *comp_node = graph->find_node((ID *)ob, "", type, "");
if (comp_node)
graph->add_new_relation(comp_node, node, DEPSREL_TYPE_STANDARD, string(description));
}
@@ -1639,7 +1639,7 @@ void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
* - this way it should be the first in the graph,
* reflecting its role as the entrypoint
*/
- graph->root_node = (RootDepsNode *)graph->get_node(NULL, NULL, DEPSNODE_TYPE_ROOT, "Root (Scene)");
+ graph->root_node = (RootDepsNode *)graph->get_node(NULL, "", DEPSNODE_TYPE_ROOT, "Root (Scene)");
/* build graph for scene and all attached data */
scene_node = deg_build_scene_graph(graph, bmain, scene);
diff --git a/source/blender/depsgraph/intern/depsgraph_core.cpp b/source/blender/depsgraph/intern/depsgraph_core.cpp
index 4fc6de8..ac47c88 100644
--- a/source/blender/depsgraph/intern/depsgraph_core.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_core.cpp
@@ -123,7 +123,7 @@ void DEG_node_tag_update(Depsgraph *graph, DepsNode *node)
*/
void DEG_id_tag_update(Depsgraph *graph, const ID *id)
{
- DepsNode *node = graph->find_node(id, NULL, DEPSNODE_TYPE_ID_REF, NULL);
+ DepsNode *node = graph->find_node(id, "", DEPSNODE_TYPE_ID_REF, "");
DEG_node_tag_update(graph, node);
}
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cpp b/source/blender/depsgraph/intern/depsgraph_eval.cpp
index 017954b..ded973d 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cpp
@@ -150,7 +150,7 @@ void DEG_evaluate_on_framechange(Depsgraph *graph, eEvaluationContextType contex
TimeSourceDepsNode *tsrc;
/* update time on primary timesource */
- tsrc = (TimeSourceDepsNode *)graph->find_node(NULL, NULL, DEPSNODE_TYPE_TIMESOURCE, NULL);
+ tsrc = (TimeSourceDepsNode *)graph->find_node(NULL, "", DEPSNODE_TYPE_TIMESOURCE, "");
tsrc->cfra = ctime;
DEG_node_tag_update(graph, tsrc);
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cpp b/source/blender/depsgraph/intern/depsgraph_query.cpp
index bb5f149..1ba4b38 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_query.cpp
@@ -240,7 +240,7 @@ static DepsNode *deg_find_bone_node(Depsgraph *graph, const ID *id, const string
{
PoseComponentDepsNode *pose_comp;
- pose_comp = (PoseComponentDepsNode *)graph->find_node(id, NULL, DEPSNODE_TYPE_EVAL_POSE, "");
+ pose_comp = (PoseComponentDepsNode *)graph->find_node(id, "", DEPSNODE_TYPE_EVAL_POSE, "");
if (pose_comp) {
/* lookup bone component with matching name */
BoneComponentDepsNode *bone_node = pose_comp->find_bone_component(subdata);
diff --git a/source/blender/depsgraph/intern/depsnode.cpp b/source/blender/depsgraph/intern/depsnode.cpp
index b02634a..b3f378e 100644
--- a/source/blender/depsgraph/intern/depsnode.cpp
+++ b/source/blender/depsgraph/intern/depsnode.cpp
@@ -108,7 +108,7 @@ void TimeSourceDepsNode::add_to_graph(Depsgraph *graph, const ID *id)
/* determine which node to attach timesource to */
if (id) {
/* get ID node */
-// DepsNode *id_node = graph->get_node(id, NULL, DEPSNODE_TYPE_ID_REF, NULL);
+// DepsNode *id_node = graph->get_node(id, "", DEPSNODE_TYPE_ID_REF, "");
/* depends on what this is... */
switch (GS(id->name)) {
@@ -218,7 +218,7 @@ ComponentDepsNode *IDDepsNode::get_component(eDepsNode_Type type, const string &
ComponentDepsNode *comp_node = find_component(type);
if (!comp_node) {
DepsNodeFactory *factory = DEG_get_node_factory(type);
- comp_node = (ComponentDepsNode *)factory->create_node(this->id, NULL, name);
+ comp_node = (ComponentDepsNode *)factory->create_node(this->id, "", name);
/* register */
this->components[type] = comp_node;
diff --git a/source/blender/depsgraph/intern/depsnode_component.cpp b/source/blender/depsgraph/intern/depsnode_component.cpp
index 12a81b5..b4474d6 100644
--- a/source/blender/depsgraph/intern/depsnode_component.cpp
+++ b/source/blender/depsgraph/intern/depsnode_component.cpp
@@ -97,7 +97,7 @@ OperationDepsNode *ComponentDepsNode::add_operation(eDepsNode_Type type, eDepsOp
OperationDepsNode *op_node = find_operation(name);
if (!op_node) {
DepsNodeFactory *factory = DEG_get_node_factory(type);
- op_node = (OperationDepsNode *)factory->create_node(this->owner->id, NULL, name);
+ op_node = (OperationDepsNode *)factory->create_node(this->owner->id, "", name);
/* attach extra data */
op_node->evaluate = op;
op_node->optype = optype;
@@ -132,7 +132,7 @@ void ComponentDepsNode::clear_operations()
void ComponentDepsNode::add_to_graph(Depsgraph *graph, const ID *id)
{
/* find ID node that we belong to (and create it if it doesn't exist!) */
- IDDepsNode *id_node = (IDDepsNode *)graph->get_node(id, NULL, DEPSNODE_TYPE_ID_REF, NULL);
+ IDDepsNode *id_node = (IDDepsNode *)graph->get_node(id, "", DEPSNODE_TYPE_ID_REF, "");
BLI_assert(id_node != NULL);
/* add component to id */
@@ -232,17 +232,17 @@ void PoseComponentDepsNode::validate_links(Depsgraph *graph)
ob = (Object *)id;
/* create standard pose evaluation start/end hooks */
- rebuild_op = graph->add_operation(id, NULL, DEPSNODE_TYPE_OP_POSE,
+ rebuild_op = graph->add_operation(id, "", DEPSNODE_TYPE_OP_POSE,
DEPSOP_TYPE_REBUILD, BKE_pose_rebuild_op,
"Rebuild Pose");
RNA_pointer_create(id, &RNA_Pose, ob->pose, &rebuild_op->ptr);
- init_op = graph->add_operation(id, NULL, DEPSNODE_TYPE_OP_POSE,
+ init_op = graph->add_operation(id, "", DEPSNODE_TYPE_OP_POSE,
DEPSOP_TYPE_INIT, BKE_pose_eval_init,
"Init Pose Eval");
RNA_pointer_create(id, &RNA_Pose, ob->pose, &init_op->ptr);
- cleanup_op = graph->add_operation(id, NULL, DEPSNODE_TYPE_OP_POSE,
+ cleanup_op = graph->add_operation(id, "", DEPSNODE_TYPE_OP_POSE,
DEPSOP_TYPE_POST, BKE_pose_eval_flush,
"Flush Pose Eval");
RNA_pointer_create(id, &RNA_Pose, ob->pose, &cleanup_op->ptr);
@@ -289,7 +289,7 @@ void BoneComponentDepsNode::add_to_graph(Depsgraph *graph, const ID *id)
PoseComponentDepsNode *pose_node;
/* find pose node that we belong to (and create it if it doesn't exist!) */
- pose_node = (PoseComponentDepsNode *)graph->get_node(id, NULL, DEPSNODE_TYPE_EVAL_POSE, NULL);
+ pose_node = (PoseComponentDepsNode *)graph->get_node(id, "", DEPSNODE_TYPE_EVAL_POSE, "");
BLI_assert(pose_node != NULL);
/* add bone component to pose bone-hash */
diff --git a/source/blender/depsgraph/intern/depsnode_operation.cpp b/source/blender/depsgraph/intern/depsnode_operation.cpp
index e755bb0..ed75af1 100644
--- a/source/blender/depsgraph/intern/depsnode_operation.cpp
+++ b/source/blender/depsgraph/intern/depsnode_operation.cpp
@@ -51,7 +51,7 @@ extern "C" {
void OperationDepsNode::add_to_component_node(Depsgraph *graph, const ID *id, eDepsNode_Type component_type)
{
/* get component node to add operation to */
- ComponentDepsNode *component = (ComponentDepsNode *)graph->get_node(id, NULL, component_type, NULL);
+ ComponentDepsNode *component = (ComponentDepsNode *)graph->get_node(id, "", component_type, "");
/* add to hash table */
component->operations[this->name] = this;
@@ -196,7 +196,7 @@ void BoneOperationDepsNode::add_to_graph(Depsgraph *graph, const ID *id)
BLI_assert(this->ptr.type == &RNA_PoseBone);
pchan = (bPoseChannel *)this->ptr.data;
- bone_comp = (BoneComponentDepsNode *)graph->get_node(id, pchan->name, DEPSNODE_TYPE_BONE, NULL);
+ bone_comp = (BoneComponentDepsNode *)graph->get_node(id, pchan->name, DEPSNODE_TYPE_BONE, "");
/* add to hash table */
bone_comp->operations[pchan->name] = this;
More information about the Bf-blender-cvs
mailing list