diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-25 16:58:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-25 17:37:49 +0300 |
commit | 86c0ee80209cdd52e4b360ffcf854144922ac2e6 (patch) | |
tree | 722f7ddcfaa702cf834d4fe2b8d63f1a2638398c /source/blender/blenloader/intern/versioning_280.c | |
parent | 213ac7b1aceea3b5a210e86a07402d4415c9a6b6 (diff) |
3D View: support for editing cursor rotation
Add buttons for editing the cursor rotation as well as rotation modes,
similar to object and pose bones.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 5234efdce03..0c0b4f6c364 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1336,12 +1336,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - - if (!DNA_struct_find(fd->filesdna, "View3DCursor")) { - for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) { - unit_qt(scene->cursor.rotation); - } - } } if (!MAIN_VERSION_ATLEAST(bmain, 280, 14)) { @@ -2821,5 +2815,15 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + if (!DNA_struct_elem_find(fd->filesdna, "View3DCursor", "short", "rotation_mode")) { + for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) { + if (is_zero_v3(scene->cursor.rotation_axis)) { + scene->cursor.rotation_mode = ROT_MODE_XYZ; + scene->cursor.rotation_quaternion[0] = 1.0f; + scene->cursor.rotation_axis[1] = 1.0f; + } + } + } } } |