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:
authorDalai Felinto <dfelinto@gmail.com>2017-01-30 16:14:27 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-01-30 16:20:31 +0300
commit3da834e83ce9d7056c033148dab04885a6d3b1b7 (patch)
treed6e192f2b247c70e57a88ee985dfc773284d6af8 /source/blender/makesrna/intern
parentdce8ef49ffb7c2e38455da8195b9cacba8b0424a (diff)
Collection Editor based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes: * Renamed references of layer manager to collections manager * I didn't include the editors/space_collections/ draw and util files. I still need to bring the drawing code here, so we see something.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_space.c13
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c28
2 files changed, 41 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index af4fb9d0d8a..14b8410e738 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -79,6 +79,7 @@ EnumPropertyItem rna_enum_space_type_items[] = {
{0, "", ICON_NONE, NULL, NULL},
{SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related data-blocks"},
{SPACE_OUTLINER, "OUTLINER", ICON_OOPS, "Outliner", "Overview of scene graph and all available data-blocks"},
+ {SPACE_COLLECTIONS, "COLLECTION_MANAGER", ICON_COLLAPSEMENU, "Collections", "Edit collections of active render layer"},
{SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "Edit persistent configuration settings"},
{SPACE_INFO, "INFO", ICON_INFO, "Info", "Main menu bar and list of error messages (drag down to expand and display)"},
{0, "", ICON_NONE, NULL, NULL},
@@ -315,6 +316,8 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
return &RNA_SpaceUserPreferences;
case SPACE_CLIP:
return &RNA_SpaceClipEditor;
+ case SPACE_COLLECTIONS:
+ return &RNA_SpaceCollectionManager;
default:
return &RNA_Space;
}
@@ -4812,6 +4815,15 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
}
+static void rna_def_space_collections(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna = RNA_def_struct(brna, "SpaceCollectionManager", "Space");
+ RNA_def_struct_sdna(srna, "SpaceCollections");
+ RNA_def_struct_ui_text(srna, "Space Collection Manager", "Layer Collection space data");
+}
+
void RNA_def_space(BlenderRNA *brna)
{
@@ -4838,6 +4850,7 @@ void RNA_def_space(BlenderRNA *brna)
rna_def_space_node(brna);
rna_def_space_logic(brna);
rna_def_space_clip(brna);
+ rna_def_space_collections(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 0eab38faca8..dbf6e636c65 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2956,6 +2956,26 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
rna_def_userdef_theme_spaces_curves(srna, false, false, false, true);
}
+static void rna_def_userdef_theme_space_collections(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "ThemeCollectionManager", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
+ RNA_def_struct_ui_text(srna, "Theme Collection Manager", "Theme settings for the Collection Manager");
+
+ rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
+
+ prop = RNA_def_property(srna, "selected_collection", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "hilite");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Selected Collection", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+}
+
static void rna_def_userdef_themes(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2982,6 +3002,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
{16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""},
{17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
{20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""},
+ {21, "COLLECTION_MANAGER", ICON_COLLAPSEMENU, "Collection Manager", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -3115,6 +3136,12 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "tclip");
RNA_def_property_struct_type(prop, "ThemeClipEditor");
RNA_def_property_ui_text(prop, "Clip Editor", "");
+
+ prop = RNA_def_property(srna, "collection_manager", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "tcollections");
+ RNA_def_property_struct_type(prop, "ThemeCollectionManager");
+ RNA_def_property_ui_text(prop, "Collection Manager", "");
}
static void rna_def_userdef_addon(BlenderRNA *brna)
@@ -3205,6 +3232,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_space_console(brna);
rna_def_userdef_theme_space_logic(brna);
rna_def_userdef_theme_space_clip(brna);
+ rna_def_userdef_theme_space_collections(brna);
rna_def_userdef_theme_colorset(brna);
rna_def_userdef_themes(brna);
}