diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-02-13 21:49:26 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-02-19 19:22:01 +0400 |
commit | eb7485389b8ae29c0f56c942e800722fe25ebebe (patch) | |
tree | 0c4f71c85a75647f1a7d1ca084a1cd4295f88288 /source/blender/blenloader/intern/versioning_260.c | |
parent | 6b1a4fc66ef4e3197601318ce4c36db2c8359b98 (diff) |
Use tabs for image editor.
For initial discussion see T38371
This commit organized panels for image editor to new tab categories dependent
on the image editor mode:
View Mode:
Tools - contains UV tools (currently only transform and UV Sculpting)
Scopes - contains scopes
Grease Pencil - contains Grease Pencil operators
Paint Mode:
Tools - contains brush options
Scopes - as above
Grease Pencil - as above
Mask Mode
Mask - contains mask tools
Scopes - as above
Grease Pencil - as above
Grease Pencil panel/tab now includes operators, not view options which have been
moved to the UI region on the right.
To make this work better, image editor toolbar now is of type TOOLS instead
of PREVIEW as was the case previously. A nice version patch makes sure all
works predictably, but opening newer files with older blender executables
could backfire.
This commit does not address which UV Tools will be included in the
Tools tab for the view mode, but does include some basic tools (transform)
and provides a class to inherit from to avoid conflicts with UV Sculpting.
Reviewers: brecht, dingto, sergey
Differential Revision: https://developer.blender.org/D315
Diffstat (limited to 'source/blender/blenloader/intern/versioning_260.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_260.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 2880fec698b..18ba048e5a1 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2672,6 +2672,41 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) } } + if (!MAIN_VERSION_ATLEAST(main, 269, 11)) { + bScreen *sc; + + for (sc = main->screen.first; sc; sc = sc->id.next) { + ScrArea *sa; + for (sa = sc->areabase.first; sa; sa = sa->next) { + SpaceLink *space_link; + + for (space_link = sa->spacedata.first; space_link; space_link = space_link->next) { + if (space_link->spacetype == SPACE_IMAGE) { + ARegion *ar; + ListBase *lb; + + if (space_link == sa->spacedata.first) { + lb = &sa->regionbase; + } + else { + lb = &space_link->regionbase; + } + + for (ar = lb->first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_PREVIEW) { + ar->regiontype = RGN_TYPE_TOOLS; + ar->alignment = RGN_ALIGN_LEFT; + } + else if (ar->regiontype == RGN_TYPE_UI) { + ar->alignment = RGN_ALIGN_RIGHT; + } + } + } + } + } + } + } + if (!DNA_struct_elem_find(fd->filesdna, "BevelModifierData", "float", "profile")) { Object *ob; |