diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-08-05 15:31:41 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-08-05 15:31:41 +0400 |
commit | 861d15738890409067eead832ceab7645c3a4708 (patch) | |
tree | a680aaae5afcb7e7ff82ea4bcbad5055decaccf1 /source/blender/editors/object/object_constraint.c | |
parent | dca090abc87fc57cb0a98bbe07ea8868f04f8c97 (diff) |
Bugfix [#28106] Missing 3D view update after copy of constraints
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index a3df25824a4..2055c906b41 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1115,14 +1115,19 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { /* if we're not handling the object we're copying from, copy all constraints over */ - if (obact != ob) + if (obact != ob) { copy_constraints(&ob->constraints, &obact->constraints, TRUE); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + } } CTX_DATA_END; /* force depsgraph to get recalculated since new relationships added */ DAG_scene_sort(bmain, scene); /* sort order of objects */ - + + /* notifiers for updates */ + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, NULL); + return OPERATOR_FINISHED; } |