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/makesrna/intern/rna_object_force.c
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/makesrna/intern/rna_object_force.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index aeb9c0fcc43..ee58fff2e78 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -119,7 +119,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
PTCacheID pid = BKE_ptcache_id_find(ob, NULL, cache);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
if (pid.cache) {
/* Just make sure this wasn't changed. */
@@ -164,7 +164,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
BKE_ptcache_load_external(&pid);
}
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_POINTCACHE, ob);
}
else {
@@ -452,7 +452,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
part->pd2->tex = NULL;
}
- DEG_id_tag_update(&part->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_PSYS_RESET);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
@@ -464,7 +464,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
ob->pd->tex = NULL;
}
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
}
}
@@ -500,7 +500,7 @@ static void rna_FieldSettings_type_set(PointerRNA *ptr, int value)
static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
if (particle_id_check(ptr)) {
- DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET);
+ DEG_id_tag_update((ID *)ptr->id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_PSYS_RESET);
}
else {
Object *ob = (Object *)ptr->id.data;
@@ -519,9 +519,9 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
DEG_relations_tag_update(bmain);
if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
else
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
}
@@ -565,7 +565,7 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
FOREACH_SCENE_OBJECT_END;
}
else {
- DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
}
@@ -574,7 +574,7 @@ static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *UNUSED(scen
{
DEG_relations_tag_update(bmain);
- DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update((ID *)ptr->id.data, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
@@ -671,7 +671,7 @@ static void rna_CollisionSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scen
{
Object *ob = (Object *)ptr->id.data;
- DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
}
@@ -679,7 +679,7 @@ static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point
{
Object *ob = (Object *)ptr->id.data;
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
}