Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Schempp <fabianschempp@googlemail.com>2021-06-25 08:57:24 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2021-06-25 08:57:24 +0300
commitae085e301c2aac0d6956609bfe93a90a19f0e235 (patch)
tree38b86749807915a6b6d46504a2acb90e41a4a77a /source/blender/blenloader
parent841df831e89dfc4011c323203c2efb8265dc1878 (diff)
Spreadsheet: Dataset region for spreadsheet editor
This patch adds a left aligned sidebar to the spreadsheet editor. This Sidebar can be used to navigate the geometry component types and attribute domains. It also provides a quick overview of domain sizes. It replaces the two dropdowns in the regions header. Next step will be to add the domain cycling shortcut using the CTRL + mouse wheel. Reviewer: Dalai Felinto (dfelinto), Julian Eisel (Severin), Hans Goudey (HooglyBoogly). Differential Revision: https://developer.blender.org/D11046
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c23
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c9
2 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 0fe1267b871..cb0f1f29bff 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -40,7 +40,9 @@
#include "BKE_node.h"
#include "BLO_readfile.h"
+#include "MEM_guardedalloc.h"
#include "readfile.h"
+#include "versioning_common.h"
#include "MEM_guardedalloc.h"
@@ -122,6 +124,7 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports))
sort_linked_ids(bmain);
assert_sorted_ids(bmain);
}
+
if (MAIN_VERSION_ATLEAST(bmain, 300, 3)) {
assert_sorted_ids(bmain);
}
@@ -392,6 +395,26 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 5)) {
+ /* Add a dataset sidebar to the spreadsheet editor. */
+ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+ if (sl->spacetype == SPACE_SPREADSHEET) {
+ ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
+ &sl->regionbase;
+ ARegion *spreadsheet_dataset_region = do_versions_add_region_if_not_found(
+ regionbase, RGN_TYPE_CHANNELS, "spreadsheet dataset region", RGN_TYPE_FOOTER);
+
+ if (spreadsheet_dataset_region) {
+ spreadsheet_dataset_region->alignment = RGN_ALIGN_LEFT;
+ spreadsheet_dataset_region->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
+ }
+ }
+ }
+ }
+ }
+ }
/**
* Versioning code until next subversion bump goes here.
*
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index be3834faa5a..42b27f57e2c 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -277,6 +277,15 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
btheme->space_spreadsheet = btheme->space_outliner;
}
+ if (!USER_VERSION_ATLEAST(300, 5)) {
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.active);
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.list);
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.list_text);
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.list_text_hi);
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.hilite);
+ FROM_DEFAULT_V4_UCHAR(space_spreadsheet.selected_highlight);
+ }
+
/**
* Versioning code until next subversion bump goes here.
*