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-07-24 16:33:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-24 17:24:41 +0300
commit7b420e19083c7069e6c0edcd0d41eb144375675a (patch)
tree147bac95b502197c1cb89798771202c1011733f4 /source/blender
parent7721f8a2695baf0d2dcae4e0c53056816e596729 (diff)
Depsgraph: Be consistent about id type variable name
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph.h2
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc22
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index f817fc31fba..8af186eae05 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -176,7 +176,7 @@ void DEG_id_tag_update_ex(struct Main *bmain,
* Used by all sort of render engines to quickly check if
* IDs of a given type need to be checked for update.
*/
-void DEG_id_type_tag(struct Main *bmain, short idtype);
+void DEG_id_type_tag(struct Main *bmain, short id_type);
void DEG_ids_clear_recalc(struct Main *bmain);
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 04584c07d4b..1020d4e606e 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -50,7 +50,7 @@ extern "C" {
#endif
/* Check if given ID type was tagged for update. */
-bool DEG_id_type_tagged(struct Main *bmain, short idtype);
+bool DEG_id_type_tagged(struct Main *bmain, short id_type);
/* Get additional evaluation flags for the given ID. */
short DEG_get_eval_flags_for_id(struct Depsgraph *graph, struct ID *id);
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index 4e0ab0f77a0..0dd3cfaa783 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -53,9 +53,9 @@ extern "C" {
# include "intern/eval/deg_eval_copy_on_write.h"
#endif
-bool DEG_id_type_tagged(Main *bmain, short idtype)
+bool DEG_id_type_tagged(Main *bmain, short id_type)
{
- return bmain->id_tag_update[BKE_idcode_to_index(idtype)] != 0;
+ return bmain->id_tag_update[BKE_idcode_to_index(id_type)] != 0;
}
short DEG_get_eval_flags_for_id(Depsgraph *graph, ID *id)
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 829014beaf8..ce80f30f359 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -108,8 +108,8 @@ void lib_id_recalc_tag_flag(Main *bmain, ID *id, int flag)
* after relations update and after layer visibility changes.
*/
if (flag) {
- short idtype = GS(id->name);
- if (idtype == ID_OB) {
+ short id_type = GS(id->name);
+ if (id_type == ID_OB) {
Object *object = (Object *)id;
object->recalc |= (flag & OB_RECALC_ALL);
}
@@ -151,9 +151,9 @@ void id_tag_update_object_transform(Depsgraph *graph, IDDepsNode *id_node)
/* Tag corresponding to OB_RECALC_DATA. */
void id_tag_update_object_data(Depsgraph *graph, IDDepsNode *id_node)
{
- const short idtype = GS(id_node->id_orig->name);
+ const short id_type = GS(id_node->id_orig->name);
ComponentDepsNode *data_comp = NULL;
- switch (idtype) {
+ switch (id_type) {
case ID_OB:
{
const Object *object = (Object *)id_node->id_orig;
@@ -190,7 +190,7 @@ void id_tag_update_object_data(Depsgraph *graph, IDDepsNode *id_node)
/* Special legacy compatibility code, tag data ID for update when object
* is tagged for data update.
*/
- if (idtype == ID_OB) {
+ if (id_type == ID_OB) {
Object *object = (Object *)id_node->id_orig;
ID *data_id = (ID *)object->data;
if (data_id != NULL) {
@@ -316,8 +316,8 @@ void deg_graph_on_visible_update(Main *bmain, Scene *scene, Depsgraph *graph)
/* Make sure objects are up to date. */
GHASH_FOREACH_BEGIN(DEG::IDDepsNode *, id_node, graph->id_hash)
{
- const short idtype = GS(id_node->id_orig->name);
- if (idtype != ID_OB) {
+ const short id_type = GS(id_node->id_orig->name);
+ if (id_type != ID_OB) {
/* Ignore non-object nodes on visibility changes. */
continue;
}
@@ -328,7 +328,7 @@ void deg_graph_on_visible_update(Main *bmain, Scene *scene, Depsgraph *graph)
*
* TODO(sergey): Need to generalize this somehow.
*/
- if (idtype == ID_OB) {
+ if (id_type == ID_OB) {
Object *object = (Object *)id_node->id_orig;
flag |= OB_RECALC_OB;
if (ELEM(object->type, OB_MESH,
@@ -370,9 +370,9 @@ void DEG_id_tag_update_ex(Main *bmain, ID *id, int flag)
}
/* Tag given ID type for update. */
-void DEG_id_type_tag(Main *bmain, short idtype)
+void DEG_id_type_tag(Main *bmain, short id_type)
{
- if (idtype == ID_NT) {
+ if (id_type == ID_NT) {
/* Stupid workaround so parent datablocks of nested nodetree get looped
* over when we loop over tagged datablock types.
*/
@@ -383,7 +383,7 @@ void DEG_id_type_tag(Main *bmain, short idtype)
DEG_id_type_tag(bmain, ID_SCE);
}
- bmain->id_tag_update[BKE_idcode_to_index(idtype)] = 1;
+ bmain->id_tag_update[BKE_idcode_to_index(id_type)] = 1;
}
/* Recursively push updates out to all nodes dependent on this,