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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-01 21:54:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-01 21:54:33 +0400
commit9a88524f681d62cee51dfbc3186d59b4b0712a05 (patch)
tree8fc1c2e8d81aac974e39d14d409f8c338530095b /source/blender/makesrna/intern/rna_meta.c
parent738491555d4e831186de337800dce4f14c56d252 (diff)
support for object data material assignment in python
eg: bpy.context.object.data.materials[0] = bpy.data.materials["SomeMaterial"]
Diffstat (limited to 'source/blender/makesrna/intern/rna_meta.c')
-rw-r--r--source/blender/makesrna/intern/rna_meta.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 5e5cf0be0ae..1c7359cc195 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -330,7 +330,8 @@ static void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
- RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
/* anim */
rna_def_animdata_common(srna);