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/editors/physics
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/editors/physics')
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c4
-rw-r--r--source/blender/editors/physics/particle_boids.c12
-rw-r--r--source/blender/editors/physics/particle_edit.c34
-rw-r--r--source/blender/editors/physics/particle_edit_undo.c2
-rw-r--r--source/blender/editors/physics/particle_object.c28
-rw-r--r--source/blender/editors/physics/rigidbody_constraint.c8
-rw-r--r--source/blender/editors/physics/rigidbody_object.c10
-rw-r--r--source/blender/editors/physics/rigidbody_world.c4
8 files changed, 51 insertions, 51 deletions
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 5fb03b628b2..dc38cc76604 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -137,7 +137,7 @@ static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
}
dynamicPaint_resetPreview(canvas);
- DEG_id_tag_update(&obj_ctx->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&obj_ctx->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, obj_ctx);
return OPERATOR_FINISHED;
@@ -183,7 +183,7 @@ static int type_toggle_exec(bContext *C, wmOperator *op)
}
/* update dependency */
- DEG_id_tag_update(&cObject->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&cObject->id, ID_RECALC_GEOMETRY);
DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, cObject);
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index f1e0fd39014..9f85ed08244 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -77,7 +77,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
BLI_addtail(&state->rules, rule);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
return OPERATOR_FINISHED;
}
@@ -124,7 +124,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
rule->flag |= BOIDRULE_CURRENT;
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
return OPERATOR_FINISHED;
}
@@ -160,7 +160,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&state->rules, rule);
BLI_insertlinkbefore(&state->rules, rule->prev, rule);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
break;
}
}
@@ -196,7 +196,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&state->rules, rule);
BLI_insertlinkafter(&state->rules, rule->next, rule);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
break;
}
}
@@ -280,7 +280,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
state->flag |= BOIDSTATE_CURRENT;
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
return OPERATOR_FINISHED;
}
@@ -351,7 +351,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
if (state->flag & BOIDSTATE_CURRENT && state->next) {
BLI_remlink(&boids->states, state);
BLI_insertlinkafter(&boids->states, state->next, state);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
break;
}
}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index dcf6cfab407..d5daaaa3812 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1385,7 +1385,7 @@ static void PE_update_selection(Depsgraph *depsgraph, Scene *scene, Object *ob,
point->flag &= ~PEP_EDIT_RECALC;
}
- DEG_id_tag_update(&ob->id, DEG_TAG_SELECT_UPDATE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_SELECT);
}
void update_world_cos(Depsgraph *UNUSED(depsgraph), Object *ob, PTCacheEdit *edit)
@@ -2827,7 +2827,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "Removed %d double particles", totremoved);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
return OPERATOR_FINISHED;
@@ -2879,7 +2879,7 @@ static int weight_set_exec(bContext *C, wmOperator *op)
}
}
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
return OPERATOR_FINISHED;
@@ -2994,7 +2994,7 @@ static int delete_exec(bContext *C, wmOperator *op)
recalc_lengths(data.edit);
}
- DEG_id_tag_update(&data.ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&data.ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, data.ob);
return OPERATOR_FINISHED;
@@ -3180,7 +3180,7 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op))
update_world_cos(CTX_data_depsgraph(C), ob, edit);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
return OPERATOR_FINISHED;
}
@@ -4300,7 +4300,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
update_world_cos(depsgraph, ob, edit);
psys_free_path_cache(NULL, edit);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
else {
PE_update_object(depsgraph, scene, ob, 1);
@@ -4310,10 +4310,10 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
if (edit->psys) {
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
- DEG_id_tag_update(&ob->id, DEG_TAG_SELECT_UPDATE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_SELECT);
}
else {
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
}
@@ -4570,7 +4570,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
if (removed) {
update_world_cos(depsgraph, ob, edit);
psys_free_path_cache(NULL, edit);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
else {
PE_update_object(data.depsgraph, scene, ob, 1);
@@ -4579,10 +4579,10 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
if (edit->psys) {
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
- DEG_id_tag_update(&ob->id, DEG_TAG_SELECT_UPDATE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_SELECT);
}
else {
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
}
@@ -4854,7 +4854,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL);
}
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
WM_msg_publish_rna_prop(mbus, &ob->id, ob, Object, mode);
@@ -4893,21 +4893,21 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op))
psys->edit = NULL;
psys->free_edit = NULL;
- psys->recalc |= PSYS_RECALC_RESET;
+ psys->recalc |= ID_RECALC_PSYS_RESET;
psys->flag &= ~PSYS_GLOBAL_HAIR;
psys->flag &= ~PSYS_EDITED;
psys_reset(psys, PSYS_RESET_DEPSGRAPH);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
}
else { /* some operation might have protected hair from editing so let's clear the flag */
- psys->recalc |= PSYS_RECALC_RESET;
+ psys->recalc |= ID_RECALC_PSYS_RESET;
psys->flag &= ~PSYS_GLOBAL_HAIR;
psys->flag &= ~PSYS_EDITED;
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
return OPERATOR_FINISHED;
@@ -5025,7 +5025,7 @@ static int unify_length_exec(bContext *C, wmOperator *UNUSED(op))
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
}
else {
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
}
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index 56b683e1ab8..911a1ce0676 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -260,7 +260,7 @@ static void particle_undosys_step_decode(struct bContext *C, UndoStep *us_p, int
PTCacheEdit *edit = PE_get_current(scene, ob);
if (edit) {
undoptcache_to_editcache(&us->data, edit);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
else {
BLI_assert(0);
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 228bf2c648f..4619e063dd1 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -193,7 +193,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
psys_check_boid_data(psys);
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
@@ -241,7 +241,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
BLI_addtail(&psys->targets, pt);
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
@@ -289,7 +289,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
pt->flag |= PTARGET_CURRENT;
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
@@ -328,7 +328,7 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&psys->targets, pt);
BLI_insertlinkbefore(&psys->targets, pt->prev, pt);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
break;
}
@@ -366,7 +366,7 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&psys->targets, pt);
BLI_insertlinkafter(&psys->targets, pt->next, pt);
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
break;
}
@@ -398,7 +398,7 @@ static int dupliob_refresh_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
psys_check_group_weights(psys->part);
- DEG_id_tag_update(&psys->part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
+ DEG_id_tag_update(&psys->part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
return OPERATOR_FINISHED;
@@ -434,7 +434,7 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&part->dupliweights, dw);
BLI_insertlinkbefore(&part->dupliweights, dw->prev, dw);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
@@ -474,7 +474,7 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
dw->flag |= PART_DUPLIW_CURRENT;
BLI_addhead(&part->dupliweights, dw);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
@@ -521,7 +521,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
if (dw)
dw->flag |= PART_DUPLIW_CURRENT;
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
return OPERATOR_FINISHED;
@@ -559,7 +559,7 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(&part->dupliweights, dw);
BLI_insertlinkafter(&part->dupliweights, dw->next, dw);
- DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
+ DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
@@ -654,7 +654,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op)
disconnect_hair(depsgraph, scene, ob, psys);
}
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
@@ -920,7 +920,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
@@ -1156,13 +1156,13 @@ static bool copy_particle_systems_to_object(const bContext *C,
}
/* tag for recalc */
-// psys->recalc |= PSYS_RECALC_RESET;
+// psys->recalc |= ID_RECALC_PSYS_RESET;
}
#undef PSYS_FROM_FIRST
#undef PSYS_FROM_NEXT
- DEG_id_tag_update(&ob_to->id, OB_RECALC_DATA);
+ DEG_id_tag_update(&ob_to->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, ob_to);
return true;
}
diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c
index 6589e8e1fea..3b21f914b49 100644
--- a/source/blender/editors/physics/rigidbody_constraint.c
+++ b/source/blender/editors/physics/rigidbody_constraint.c
@@ -95,8 +95,8 @@ bool ED_rigidbody_constraint_add(Main *bmain, Scene *scene, Object *ob, int type
BKE_collection_object_add(bmain, rbw->constraints, ob);
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
- DEG_id_tag_update(&rbw->constraints->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
+ DEG_id_tag_update(&rbw->constraints->id, ID_RECALC_COPY_ON_WRITE);
return true;
}
@@ -108,11 +108,11 @@ void ED_rigidbody_constraint_remove(Main *bmain, Scene *scene, Object *ob)
BKE_rigidbody_remove_constraint(scene, ob);
if (rbw) {
BKE_collection_object_remove(bmain, rbw->constraints, ob, false);
- DEG_id_tag_update(&rbw->constraints->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&rbw->constraints->id, ID_RECALC_COPY_ON_WRITE);
}
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
}
/* ********************************************** */
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index 1b7f426ac5f..ff411d4bece 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -125,8 +125,8 @@ bool ED_rigidbody_object_add(Main *bmain, Scene *scene, Object *ob, int type, Re
BKE_collection_object_add(bmain, rbw->group, ob);
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
- DEG_id_tag_update(&rbw->group->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
+ DEG_id_tag_update(&rbw->group->id, ID_RECALC_COPY_ON_WRITE);
return true;
}
@@ -136,7 +136,7 @@ void ED_rigidbody_object_remove(Main *bmain, Scene *scene, Object *ob)
BKE_rigidbody_remove_object(bmain, scene, ob);
DEG_relations_tag_update(bmain);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
}
/* ********************************************** */
@@ -345,7 +345,7 @@ static int rigidbody_objects_shape_change_exec(bContext *C, wmOperator *op)
RNA_pointer_create(&ob->id, &RNA_RigidBodyObject, ob->rigidbody_object, &ptr);
RNA_enum_set(&ptr, "collision_shape", shape);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
changed = true;
}
@@ -527,7 +527,7 @@ static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op)
RNA_pointer_create(&ob->id, &RNA_RigidBodyObject, ob->rigidbody_object, &ptr);
RNA_float_set(&ptr, "mass", mass);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
changed = true;
}
diff --git a/source/blender/editors/physics/rigidbody_world.c b/source/blender/editors/physics/rigidbody_world.c
index 6ef3e03f8da..d6ffbb638e0 100644
--- a/source/blender/editors/physics/rigidbody_world.c
+++ b/source/blender/editors/physics/rigidbody_world.c
@@ -90,7 +90,7 @@ static int rigidbody_world_add_exec(bContext *C, wmOperator *UNUSED(op))
/* Full rebuild of DEG! */
DEG_relations_tag_update(bmain);
- DEG_id_tag_update_ex(bmain, &scene->id, DEG_TAG_TIME);
+ DEG_id_tag_update_ex(bmain, &scene->id, ID_RECALC_ANIMATION);
return OPERATOR_FINISHED;
}
@@ -128,7 +128,7 @@ static int rigidbody_world_remove_exec(bContext *C, wmOperator *op)
/* Full rebuild of DEG! */
DEG_relations_tag_update(bmain);
- DEG_id_tag_update_ex(bmain, &scene->id, DEG_TAG_TIME);
+ DEG_id_tag_update_ex(bmain, &scene->id, ID_RECALC_ANIMATION);
/* done */
return OPERATOR_FINISHED;