diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 12:58:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 13:08:18 +0300 |
commit | 856d36e4b810a78d1dcb96ebed08b07b60bda9c8 (patch) | |
tree | 3030859adbc49714d5d6bd6c8b4dda7aac17e93a /source/blender/makesrna/intern/rna_object.c | |
parent | cb42ad8c7595c8f5c157302c220e6107f07b847c (diff) |
Static Override: progresses towards full support for material slots.
Material slots are a real pain to get working, due to all the black
magic they do to hide object vs. obdata storage of the material...
Currently hitting an order problem - we need to always set 'link' (to
object or obdata) property of the slot first, before we set its
material... *super-sigh*
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 398928901b8..d9a9a7b93e3 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1985,7 +1985,7 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol"); RNA_def_property_struct_type(prop, "MaterialSlot"); - RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC | PROPOVERRIDE_INDEX_ONLY); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC | PROPOVERRIDE_NO_PROP_NAME); /* don't dereference pointer! */ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object"); @@ -2002,6 +2002,7 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "actcol"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC); RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range"); RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot"); |