Commit: dd84ff212aa5c9d6c1a03888583e11f64a978a1a
Author: Sybren A. Stüvel
Date: Tue Jul 9 14:45:08 2019 +0200
Branches: master
https://developer.blender.org/rBdd84ff212aa5c9d6c1a03888583e11f64a978a1a
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.
===================================================================
M source/blender/editors/object/object_transform.c
===================================================================
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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs