Fix T46913: Crash adding hook to linked mesh dupli
Follow up to T46738, we need to tag the object data for recalculation.
This commit is contained in:
parent
285b09d8b9
commit
6e10ad5ea8
Notes:
blender-bot
2023-02-14 08:24:04 +01:00
Referenced by issue #46913, hooking linked duplicate objects with multiple viewport material colors in cycles to an empty causes blender to crash
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue