Fix T75036: Assert when copying pose bones
This commit is contained in:
parent
3d3a91103b
commit
cd02495479
Notes:
blender-bot
2023-02-14 09:48:25 +01:00
Referenced by issue #75036, Blender debug builds triggers asserts when copying pose bone.
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue