[Bf-blender-cvs] [78bbf374f47] master: Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.

Bastien Montagne noreply at git.blender.org
Sun Jun 9 22:59:46 CEST 2019


Commit: 78bbf374f475d370ff07a59ade5b62f61433955c
Author: Bastien Montagne
Date:   Sun Jun 9 22:53:48 2019 +0200
Branches: master
https://developer.blender.org/rB78bbf374f475d370ff07a59ade5b62f61433955c

Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.

We need to properly select new objects (and deselect 'source' ones) when
converting to another type while keeping original ones. Otherwise poll
check of the operator fails, and redo panel cannot be shown.

Note that this is actually a design flaw in redo system currently, since
*new* state has to still allow last operator to be ran, when it should
actually be previous step in history that matters here...

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

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

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

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 5e5537992e4..7d54f12df8f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2342,6 +2342,11 @@ static int convert_exec(bContext *C, wmOperator *op)
         basact = basen;
       }
 
+      if (keep_original) {
+        ED_object_base_select(base, BA_DESELECT);
+        ED_object_base_select(basen, BA_SELECT);
+      }
+
       basen = NULL;
     }



More information about the Bf-blender-cvs mailing list