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:
authorAzeem Bande-Ali <azeemba>2022-03-04 02:28:48 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-03-04 02:28:48 +0300
commitfd2519e0b6948903892c3cfc373c903337979407 (patch)
tree4150c341b86662fc66c9dd6edf44cd98dc155225 /source/blender/makesrna
parent471f27d66bd71e80db82c41db2a6fd58f854b46a (diff)
UI: Drag & Drop to Properties Materials Panel
Support drag/drop of materials to Properties Material Slots. See D13549 for more details. Differential Revision: https://developer.blender.org/D13549 Reviewed by Julian Eisel
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index c598e63a32a..7164f24c2f7 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2454,6 +2454,10 @@ static void rna_def_material_slot(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Material", "Material data-block used by this material slot");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_MaterialSlot_update");
+ prop = RNA_def_property(srna, "slot_index", PROP_INT, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_MaterialSlot_index", NULL, NULL);
+
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(
prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL);