[Bf-blender-cvs] [6e10ad5] master: Fix T46913: Crash adding hook to linked mesh dupli
Campbell Barton
noreply at git.blender.org
Thu Dec 3 01:00:45 CET 2015
Commit: 6e10ad5ea825783ff044973849358d8ef0759ec3
Author: Campbell Barton
Date: Thu Dec 3 10:44:27 2015 +1100
Branches: master
https://developer.blender.org/rB6e10ad5ea825783ff044973849358d8ef0759ec3
Fix T46913: Crash adding hook to linked mesh dupli
Follow up to T46738, we need to tag the object data for recalculation.
===================================================================
M source/blender/editors/mesh/editmesh_utils.c
M source/blender/editors/object/object_hook.c
M source/blender/editors/object/object_relations.c
M source/blender/makesrna/intern/rna_object.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 148398f..4a9be49 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 6a1220b..492b672 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 c638714..a1f5916 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 42d8c8e..96749e3 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;
More information about the Bf-blender-cvs
mailing list