[Bf-blender-cvs] [254daf8f8c2] blender2.8: Fix T53141: Assert when using transformation in new 3D View editor

Julian Eisel noreply at git.blender.org
Tue Oct 24 00:38:40 CEST 2017


Commit: 254daf8f8c276a4e5292e5a12fcfa88296131878
Author: Julian Eisel
Date:   Tue Oct 24 00:32:07 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB254daf8f8c276a4e5292e5a12fcfa88296131878

Fix T53141: Assert when using transformation in new 3D View editor

Was actually possible to invoke this assert failure in two ways:
* Transforming in newly created 3D View (like described in the report).
* Transforming in newly appended workspace from default workspaces.blend. Issue was that default workspaces.blend was saved in 2.8.1, but in a branch state that didn't include the transform-orientation changes. So versioning code wouldn't run when needed.

Note that files saved with this bug will still cause the assert to
fail. Can be ignored then.

This is not related to manipulators (as suggested in the report).

===================================================================

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/editors/space_view3d/space_view3d.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index f052ea7b8e4..da1562d3a64 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -418,7 +418,9 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 				}
 			}
 		}
+	}
 
+	{
 		if (!DNA_struct_elem_find(fd->filesdna, "View3D", "short", "custom_orientation_index")) {
 			for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) {
 				for (ScrArea *area = screen->areabase.first; area; area = area->next) {
@@ -437,9 +439,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 				}
 			}
 		}
-	}
 
-	{
 		if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "cascade_max_dist")) {
 			for (Lamp *la = main->lamp.first; la; la = la->id.next) {
 				la->cascade_max_dist = 1000.0f;
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6ca4db2e056..549747f98d7 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -347,6 +347,7 @@ static SpaceLink *view3d_new(const bContext *C)
 	v3d->twflag |= U.manipulator_flag & V3D_MANIPULATOR_DRAW;
 	v3d->twtype = V3D_MANIP_TRANSLATE;
 	v3d->around = V3D_AROUND_CENTER_MEAN;
+	v3d->custom_orientation_index = -1;
 	
 	v3d->bundle_size = 0.2f;
 	v3d->bundle_drawtype = OB_PLAINAXES;



More information about the Bf-blender-cvs mailing list