Gizmo: optional custom orientations for transform

This aims to resolve a conflict where some users want to keep keyboard
axis setting global, even when the orientation is set to something else.

Move/rotate/scale can optionally each have a separate orientation.

Some UI changes will be made next.
This commit is contained in:
2018-12-19 20:51:04 +11:00
parent 231ea39ed1
commit f7dc6a63fb
19 changed files with 293 additions and 102 deletions

View File

@@ -1230,12 +1230,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
if (!DNA_struct_elem_find(fd->filesdna, "Scene", "int", "orientation_index_custom")) {
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
scene->orientation_index_custom = -1;
}
}
for (bScreen *sc = bmain->screen.first; sc; sc = sc->id.next) {
for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) {
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
@@ -2762,5 +2756,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
if (!DNA_struct_find(fd->filesdna, "TransformOrientationSlot")) {
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
for (int i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) {
scene->orientation_slots[i].index_custom = -1;
}
}
}
}
}