Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-07-09 15:45:08 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-07-09 15:45:20 +0300
commitdd84ff212aa5c9d6c1a03888583e11f64a978a1a (patch)
tree09f81356d869579bd876cea68155c1150e077bac
parent484794ce6747068f898273328138fb96c263feac (diff)
Fix crash when redoing Set Origin operator
The operator was using a non-evaluated depsgraph to get the evaluated scene, which caused the crash. This fixes the crash reported in T66605, but not the problem where sometimes object origins aren't set.
-rw-r--r--source/blender/editors/object/object_transform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index bde8bc6080c..025128a04e3 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -465,6 +465,7 @@ static void ignore_parent_tx(Main *bmain, Depsgraph *depsgraph, Scene *scene, Ob
{
Object workob;
Object *ob_child;
+
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
/* a change was made, adjust the children to compensate */
@@ -974,7 +975,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Object *obact = CTX_data_active_object(C);
Object *obedit = CTX_data_edit_object(C);
- Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Depsgraph *depsgraph = CTX_data_evaluated_depsgraph(C);
Object *tob;
float cent[3], cent_neg[3], centn[3];
const float *cursor = scene->cursor.location;