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-11-30 18:44:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-01 13:40:50 +0300
commit27a1bd445bc157d0798a1106573d750208de9d2f (patch)
tree3f2b9934e7a5ca2be70e30c024702f675a132e88 /source/blender/depsgraph
parent2838a7646be89ebd64db886cfe6d3bc5275f6463 (diff)
Depsgraph: Cleanup, naming
It makes more sense to stick to DEG_iterator_object order in name, since we can have functions to iterate over different entities and we want all of them to have common prefix.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h24
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc26
2 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 36d44a06eac..dd7d6182081 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -70,13 +70,13 @@ struct ID *DEG_get_evaluated_id(struct Depsgraph *depsgraph, struct ID *id);
/* ************************ DAG iterators ********************* */
enum {
- DEG_OBJECT_ITER_FLAG_SET = (1 << 0),
- DEG_OBJECT_ITER_FLAG_DUPLI = (1 << 1),
+ DEG_ITER_OBJECT_FLAG_SET = (1 << 0),
+ DEG_ITER_OBJECT_FLAG_DUPLI = (1 << 1),
};
-#define DEG_OBJECT_ITER_FLAG_ALL (DEG_OBJECT_ITER_FLAG_SET | DEG_OBJECT_ITER_FLAG_DUPLI)
+#define DEG_ITER_OBJECT_FLAG_ALL (DEG_ITER_OBJECT_FLAG_SET | DEG_ITER_OBJECT_FLAG_DUPLI)
-typedef struct DEGObjectsIteratorData {
+typedef struct DEGOIterObjectData {
struct Depsgraph *graph;
struct Scene *scene;
struct EvaluationContext eval_ctx;
@@ -103,22 +103,22 @@ typedef struct DEGObjectsIteratorData {
/* **** Iteration ober ID nodes **** */
size_t id_node_index;
size_t num_id_nodes;
-} DEGObjectsIteratorData;
+} DEGOIterObjectData;
-void DEG_objects_iterator_begin(struct BLI_Iterator *iter, DEGObjectsIteratorData *data);
-void DEG_objects_iterator_next(struct BLI_Iterator *iter);
-void DEG_objects_iterator_end(struct BLI_Iterator *iter);
+void DEG_iterator_objects_begin(struct BLI_Iterator *iter, DEGOIterObjectData *data);
+void DEG_iterator_objects_next(struct BLI_Iterator *iter);
+void DEG_iterator_objects_end(struct BLI_Iterator *iter);
#define DEG_OBJECT_ITER(graph_, instance_, flag_) \
{ \
- DEGObjectsIteratorData data_ = { \
+ DEGOIterObjectData data_ = { \
.graph = (graph_), \
.flag = (flag_), \
}; \
\
- ITER_BEGIN(DEG_objects_iterator_begin, \
- DEG_objects_iterator_next, \
- DEG_objects_iterator_end, \
+ ITER_BEGIN(DEG_iterator_objects_begin, \
+ DEG_iterator_objects_next, \
+ DEG_iterator_objects_end, \
&data_, Object *, instance_)
#define DEG_OBJECT_ITER_END \
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index f2288e93beb..992097c9d31 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -126,7 +126,7 @@ ID *DEG_get_evaluated_id(struct Depsgraph *depsgraph, ID *id)
static bool deg_objects_dupli_iterator_next(BLI_Iterator *iter)
{
- DEGObjectsIteratorData *data = (DEGObjectsIteratorData *)iter->data;
+ DEGOIterObjectData *data = (DEGOIterObjectData *)iter->data;
while (data->dupli_object_next != NULL) {
DupliObject *dob = data->dupli_object_next;
Object *obd = dob->ob;
@@ -166,12 +166,12 @@ static bool deg_objects_dupli_iterator_next(BLI_Iterator *iter)
return false;
}
-static void deg_objects_iterator_step(BLI_Iterator *iter, DEG::IDDepsNode *id_node)
+static void DEG_iterator_objects_step(BLI_Iterator *iter, DEG::IDDepsNode *id_node)
{
/* Reset the skip in case we are running from within a loop. */
iter->skip = false;
- DEGObjectsIteratorData *data = (DEGObjectsIteratorData *)iter->data;
+ DEGOIterObjectData *data = (DEGOIterObjectData *)iter->data;
const ID_Type id_type = GS(id_node->id_orig->name);
if (id_type != ID_OB) {
@@ -183,7 +183,7 @@ static void deg_objects_iterator_step(BLI_Iterator *iter, DEG::IDDepsNode *id_no
case DEG::DEG_ID_LINKED_DIRECTLY:
break;
case DEG::DEG_ID_LINKED_VIA_SET:
- if (data->flag & DEG_OBJECT_ITER_FLAG_SET) {
+ if (data->flag & DEG_ITER_OBJECT_FLAG_SET) {
break;
}
else {
@@ -197,7 +197,7 @@ static void deg_objects_iterator_step(BLI_Iterator *iter, DEG::IDDepsNode *id_no
Object *object = (Object *)id_node->id_cow;
BLI_assert(DEG::deg_validate_copy_on_write_datablock(&object->id));
- if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (object->transflag & OB_DUPLI)) {
+ if ((data->flag & DEG_ITER_OBJECT_FLAG_DUPLI) && (object->transflag & OB_DUPLI)) {
data->dupli_parent = object;
data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, object);
data->dupli_object_next = (DupliObject *)data->dupli_list->first;
@@ -206,7 +206,7 @@ static void deg_objects_iterator_step(BLI_Iterator *iter, DEG::IDDepsNode *id_no
iter->current = object;
}
-void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data)
+void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGOIterObjectData *data)
{
Depsgraph *depsgraph = data->graph;
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
@@ -231,16 +231,16 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data
data->num_id_nodes = num_id_nodes;
DEG::IDDepsNode *id_node = deg_graph->id_nodes[data->id_node_index];
- deg_objects_iterator_step(iter, id_node);
+ DEG_iterator_objects_step(iter, id_node);
if (iter->skip) {
- DEG_objects_iterator_next(iter);
+ DEG_iterator_objects_next(iter);
}
}
-void DEG_objects_iterator_next(BLI_Iterator *iter)
+void DEG_iterator_objects_next(BLI_Iterator *iter)
{
- DEGObjectsIteratorData *data = (DEGObjectsIteratorData *)iter->data;
+ DEGOIterObjectData *data = (DEGOIterObjectData *)iter->data;
Depsgraph *depsgraph = data->graph;
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
do {
@@ -264,14 +264,14 @@ void DEG_objects_iterator_next(BLI_Iterator *iter)
}
DEG::IDDepsNode *id_node = deg_graph->id_nodes[data->id_node_index];
- deg_objects_iterator_step(iter, id_node);
+ DEG_iterator_objects_step(iter, id_node);
} while (iter->skip);
}
-void DEG_objects_iterator_end(BLI_Iterator *iter)
+void DEG_iterator_objects_end(BLI_Iterator *iter)
{
#ifndef NDEBUG
- DEGObjectsIteratorData *data = (DEGObjectsIteratorData *)iter->data;
+ DEGOIterObjectData *data = (DEGOIterObjectData *)iter->data;
/* Force crash in case the iterator data is referenced and accessed down the line. (T51718) */
memset(&data->temp_dupli_object, 0xff, sizeof(data->temp_dupli_object));
#else