Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-01-26 18:29:09 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-01-26 18:29:09 +0300
commit3c3c52a74b3fd59496bae7868951b0ef71510d5d (patch)
tree4d70eb2a9a2395d436cd91a3a9827c61f32761d6 /source/blender
parentac58a7fa190de82ee8265cfe9f1b7a7323b86982 (diff)
Depsgraph: Remove owner node argument which was simply passed around
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc42
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.h8
2 files changed, 24 insertions, 26 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 3a9ae490c0a..173d5c32212 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -643,18 +643,18 @@ void DepsgraphNodeBuilder::build_world(World *world)
}
/* world itself */
- IDDepsNode *world_node = add_id_node(world_id); /* world shading/params? */
+ add_id_node(world_id); /* world shading/params? */
build_animdata(world_id);
/* TODO: other settings? */
/* textures */
- build_texture_stack(world_node, world->mtex);
+ build_texture_stack(world->mtex);
/* world's nodetree */
if (world->nodetree) {
- build_nodetree(world_node, world->nodetree);
+ build_nodetree(world->nodetree);
}
}
@@ -827,9 +827,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
for (int a = 1; a <= ob->totcol; a++) {
Material *ma = give_current_material(ob, a);
if (ma != NULL) {
- // XXX?!
- ComponentDepsNode *geom_node = add_component_node(&ob->id, DEPSNODE_TYPE_GEOMETRY);
- build_material(geom_node, ma);
+ build_material(ma);
}
}
@@ -993,7 +991,7 @@ void DepsgraphNodeBuilder::build_lamp(Object *ob)
build_animdata(&la->id);
/* node for obdata */
- ComponentDepsNode *param_node = add_component_node(lamp_id, DEPSNODE_TYPE_PARAMETERS);
+ add_component_node(lamp_id, DEPSNODE_TYPE_PARAMETERS);
/* TODO(sergey): Is it really how we're supposed to work with drivers? */
add_operation_node(lamp_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
@@ -1001,14 +999,14 @@ void DepsgraphNodeBuilder::build_lamp(Object *ob)
/* lamp's nodetree */
if (la->nodetree) {
- build_nodetree(param_node, la->nodetree);
+ build_nodetree(la->nodetree);
}
/* textures */
- build_texture_stack(param_node, la->mtex);
+ build_texture_stack(la->mtex);
}
-void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree)
+void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree)
{
if (!ntree)
return;
@@ -1028,10 +1026,10 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
if (id != NULL) {
short id_type = GS(id->name);
if (id_type == ID_MA) {
- build_material(owner_node, (Material *)id);
+ build_material((Material *)id);
}
else if (id_type == ID_TE) {
- build_texture(owner_node, (Tex *)id);
+ build_texture((Tex *)id);
}
else if (id_type == ID_IM) {
build_image((Image *)id);
@@ -1039,7 +1037,7 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
else if (bnode->type == NODE_GROUP) {
bNodeTree *group_ntree = (bNodeTree *)id;
if ((group_ntree->id.tag & LIB_TAG_DOIT) == 0) {
- build_nodetree(owner_node, group_ntree);
+ build_nodetree(group_ntree);
}
}
}
@@ -1049,7 +1047,7 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
}
/* Recursively build graph for material */
-void DepsgraphNodeBuilder::build_material(DepsNode *owner_node, Material *ma)
+void DepsgraphNodeBuilder::build_material(Material *ma)
{
ID *ma_id = &ma->id;
if (ma_id->tag & LIB_TAG_DOIT) {
@@ -1067,14 +1065,14 @@ void DepsgraphNodeBuilder::build_material(DepsNode *owner_node, Material *ma)
build_animdata(ma_id);
/* textures */
- build_texture_stack(owner_node, ma->mtex);
+ build_texture_stack(ma->mtex);
/* material's nodetree */
- build_nodetree(owner_node, ma->nodetree);
+ build_nodetree(ma->nodetree);
}
/* Texture-stack attached to some shading datablock */
-void DepsgraphNodeBuilder::build_texture_stack(DepsNode *owner_node, MTex **texture_stack)
+void DepsgraphNodeBuilder::build_texture_stack(MTex **texture_stack)
{
int i;
@@ -1082,12 +1080,12 @@ void DepsgraphNodeBuilder::build_texture_stack(DepsNode *owner_node, MTex **text
for (i = 0; i < MAX_MTEX; i++) {
MTex *mtex = texture_stack[i];
if (mtex && mtex->tex)
- build_texture(owner_node, mtex->tex);
+ build_texture(mtex->tex);
}
}
/* Recursively build graph for texture */
-void DepsgraphNodeBuilder::build_texture(DepsNode *owner_node, Tex *tex)
+void DepsgraphNodeBuilder::build_texture(Tex *tex)
{
ID *tex_id = &tex->id;
if (tex_id->tag & LIB_TAG_DOIT) {
@@ -1097,7 +1095,7 @@ void DepsgraphNodeBuilder::build_texture(DepsNode *owner_node, Tex *tex)
/* Texture itself. */
build_animdata(tex_id);
/* Texture's nodetree. */
- build_nodetree(owner_node, tex->nodetree);
+ build_nodetree(tex->nodetree);
/* Special cases for different IDs which texture uses. */
if (tex->type == TEX_IMAGE) {
if (tex->ima != NULL) {
@@ -1131,8 +1129,8 @@ void DepsgraphNodeBuilder::build_compositor(Scene *scene)
//graph->get_node(&scene->id, NULL, DEPSNODE_TYPE_COMPOSITING, NULL);
/* for now, nodetrees are just parameters; compositing occurs in internals of renderer... */
- ComponentDepsNode *owner_node = add_component_node(&scene->id, DEPSNODE_TYPE_PARAMETERS);
- build_nodetree(owner_node, scene->nodetree);
+ add_component_node(&scene->id, DEPSNODE_TYPE_PARAMETERS);
+ build_nodetree(scene->nodetree);
}
void DepsgraphNodeBuilder::build_gpencil(bGPdata *gpd)
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index 803110c9c80..c5035f35f6e 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -149,10 +149,10 @@ struct DepsgraphNodeBuilder {
void build_obdata_geom(Scene *scene, Object *ob);
void build_camera(Object *ob);
void build_lamp(Object *ob);
- void build_nodetree(DepsNode *owner_node, bNodeTree *ntree);
- void build_material(DepsNode *owner_node, Material *ma);
- void build_texture(DepsNode *owner_node, Tex *tex);
- void build_texture_stack(DepsNode *owner_node, MTex **texture_stack);
+ void build_nodetree(bNodeTree *ntree);
+ void build_material(Material *ma);
+ void build_texture(Tex *tex);
+ void build_texture_stack(MTex **texture_stack);
void build_image(Image *image);
void build_world(World *world);
void build_compositor(Scene *scene);