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-11-30 23:38:07 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-12-01 19:15:54 +0300
commitf91e05778612712050ed6f19ce9a2223c0404653 (patch)
tree573e49186df2af01e2feb9bb09ad8513d7eeb8c9 /source/blender/makesrna/intern
parentaeaf87bbeb011e9a571eefa12d81fa6fb2b8bd5b (diff)
Groups and collection: editing group collections
Allow users to edit either the object group active collection or view layer one We can't support users selecting the group collections from the outliner group because that would be imply having an active group for the scene or workspace. But the way it is now allows to see and edit the collection values after the group is instanced.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_group.c9
-rw-r--r--source/blender/makesrna/intern/rna_space.c10
2 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index ec67370b14f..bf64bb1181f 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -132,10 +132,11 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_Group_objects_get", NULL, NULL, NULL, NULL);
rna_def_group_objects(brna, prop);
- prop = RNA_def_property(srna, "collections", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "view_layer->layer_collections", NULL);
- RNA_def_property_struct_type(prop, "LayerCollection");
- RNA_def_property_ui_text(prop, "Layer Collections", "");
+ prop = RNA_def_property(srna, "view_layer", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ViewLayer");
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "View Layer", "Group internal view layer");
}
#endif
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 3a496d13429..aa3f159af40 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -225,6 +225,11 @@ static const EnumPropertyItem buttons_texture_context_items[] = {
{0, NULL, 0, NULL, NULL}
};
+static const EnumPropertyItem buttons_collection_context_items[] = {
+ {SB_COLLECTION_CTX_VIEW_LAYER, "VIEW_LAYER", ICON_RENDERLAYERS, "", "Show material textures"},
+ {SB_COLLECTION_CTX_GROUP, "GROUP", ICON_GROUP, "", "Show world textures"},
+ {0, NULL, 0, NULL, NULL}
+};
static const EnumPropertyItem fileselectparams_recursion_level_items[] = {
{0, "NONE", 0, "None", "Only list current directory's content, with no recursion"},
@@ -2743,6 +2748,11 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Limited Texture Context",
"Use the limited version of texture user (for 'old shading' mode)");
+ prop = RNA_def_property(srna, "collection_context", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, buttons_collection_context_items);
+ RNA_def_property_ui_text(prop, "Collection Context", "Which collection we want to show");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL);
+
/* pinned data */
prop = RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pinid");