diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/depsgraph/DEG_depsgraph_query.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index ce4508461ef..89e4958eddc 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -79,12 +79,10 @@ struct Scene *DEG_get_evaluated_scene(const struct Depsgraph *graph); struct ViewLayer *DEG_get_evaluated_view_layer(const struct Depsgraph *graph); /* Get evaluated version of object for given original one. */ -struct Object *DEG_get_evaluated_object(const struct Depsgraph *depsgraph, - struct Object *object); +struct Object *DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object); /* Get evaluated version of given ID datablock. */ -struct ID *DEG_get_evaluated_id(const struct Depsgraph *depsgraph, - struct ID *id); +struct ID *DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id); /* Get evaluated version of data pointed to by RNA pointer */ void DEG_get_evaluated_rna_pointer(const struct Depsgraph *depsgraph, @@ -100,39 +98,39 @@ struct ID *DEG_get_original_id(struct ID *id); /* ************************ DEG object iterators ********************* */ enum { - DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY = (1 << 0), - DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY = (1 << 1), - DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET = (1 << 2), - DEG_ITER_OBJECT_FLAG_VISIBLE = (1 << 3), - DEG_ITER_OBJECT_FLAG_DUPLI = (1 << 4), + DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY = (1 << 0), + DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY = (1 << 1), + DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET = (1 << 2), + DEG_ITER_OBJECT_FLAG_VISIBLE = (1 << 3), + DEG_ITER_OBJECT_FLAG_DUPLI = (1 << 4), }; typedef struct DEGObjectIterData { - struct Depsgraph *graph; - int flag; - - struct Scene *scene; - - eEvaluationMode eval_mode; - - /* **** Iteration over dupli-list. *** */ - - /* Object which created the dupli-list. */ - struct Object *dupli_parent; - /* List of duplicated objects. */ - struct ListBase *dupli_list; - /* Next duplicated object to step into. */ - struct DupliObject *dupli_object_next; - /* Corresponds to current object: current iterator object is evaluated from - * this duplicated object. */ - struct DupliObject *dupli_object_current; - /* Temporary storage to report fully populated DNA to the render engine or - * other users of the iterator. */ - struct Object temp_dupli_object; - - /* **** Iteration over ID nodes **** */ - size_t id_node_index; - size_t num_id_nodes; + struct Depsgraph *graph; + int flag; + + struct Scene *scene; + + eEvaluationMode eval_mode; + + /* **** Iteration over dupli-list. *** */ + + /* Object which created the dupli-list. */ + struct Object *dupli_parent; + /* List of duplicated objects. */ + struct ListBase *dupli_list; + /* Next duplicated object to step into. */ + struct DupliObject *dupli_object_next; + /* Corresponds to current object: current iterator object is evaluated from + * this duplicated object. */ + struct DupliObject *dupli_object_current; + /* Temporary storage to report fully populated DNA to the render engine or + * other users of the iterator. */ + struct Object temp_dupli_object; + + /* **** Iteration over ID nodes **** */ + size_t id_node_index; + size_t num_id_nodes; } DEGObjectIterData; void DEG_iterator_objects_begin(struct BLI_Iterator *iter, DEGObjectIterData *data); @@ -144,44 +142,45 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter); * Although they are available they have no overrides (collection_properties) * and will crash if you try to access it. */ -#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, flag_) \ - { \ - DEGObjectIterData data_ = { \ - graph_, \ - flag_, \ - }; \ - \ - ITER_BEGIN(DEG_iterator_objects_begin, \ - DEG_iterator_objects_next, \ - DEG_iterator_objects_end, \ - &data_, Object *, instance_) - -#define DEG_OBJECT_ITER_END \ - ITER_END; \ - } ((void)0) +#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, flag_) \ + { \ + DEGObjectIterData data_ = { \ + graph_, \ + flag_, \ + }; \ +\ + ITER_BEGIN (DEG_iterator_objects_begin, \ + DEG_iterator_objects_next, \ + DEG_iterator_objects_end, \ + &data_, \ + Object *, \ + instance_) + +#define DEG_OBJECT_ITER_END \ + ITER_END; \ + } \ + ((void)0) /** * Depsgraph objects iterator for draw manager and final render */ -#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(graph_, instance_) \ - DEG_OBJECT_ITER_BEGIN(graph_, instance_, \ - DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | \ - DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET | \ - DEG_ITER_OBJECT_FLAG_VISIBLE | \ - DEG_ITER_OBJECT_FLAG_DUPLI) - -#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END \ - DEG_OBJECT_ITER_END +#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(graph_, instance_) \ + DEG_OBJECT_ITER_BEGIN (graph_, \ + instance_, \ + DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | \ + DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET | DEG_ITER_OBJECT_FLAG_VISIBLE | \ + DEG_ITER_OBJECT_FLAG_DUPLI) +#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END DEG_OBJECT_ITER_END /* ************************ DEG ID iterators ********************* */ typedef struct DEGIDIterData { - struct Depsgraph *graph; - bool only_updated; + struct Depsgraph *graph; + bool only_updated; - size_t id_node_index; - size_t num_id_nodes; + size_t id_node_index; + size_t num_id_nodes; } DEGIDIterData; void DEG_iterator_ids_begin(struct BLI_Iterator *iter, DEGIDIterData *data); @@ -197,48 +196,49 @@ typedef void (*DEGForeachIDCallback)(ID *id, void *user_data); */ void DEG_foreach_ancestor_ID(const Depsgraph *depsgraph, const ID *id, - DEGForeachIDCallback callback, void *user_data); + DEGForeachIDCallback callback, + void *user_data); void DEG_foreach_dependent_ID(const Depsgraph *depsgraph, const ID *id, - DEGForeachIDCallback callback, void *user_data); + DEGForeachIDCallback callback, + void *user_data); -void DEG_foreach_ID(const Depsgraph *depsgraph, - DEGForeachIDCallback callback, void *user_data); +void DEG_foreach_ID(const Depsgraph *depsgraph, DEGForeachIDCallback callback, void *user_data); /* ********************* DEG graph filtering ****************** */ /* ComponentKey for nodes we want to be able to evaluate in the filtered graph */ typedef struct DEG_FilterTarget { - struct DEG_FilterTarget *next, *prev; + struct DEG_FilterTarget *next, *prev; - struct ID *id; - /* TODO: component identifiers - Component Type, Subdata/Component Name */ + struct ID *id; + /* TODO: component identifiers - Component Type, Subdata/Component Name */ } DEG_FilterTarget; typedef enum eDEG_FilterQuery_Granularity { - DEG_FILTER_NODES_ALL = 0, - DEG_FILTER_NODES_NO_OPS = 1, - DEG_FILTER_NODES_ID_ONLY = 2, + DEG_FILTER_NODES_ALL = 0, + DEG_FILTER_NODES_NO_OPS = 1, + DEG_FILTER_NODES_ID_ONLY = 2, } eDEG_FilterQuery_Granularity; - typedef struct DEG_FilterQuery { - /* List of DEG_FilterTarget's */ - struct ListBase targets; + /* List of DEG_FilterTarget's */ + struct ListBase targets; - /* Level of detail in the resulting graph */ - eDEG_FilterQuery_Granularity detail_level; + /* Level of detail in the resulting graph */ + eDEG_FilterQuery_Granularity detail_level; } DEG_FilterQuery; /* Obtain a new graph instance that only contains the subset of desired nodes * WARNING: Do NOT pass an already filtered depsgraph through this function again, * as we are currently unable to accurately recreate it. */ -Depsgraph *DEG_graph_filter(const Depsgraph *depsgraph, struct Main *bmain, DEG_FilterQuery *query); - +Depsgraph *DEG_graph_filter(const Depsgraph *depsgraph, + struct Main *bmain, + DEG_FilterQuery *query); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* __DEG_DEPSGRAPH_QUERY_H__ */ +#endif /* __DEG_DEPSGRAPH_QUERY_H__ */ |