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>2018-12-06 19:52:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-07 13:37:38 +0300
commit79312c1912b4fdb830e38a856cf88bfca8e4703d (patch)
tree74d5b262de9cd5d044e1963df13f2cbe73c3b796 /source/blender/depsgraph/DEG_depsgraph.h
parent989fbff16f49204ca31a67f56f87c2221e0246f4 (diff)
Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph.h')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 4cfeb206b97..410f5554069 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -55,6 +55,8 @@
#ifndef __DEG_DEPSGRAPH_H__
#define __DEG_DEPSGRAPH_H__
+#include "DNA_ID.h"
+
/* Dependency Graph */
typedef struct Depsgraph Depsgraph;
@@ -122,39 +124,7 @@ void DEG_graph_on_visible_update(struct Main *bmain, Depsgraph *depsgraph);
/* Update all dependency graphs when visible scenes/layers changes. */
void DEG_on_visible_update(struct Main *bmain, const bool do_time);
-/* Tag given ID for an update in all the dependency graphs. */
-typedef enum eDepsgraph_Tag {
- /* Object transformation changed, corresponds to OB_RECALC_OB. */
- DEG_TAG_TRANSFORM = (1 << 0),
- /* Object geometry changed, corresponds to OB_RECALC_DATA. */
- DEG_TAG_GEOMETRY = (1 << 1),
- /* Time changed and animation is to be re-evaluated, OB_RECALC_TIME. */
- DEG_TAG_TIME = (1 << 2),
- /* Particle system changed; values are aligned with PSYS_RECALC_xxx. */
- DEG_TAG_PSYS_REDO = (1 << 3),
- DEG_TAG_PSYS_RESET = (1 << 4),
- DEG_TAG_PSYS_TYPE = (1 << 5),
- DEG_TAG_PSYS_CHILD = (1 << 6),
- DEG_TAG_PSYS_PHYS = (1 << 7),
- DEG_TAG_PSYS_ALL = (DEG_TAG_PSYS_REDO |
- DEG_TAG_PSYS_RESET |
- DEG_TAG_PSYS_TYPE |
- DEG_TAG_PSYS_CHILD |
- DEG_TAG_PSYS_PHYS),
- /* Update copy on write component without flushing down the road. */
- DEG_TAG_COPY_ON_WRITE = (1 << 8),
- /* Tag shading components for update.
- * Only parameters of material changed).
- */
- DEG_TAG_SHADING_UPDATE = (1 << 9),
- DEG_TAG_SELECT_UPDATE = (1 << 10),
- DEG_TAG_BASE_FLAGS_UPDATE = (1 << 11),
- DEG_TAG_POINT_CACHE_UPDATE = (1 << 12),
- /* Only inform editors about the change. Don't modify datablock itself. */
- DEG_TAG_EDITORS_UPDATE = (1 << 13),
-} eDepsgraph_Tag;
-
-const char *DEG_update_tag_as_string(eDepsgraph_Tag flag);
+const char *DEG_update_tag_as_string(IDRecalcFlag flag);
void DEG_id_tag_update(struct ID *id, int flag);
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag);
@@ -166,8 +136,7 @@ void DEG_graph_id_tag_update(struct Main *bmain,
/* Mark a particular datablock type as having changing. This does
* not cause any updates but is used by external render engines to detect if for
- * example a datablock was removed.
- */
+ * example a datablock was removed. */
void DEG_id_type_tag(struct Main *bmain, short id_type);
void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph);