[Bf-blender-cvs] [cd024954792] master: Fix T75036: Assert when copying pose bones

Campbell Barton noreply at git.blender.org
Tue Mar 24 08:02:09 CET 2020


Commit: cd0249547926ee975fc3ba7046f59bf9ca004547
Author: Campbell Barton
Date:   Tue Mar 24 17:54:06 2020 +1100
Branches: master
https://developer.blender.org/rBcd0249547926ee975fc3ba7046f59bf9ca004547

Fix T75036: Assert when copying pose bones

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

M	source/blender/editors/armature/pose_transform.c

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

diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 0360f385201..fe79894a351 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -710,6 +710,8 @@ static int pose_copy_exec(bContext *C, wmOperator *op)
    * any datablock expansion?
    */
   Main *temp_bmain = BKE_main_new();
+  STRNCPY(temp_bmain->name, BKE_main_blendfile_path_from_global());
+
   Object ob_copy = *ob;
   ob_copy.adt = NULL;
   bArmature arm_copy = *((bArmature *)ob->data);
@@ -773,6 +775,8 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
   /* Read copy buffer .blend file. */
   char str[FILE_MAX];
   Main *tmp_bmain = BKE_main_new();
+  STRNCPY(tmp_bmain->name, BKE_main_blendfile_path_from_global());
+
   BLI_join_dirfile(str, sizeof(str), BKE_tempdir_base(), "copybuffer_pose.blend");
   if (!BKE_copybuffer_read(tmp_bmain, str, op->reports, FILTER_ID_OB)) {
     BKE_report(op->reports, RPT_ERROR, "Copy buffer is empty");



More information about the Bf-blender-cvs mailing list