diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 672b61fa122..a84124f353d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7355,7 +7355,8 @@ void blo_lib_link_restore(Main *newmain, wmWindowManager *curwm, Scene *curscene BKE_workspace_active_set(win->workspace_hook, workspace); /* keep cursor location through undo */ - copy_v3_v3(win->scene->cursor, oldscene->cursor); + copy_v3_v3(win->scene->cursor.location, oldscene->cursor.location); + copy_qt_qt(win->scene->cursor.rotation, oldscene->cursor.rotation); lib_link_workspace_scene_data_restore(win, win->scene); BLI_assert(win->screen == NULL); @@ -10039,7 +10040,7 @@ static void give_base_to_groups( /* Assign the group. */ ob->dup_group = group; ob->transflag |= OB_DUPLIGROUP; - copy_v3_v3(ob->loc, scene->cursor); + copy_v3_v3(ob->loc, scene->cursor.location); } } } diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 55bc314d6b4..1ce721232f0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1099,5 +1099,21 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!DNA_struct_find(fd->filesdna, "View3DCursor")) { + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + unit_qt(scene->cursor.rotation); + } + for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + unit_qt(v3d->cursor.rotation); + } + } + } + } + } } } |