[Bf-blender-cvs] [a3db0850b4a] blender-v2.83-release: Fix T78306: Weight Transfer Operator target mesh doesn't update when transforming bones.

Bastien Montagne noreply at git.blender.org
Wed Jul 29 10:53:10 CEST 2020


Commit: a3db0850b4a9d17aee4b5568270d41a5e5e0b21a
Author: Bastien Montagne
Date:   Mon Jul 27 17:37:46 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa3db0850b4a9d17aee4b5568270d41a5e5e0b21a

Fix T78306: Weight Transfer Operator target mesh doesn't update when transforming bones.

Data transfer operator was missing tagging DEG for relations updates.

Should be portable to 2.83 as well.

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

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

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

diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index a44c911a5f1..bc8260e5880 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -516,13 +516,15 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
 
   BLI_freelistN(&ctx_objects);
 
-  WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
+  if (changed) {
+    DEG_relations_tag_update(CTX_data_main(C));
+    WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
+  }
 
 #if 0 /* TODO */
   /* Note: issue with that is that if canceled, operator cannot be redone... Nasty in our case. */
   return changed ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
 #else
-  (void)changed;
   return OPERATOR_FINISHED;
 #endif
 }



More information about the Bf-blender-cvs mailing list