[Bf-blender-cvs] [3dcddf83bfd] blender-v2.82-release: Fix T73675: Leaving exit mode tags all objects for update

Sergey Sharybin noreply at git.blender.org
Tue Feb 11 14:12:55 CET 2020


Commit: 3dcddf83bfd48a47716de10626c19ef3ce48d021
Author: Sergey Sharybin
Date:   Tue Feb 11 10:12:43 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB3dcddf83bfd48a47716de10626c19ef3ce48d021

Fix T73675: Leaving exit mode tags all objects for update

This is an oversight of a fix for T69834, where I didn't realize the
ED_object_editmode_exit_ex() function is called for all objects as an
opposite of only the ones which were in edit mode.

Seems a simple fix: just move tag into a check that object was in the
edit mode prior to tag.

Differential Revision: https://developer.blender.org/D6808

===================================================================

M	source/blender/editors/object/object_edit.c

===================================================================

diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 098a4c65ae0..1c0ce423c4d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -543,9 +543,9 @@ bool ED_object_editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int f
      * is flagged for editmode, without 'obedit' being set [#35489] */
     if (UNLIKELY(obedit && obedit->mode & OB_MODE_EDIT)) {
       obedit->mode &= ~OB_MODE_EDIT;
+      /* Also happens when mesh is shared across multiple objects. [#T69834] */
+      DEG_id_tag_update(&obedit->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
     }
-    /* Also happens when mesh is shared across multiple objects. [#T69834] */
-    DEG_id_tag_update(&obedit->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
     return true;
   }



More information about the Bf-blender-cvs mailing list