Fix #114948: Parenting crash blender since ObjectRuntime refactor

Caused by 4bcdc57fc8
This commit is contained in:
Hans Goudey
2023-11-16 09:16:48 +01:00
parent 81eec5ff44
commit d46d1bbe6a
2 changed files with 5 additions and 0 deletions

View File

@@ -49,6 +49,7 @@
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_preview_image.hh"
#include "DEG_depsgraph.hh"
@@ -1708,7 +1709,9 @@ void what_does_obaction(Object *ob,
bActionGroup *agrp = BKE_action_group_find_name(act, groupname);
/* clear workob */
blender::bke::ObjectRuntime workob_runtime;
BKE_object_workob_clear(workob);
workob->runtime = &workob_runtime;
/* init workob */
copy_m4_m4(workob->object_to_world, ob->object_to_world);

View File

@@ -3383,7 +3383,9 @@ void BKE_object_where_is_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_object_workob_calc_parent(Depsgraph *depsgraph, Scene *scene, Object *ob, Object *workob)
{
blender::bke::ObjectRuntime workob_runtime;
BKE_object_workob_clear(workob);
workob->runtime = &workob_runtime;
unit_m4(workob->object_to_world);
unit_m4(workob->parentinv);