diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-16 17:09:36 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-16 17:09:36 +0400 |
commit | 2d40b8d56ff100b71dac7c4694f6115dcc0b01b5 (patch) | |
tree | e6ad74b116dccf3442290ba4a76bd314729bce6b /source/blender/makesrna/intern/rna_userdef.c | |
parent | 7d026421142306dee486628bd15d4f5aa2b77481 (diff) |
2.5
Added SpaceLogic, to restore the old logic buttons into.
In future it can be used for a more advanced logic editor, with
states, behaviour, whatever. We'll see!
This commit only adds the backend for new space. Committed this
now as reference for when we need another space type. It's still
not well plugin-able (dynamic space types), but my idea is to just
have a new SpacePlugIn for this, with a neat small API to define
all relevant callbacks.
Also note the icon for the spacetype is wrong still.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 04006f51c7c..65d83bec552 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -891,6 +891,26 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) RNA_def_property_update(prop, NC_WINDOW, NULL); } +static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + /* space_buts */ + + srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL); + RNA_def_struct_sdna(srna, "ThemeSpace"); + RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor."); + + rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC); + + prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Panel", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); +} + + static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) { StructRNA *srna; @@ -1321,6 +1341,11 @@ static void rna_def_userdef_themes(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ThemeNodeEditor"); RNA_def_property_ui_text(prop, "Node Editor", ""); + prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "tlogic"); + RNA_def_property_struct_type(prop, "ThemeLogicEditor"); + RNA_def_property_ui_text(prop, "Logic Editor", ""); + prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "toops"); RNA_def_property_struct_type(prop, "ThemeOutliner"); @@ -1357,6 +1382,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna) rna_def_userdef_theme_space_outliner(brna); rna_def_userdef_theme_space_info(brna); rna_def_userdef_theme_space_sound(brna); + rna_def_userdef_theme_space_logic(brna); rna_def_userdef_theme_colorset(brna); rna_def_userdef_themes(brna); } |