diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-03 02:44:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-03 02:54:12 +0300 |
commit | 6e10ad5ea825783ff044973849358d8ef0759ec3 (patch) | |
tree | a6ae77967d2c74aa30cac7277413c65b6aced6e7 | |
parent | 285b09d8b9717925d97e8fc0aa8903f7d6cff29a (diff) |
Fix T46913: Crash adding hook to linked mesh dupli
Follow up to T46738, we need to tag the object data for recalculation.
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 148398fca5c..4a9be4978b1 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -382,7 +382,7 @@ void EDBM_mesh_make(ToolSettings *ts, Object *ob) /** * \warning This can invalidate the #DerivedMesh cache of other objects (for linked duplicates). - * Most callers should run #DAG_id_tag_update on \a ob, see: T46738. + * Most callers should run #DAG_id_tag_update on \a ob->data, see: T46738, T46913 */ void EDBM_mesh_load(Object *ob) { diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 6a1220bbbaa..492b6724f93 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -318,7 +318,7 @@ static bool object_hook_index_array(Scene *scene, Object *obedit, EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, obedit); - DAG_id_tag_update(&obedit->id, 0); + DAG_id_tag_update(obedit->data, 0); em = me->edit_btmesh; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index c638714a951..a1f59166c81 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -138,6 +138,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, obedit); + DAG_id_tag_update(obedit->data, 0); + em = me->edit_btmesh; EDBM_mesh_normals_update(em); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 42d8c8e0cb4..96749e32e45 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -275,6 +275,9 @@ static void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA case OB_MESH: EDBM_mesh_load(ob); EDBM_mesh_make(scene->toolsettings, ob); + + DAG_id_tag_update(ob->data, 0); + EDBM_mesh_normals_update(((Mesh *)ob->data)->edit_btmesh); BKE_editmesh_tessface_calc(((Mesh *)ob->data)->edit_btmesh); break; |