Fix T75036: Assert when copying pose bones
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user