From 9c62a8c8e53fbcd14100153b0abc659771b1f551 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 4 Mar 2020 11:05:17 +0100 Subject: Fix T73797: Selection/Editing after Make Single User for Object Data fails Exposed by rB50d5c03e2d14. This was only a problem when _only_ 'Object Data' was made local. If also e.g. 'Object' or 'Materials' was checked, these were already making sure realations were updated [DEG_relations_tag_update(bmain)]. Now also call DEG_relations_tag_update(bmain) for the 'Object Data' case. I assume the underlying issue is that there is some ID_NEW_REMAP happening in 'single_obdata_users()' -- including that for 'me- >texcomesh', which might be responsible for the glitches in selection/ editing? Also not entirely sure why this wasnt a problem prior to rB50d5c03e2d14.(I assume this was somewhat hidden by the fact this was always called with a default action being nothing, the user would always need to access the redo panel. So this might have been hidden by an Undo step involved?) Maniphest Tasks: T73797 Differential Revision: https://developer.blender.org/D7020 --- source/blender/editors/object/object_relations.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b1e3e4b64f2..0ce2b21cbbd 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2609,6 +2609,9 @@ static int make_single_user_exec(bContext *C, wmOperator *op) if (RNA_boolean_get(op->ptr, "obdata")) { single_obdata_users(bmain, scene, view_layer, v3d, flag); + + /* Needed since some IDs were remapped? (incl. me->texcomesh, see T73797). */ + update_deps = true; } if (RNA_boolean_get(op->ptr, "material")) { -- cgit v1.2.3