Spreadsheet: add boilerplate code for new editor type

This adds the initial boilerplate code that is required to introduce
the new spreadsheet editor. The editor is still hidden from the ui.

It can be made visible by undoing the change in `rna_screen.c`.

This patch does not contain any business logic for the spreadsheet editor.

Differential Revision: https://developer.blender.org/D10645

Ref T86279.
This commit is contained in:
Jacques Lucke 2021-03-08 16:23:21 +01:00
parent d230c9b96c
commit 9cb5f0a228
Notes: blender-bot 2023-05-29 09:17:12 +02:00
Referenced by commit 08aa7861d6, Fix T94685: python error adding Space handlers for Spreadsheet
Referenced by commit 3dab6f8b7b, Spreadsheet: new spreadsheet editor
Referenced by issue #86279, Spreadsheet Editor
25 changed files with 501 additions and 2 deletions

View File

@ -1009,6 +1009,38 @@ const bTheme U_theme_default = {
.facedot_size = 4,
.gp_vertex_size = 3,
},
.space_spreadsheet = {
.back = RGBA(0x28282800),
.title = RGBA(0xffffffff),
.text = RGBA(0xc3c3c3ff),
.text_hi = RGBA(0xffffffff),
.header = RGBA(0x454545ff),
.header_text = RGBA(0xeeeeeeff),
.header_text_hi = RGBA(0xffffffff),
.tab_active = RGBA(0x4b4b4bff),
.tab_inactive = RGBA(0x2b2b2bff),
.tab_back = RGBA(0x232323ff),
.tab_outline = RGBA(0x232323ff),
.button = RGBA(0x424242ff),
.button_title = RGBA(0xffffffff),
.button_text = RGBA(0xe5e5e5ff),
.button_text_hi = RGBA(0xffffffff),
.panelcolors = {
.header = RGBA(0x424242cc),
.back = RGBA(0x333333b3),
.sub_back = RGBA(0x0000003e),
},
.active = RGBA(0x3b5689ff),
.vertex_size = 3,
.outline_width = 1,
.facedot_size = 4,
.match = RGBA(0x337f334c),
.selected_highlight = RGBA(0x223a5bff),
.selected_object = RGBA(0xe96a00ff),
.active_object = RGBA(0xffaf29ff),
.edited_object = RGBA(0x00806266),
.row_alternate = RGBA(0xffffff07),
},
.tarm = {
{
.solid = RGBA(0x9a0000ff),

View File

@ -1316,6 +1316,42 @@
</space>
</ThemeStatusBar>
</statusbar>
<spreadsheet>
<ThemeSpreadsheet
row_alternate="#ffffff0f"
>
<space>
<ThemeSpaceGeneric
back="#999999"
title="#000000"
text="#000000"
text_hi="#ffffff"
header="#adadadff"
header_text="#000000"
header_text_hi="#ffffff"
button="#999999e6"
button_title="#1a1a1a"
button_text="#000000"
button_text_hi="#ffffff"
navigation_bar="#00000000"
execution_buts="#999999e6"
tab_active="#6697e6"
tab_inactive="#cccccc"
tab_back="#999999ff"
tab_outline="#999999"
>
<panelcolors>
<ThemePanelColors
header="#42424200"
back="#00000028"
sub_back="#00000024"
>
</ThemePanelColors>
</panelcolors>
</ThemeSpaceGeneric>
</space>
</ThemeSpreadsheet>
</spreadsheet>
<bone_color_sets>
<ThemeBoneColorSet
normal="#9a0000"

View File

@ -86,6 +86,7 @@ _modules = [
"space_outliner",
"space_properties",
"space_sequencer",
"space_spreadsheet",
"space_statusbar",
"space_text",
"space_time",

View File

@ -0,0 +1,39 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
import bpy
class SPREADSHEET_HT_header(bpy.types.Header):
bl_space_type = 'SPREADSHEET'
def draw(self, context):
layout = self.layout
space = context.space_data
layout.template_header()
classes = (
SPREADSHEET_HT_header,
)
if __name__ == "__main__": # Only for live edit.
from bpy.utils import register_class
for cls in classes:
register_class(cls)

View File

@ -197,6 +197,7 @@ struct SpaceInfo *CTX_wm_space_info(const bContext *C);
struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C);
struct SpaceClip *CTX_wm_space_clip(const bContext *C);
struct SpaceTopBar *CTX_wm_space_topbar(const bContext *C);
struct SpaceSpreadsheet *CTX_wm_space_spreadsheet(const bContext *C);
void CTX_wm_manager_set(bContext *C, struct wmWindowManager *wm);
void CTX_wm_window_set(bContext *C, struct wmWindow *win);

View File

@ -914,6 +914,15 @@ struct SpaceTopBar *CTX_wm_space_topbar(const bContext *C)
return NULL;
}
struct SpaceSpreadsheet *CTX_wm_space_spreadsheet(const bContext *C)
{
ScrArea *area = CTX_wm_area(C);
if (area && area->spacetype == SPACE_SPREADSHEET) {
return area->spacedata.first;
}
return NULL;
}
void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
{
C->wm.manager = wm;

View File

@ -1342,6 +1342,9 @@ static void write_area_regions(BlendWriter *writer, ScrArea *area)
else if (sl->spacetype == SPACE_INFO) {
BLO_write_struct(writer, SpaceInfo, sl);
}
else if (sl->spacetype == SPACE_SPREADSHEET) {
BLO_write_struct(writer, SpaceSpreadsheet, sl);
}
}
}

View File

@ -282,6 +282,8 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
FROM_DEFAULT_V4_UCHAR(space_info.info_property);
FROM_DEFAULT_V4_UCHAR(space_info.info_error);
FROM_DEFAULT_V4_UCHAR(space_info.info_operator);
btheme->space_spreadsheet = btheme->space_outliner;
}
#undef FROM_DEFAULT_V4_UCHAR

View File

@ -53,6 +53,7 @@ if(WITH_BLENDER)
add_subdirectory(space_outliner)
add_subdirectory(space_script)
add_subdirectory(space_sequencer)
add_subdirectory(space_spreadsheet)
add_subdirectory(space_statusbar)
add_subdirectory(space_text)
add_subdirectory(space_topbar)

View File

@ -55,6 +55,7 @@ void ED_spacetype_userpref(void);
void ED_spacetype_clip(void);
void ED_spacetype_statusbar(void);
void ED_spacetype_topbar(void);
void ED_spacetype_spreadsheet(void);
/* calls for instancing and freeing spacetype static data
* called in WM_init_exit */

View File

@ -642,6 +642,7 @@ static struct MenuSearch_Data *menu_items_from_ui_create(
SPACE_MENU_NOP(SPACE_SCRIPT);
SPACE_MENU_NOP(SPACE_STATUSBAR);
SPACE_MENU_NOP(SPACE_TOPBAR);
SPACE_MENU_NOP(SPACE_SPREADSHEET);
}
}
for (int i = 0; i < idname_array_len; i++) {

View File

@ -160,6 +160,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case SPACE_STATUSBAR:
ts = &btheme->space_statusbar;
break;
case SPACE_SPREADSHEET:
ts = &btheme->space_spreadsheet;
break;
default:
ts = &btheme->space_view3d;
break;

View File

@ -50,6 +50,7 @@ set(LIB
bf_editor_space_outliner
bf_editor_space_script
bf_editor_space_sequencer
bf_editor_space_spreadsheet
bf_editor_space_statusbar
bf_editor_space_text
bf_editor_space_topbar

View File

@ -95,6 +95,7 @@ void ED_spacetypes_init(void)
ED_spacetype_clip();
ED_spacetype_statusbar();
ED_spacetype_topbar();
ED_spacetype_spreadsheet();
/* Register operator types for screen and all spaces. */
ED_operatortypes_userpref();

View File

@ -0,0 +1,39 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# ***** END GPL LICENSE BLOCK *****
set(INC
../include
../../blenkernel
../../blenlib
../../makesdna
../../makesrna
../../windowmanager
../../../../intern/glew-mx
../../../../intern/guardedalloc
)
set(SRC
space_spreadsheet.cc
spreadsheet_ops.cc
spreadsheet_intern.hh
)
set(LIB
)
blender_add_lib(bf_editor_space_spreadsheet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@ -0,0 +1,221 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <cstring>
#include "BLI_listbase.h"
#include "BKE_screen.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "MEM_guardedalloc.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "spreadsheet_intern.hh"
static SpaceLink *spreadsheet_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
{
SpaceSpreadsheet *spreadsheet_space = (SpaceSpreadsheet *)MEM_callocN(sizeof(SpaceSpreadsheet),
"spreadsheet space");
spreadsheet_space->spacetype = SPACE_SPREADSHEET;
{
/* header */
ARegion *region = (ARegion *)MEM_callocN(sizeof(ARegion), "spreadsheet header");
BLI_addtail(&spreadsheet_space->regionbase, region);
region->regiontype = RGN_TYPE_HEADER;
region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP;
}
{
/* main window */
ARegion *region = (ARegion *)MEM_callocN(sizeof(ARegion), "spreadsheet main region");
BLI_addtail(&spreadsheet_space->regionbase, region);
region->regiontype = RGN_TYPE_WINDOW;
}
return (SpaceLink *)spreadsheet_space;
}
static void spreadsheet_free(SpaceLink *UNUSED(sl))
{
}
static void spreadsheet_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
{
}
static SpaceLink *spreadsheet_duplicate(SpaceLink *sl)
{
return (SpaceLink *)MEM_dupallocN(sl);
}
static void spreadsheet_keymap(wmKeyConfig *UNUSED(keyconf))
{
}
static void spreadsheet_main_region_init(wmWindowManager *wm, ARegion *region)
{
region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM;
region->v2d.align = V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y;
region->v2d.keepzoom = V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT;
region->v2d.keeptot = V2D_KEEPTOT_STRICT;
region->v2d.minzoom = region->v2d.maxzoom = 1.0f;
UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
wmKeyMap *keymap = WM_keymap_ensure(wm->defaultconf, "View2D Buttons List", 0, 0);
WM_event_add_keymap_handler(&region->handlers, keymap);
}
static void spreadsheet_main_region_draw(const bContext *UNUSED(C), ARegion *UNUSED(region))
{
UI_ThemeClearColor(TH_BACK);
}
static void spreadsheet_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_SCENE: {
switch (wmn->data) {
case ND_MODE:
case ND_OB_ACTIVE: {
ED_region_tag_redraw(region);
break;
}
}
break;
}
case NC_OBJECT: {
ED_region_tag_redraw(region);
break;
}
case NC_SPACE: {
if (wmn->data == ND_SPACE_SPREADSHEET) {
ED_region_tag_redraw(region);
}
break;
}
case NC_GEOM: {
ED_region_tag_redraw(region);
break;
}
}
}
static void spreadsheet_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
{
ED_region_header_init(region);
}
static void spreadsheet_header_region_draw(const bContext *C, ARegion *region)
{
ED_region_header(C, region);
}
static void spreadsheet_header_region_free(ARegion *UNUSED(region))
{
}
static void spreadsheet_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_SCENE: {
switch (wmn->data) {
case ND_MODE:
case ND_OB_ACTIVE: {
ED_region_tag_redraw(region);
break;
}
}
break;
}
case NC_OBJECT: {
ED_region_tag_redraw(region);
break;
}
case NC_SPACE: {
if (wmn->data == ND_SPACE_SPREADSHEET) {
ED_region_tag_redraw(region);
}
break;
}
case NC_GEOM: {
ED_region_tag_redraw(region);
break;
}
}
}
void ED_spacetype_spreadsheet(void)
{
SpaceType *st = (SpaceType *)MEM_callocN(sizeof(SpaceType), "spacetype spreadsheet");
ARegionType *art;
st->spaceid = SPACE_SPREADSHEET;
strncpy(st->name, "Spreadsheet", BKE_ST_MAXNAME);
st->create = spreadsheet_create;
st->free = spreadsheet_free;
st->init = spreadsheet_init;
st->duplicate = spreadsheet_duplicate;
st->operatortypes = spreadsheet_operatortypes;
st->keymap = spreadsheet_keymap;
/* regions: main window */
art = (ARegionType *)MEM_callocN(sizeof(ARegionType), "spacetype spreadsheet region");
art->regionid = RGN_TYPE_WINDOW;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
art->init = spreadsheet_main_region_init;
art->draw = spreadsheet_main_region_draw;
art->listener = spreadsheet_main_region_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
art = (ARegionType *)MEM_callocN(sizeof(ARegionType), "spacetype spreadsheet header region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey = HEADERY;
art->keymapflag = 0;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
art->init = spreadsheet_header_region_init;
art->draw = spreadsheet_header_region_draw;
art->free = spreadsheet_header_region_free;
art->listener = spreadsheet_header_region_listener;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);
}

View File

@ -0,0 +1,19 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#pragma once
void spreadsheet_operatortypes(void);

View File

@ -0,0 +1,21 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "spreadsheet_intern.hh"
void spreadsheet_operatortypes()
{
}

View File

@ -1839,6 +1839,22 @@ typedef struct SpaceStatusBar {
/** \} */
/* -------------------------------------------------------------------- */
/** \name Spreadsheet
* \{ */
typedef struct SpaceSpreadsheet {
SpaceLink *next, *prev;
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* End 'SpaceLink' header. */
} SpaceSpreadsheet;
/** \} */
/* -------------------------------------------------------------------- */
/** \name Space Defines (eSpace_Type)
* \{ */
@ -1876,8 +1892,9 @@ typedef enum eSpace_Type {
SPACE_CLIP = 20,
SPACE_TOPBAR = 21,
SPACE_STATUSBAR = 22,
SPACE_SPREADSHEET = 23
#define SPACE_TYPE_LAST SPACE_STATUSBAR
#define SPACE_TYPE_LAST SPACE_SPREADSHEET
} eSpace_Type;
/* use for function args */

View File

@ -492,6 +492,7 @@ typedef struct bTheme {
ThemeSpace space_clip;
ThemeSpace space_topbar;
ThemeSpace space_statusbar;
ThemeSpace space_spreadsheet;
/* 20 sets of bone colors for this theme */
ThemeWireColor tarm[20];
@ -507,7 +508,7 @@ typedef struct bTheme {
#define UI_THEMESPACE_START(btheme) \
(CHECK_TYPE_INLINE(btheme, bTheme *), &((btheme)->space_properties))
#define UI_THEMESPACE_END(btheme) \
(CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->space_statusbar) + 1))
(CHECK_TYPE_INLINE(btheme, bTheme *), (&((btheme)->space_spreadsheet) + 1))
typedef struct bAddon {
struct bAddon *next, *prev;

View File

@ -601,6 +601,7 @@ extern StructRNA RNA_SpaceOutliner;
extern StructRNA RNA_SpacePreferences;
extern StructRNA RNA_SpaceProperties;
extern StructRNA RNA_SpaceSequenceEditor;
extern StructRNA RNA_SpaceSpreadsheet;
extern StructRNA RNA_SpaceTextEditor;
extern StructRNA RNA_SpaceUVEditor;
extern StructRNA RNA_SpaceView3D;

View File

@ -201,6 +201,10 @@ static const EnumPropertyItem *rna_Area_ui_type_itemf(bContext *C,
if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
continue;
}
/* Hide spreadsheet editor until we want to expose it in the ui. */
if (item_from->value == SPACE_SPREADSHEET) {
continue;
}
SpaceType *st = item_from->identifier[0] ? BKE_spacetype_from_id(item_from->value) : NULL;
int totitem_prev = totitem;

View File

@ -145,6 +145,11 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
"Properties",
"Edit properties of active object and related data-blocks"},
{SPACE_FILE, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", "Browse for files and assets"},
{SPACE_SPREADSHEET,
"SPREADSHEET",
ICON_SPREADSHEET,
"Spreadsheet",
"Explore geometry data in a table"},
{SPACE_USERPREF,
"PREFERENCES",
ICON_PREFERENCES,
@ -571,6 +576,8 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
return &RNA_SpacePreferences;
case SPACE_CLIP:
return &RNA_SpaceClipEditor;
case SPACE_SPREADSHEET:
return &RNA_SpaceSpreadsheet;
/* Currently no type info. */
case SPACE_SCRIPT:
@ -7171,6 +7178,14 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
}
static void rna_def_space_spreadsheet(BlenderRNA *brna)
{
StructRNA *srna;
srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space");
RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data");
}
void RNA_def_space(BlenderRNA *brna)
{
rna_def_space(brna);
@ -7196,6 +7211,7 @@ void RNA_def_space(BlenderRNA *brna)
rna_def_node_tree_path(brna);
rna_def_space_node(brna);
rna_def_space_clip(brna);
rna_def_space_spreadsheet(brna);
}
#endif

View File

@ -3847,6 +3847,26 @@ static void rna_def_userdef_theme_space_statusbar(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
}
static void rna_def_userdef_theme_space_spreadsheet(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
/* space_spreadsheet */
srna = RNA_def_struct(brna, "ThemeSpreadsheet", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Spreadsheet", "Theme settings for the Spreadsheet");
prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
rna_def_userdef_theme_spaces_main(srna);
}
static void rna_def_userdef_themes(BlenderRNA *brna)
{
StructRNA *srna;
@ -3873,6 +3893,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
{20, "CLIP_EDITOR", ICON_TRACKER, "Movie Clip Editor", ""},
{21, "TOPBAR", ICON_TOPBAR, "Top Bar", ""},
{22, "STATUSBAR", ICON_STATUSBAR, "Status Bar", ""},
{23, "SPREADSHEET", ICON_SPREADSHEET, "Spreadsheet"},
{0, NULL, 0, NULL, NULL},
};
@ -4001,6 +4022,12 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "space_statusbar");
RNA_def_property_struct_type(prop, "ThemeStatusBar");
RNA_def_property_ui_text(prop, "Status Bar", "");
prop = RNA_def_property(srna, "spreadsheet", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "space_spreadsheet");
RNA_def_property_struct_type(prop, "ThemeSpreadsheet");
RNA_def_property_ui_text(prop, "Spreadsheet", "");
/* end space types */
prop = RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
@ -4254,6 +4281,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_space_clip(brna);
rna_def_userdef_theme_space_topbar(brna);
rna_def_userdef_theme_space_statusbar(brna);
rna_def_userdef_theme_space_spreadsheet(brna);
rna_def_userdef_theme_colorset(brna);
rna_def_userdef_theme_collection_color(brna);
rna_def_userdef_themes(brna);

View File

@ -427,6 +427,7 @@ typedef struct wmNotifier {
#define ND_SPACE_CHANGED (19 << 16) /*sent to a new editor type after it's replaced an old one*/
#define ND_SPACE_CLIP (20 << 16)
#define ND_SPACE_FILE_PREVIEW (21 << 16)
#define ND_SPACE_SPREADSHEET (22 << 16)
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00