Page MenuHome

Align View is broken
Closed, ResolvedPublic


System Information
Operating system: Win 7 Pro 64 Bit
Graphics card: GTX 1070 - Driver 419.67

Blender Version
blender-2.81-066a7173c068-win64 - 02.08.2019
Worked: (optional)

Short description of error
Align View in the Modal Window is broken

Exact steps for others to reproduce the error
Fresh Build with default settings.

Go to Front View.
Add a Plane.
In the Modal Window select Align View.

The x-Value change to 90 degrees but the Plane doesn't rotate.
If I delete the Plane and make a new one, the Plane is immediately in the Align View "Mode".
This happens with all newly created objects and not only with the Plane Object.

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.Aug 2 2019, 9:59 AM

Can confirm this, checking...

This is caused by rB3566b81c8bf, reverting to the "old style" in ED_object_base_init_transform seems to fix:

3diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
4index 137af917f9a..435cf7ebdb7 100644
5--- a/source/blender/editors/object/object_add.c
6+++ b/source/blender/editors/object/object_add.c
7@@ -236,7 +236,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, const float loc[3],
8 {
9 Object *ob = base->object;
10 Scene *scene = CTX_data_scene(C);
11- Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
12+ Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
14 if (!scene) {
15 return;
16@@ -250,11 +250,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, const float loc[3],
17 copy_v3_v3(ob->rot, rot);
18 }
20- Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
21- Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
22- BKE_object_transform_copy(object_eval, ob);
23- BKE_object_where_is_calc(depsgraph, scene_eval, object_eval);
24- BKE_object_transform_copy(ob, object_eval);
25+ BKE_object_where_is_calc(depsgraph, scene, ob);
26 }
28 /* Uses context to figure out transform for primitive.

Doing it the "new way" ends up baking transforms into the object data on redo [not sure why that is tbh. since code seems to only handle object transforms -- would need a second look...].

I guess this is an easy one for @Sergey Sharybin (sergey)?

That was really a highspeed fix!
Many thanks Sergey.