diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-01-30 20:07:38 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-01-30 20:21:34 +0300 |
commit | 1bfc6e79eea93dfd9f32b508f10b1055d3f15fb1 (patch) | |
tree | 46da256a9d3c995869c1ab42dc0d5468dafc68c8 | |
parent | f51c34185ed424a5e3ea0a2fa2f34f8ec9d678b2 (diff) |
RNA: collection override
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index c07287abd16..9c45e34f211 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -318,6 +318,7 @@ extern StructRNA RNA_Lattice; extern StructRNA RNA_LatticeModifier; extern StructRNA RNA_LatticePoint; extern StructRNA RNA_LayerCollection; +extern StructRNA RNA_LayerCollectionOverride; extern StructRNA RNA_Library; extern StructRNA RNA_LimitDistanceConstraint; extern StructRNA RNA_LimitLocationConstraint; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 64feb820207..3456c7107c2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5559,6 +5559,21 @@ static void rna_def_scene_collection(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Filter Objects", "All the objects dynamically added to this collection via the filter"); } +static void rna_def_layer_collection_override(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "LayerCollectionOverride", NULL); + RNA_def_struct_sdna(srna, "CollectionOverride"); + RNA_def_struct_ui_text(srna, "Collection Override", "Collection Override"); + + prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Name", "Collection name"); + RNA_def_struct_name_property(srna, prop); + RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, NULL); +} + static void rna_def_layer_collection(BlenderRNA *brna) { StructRNA *srna; @@ -5590,6 +5605,11 @@ static void rna_def_layer_collection(BlenderRNA *brna) RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_LayerCollection_objects_get", NULL, NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Objects", "All the objects directly or indirectly added to this collection (not including sub-collection objects)"); + prop = RNA_def_property(srna, "overrides", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "overrides", NULL); + RNA_def_property_struct_type(prop, "LayerCollectionOverride"); + RNA_def_property_ui_text(prop, "Collection Overrides", ""); + /* Flags */ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", COLLECTION_VISIBLE); @@ -8173,6 +8193,7 @@ void RNA_def_scene(BlenderRNA *brna) rna_def_display_safe_areas(brna); rna_def_scene_collection(brna); rna_def_layer_collection(brna); + rna_def_layer_collection_override(brna); rna_def_scene_layer(brna); rna_def_object_base(brna); RNA_define_animate_sdna(true); |