diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-07-31 15:12:38 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-07-31 15:12:38 +0400 |
commit | 432bd158fbdb9d56f9499dcc0e465f4e148abbf3 (patch) | |
tree | 3147ff78468de6abea93493eff1fc320b0c65ef3 /source/blender/makesrna/intern/rna_ID.c | |
parent | f4a1dc4c8dd353aa614bc7c00846e5076ddc2dc2 (diff) |
bugfix [#28111] material.pop breaks mt->mat_nr
create a new parameter for materials.pop() to not remove material slot.
this way the mat_nr is still the old one.
for the default behaviour we now have material remapping (i.e. data_delete_material_index_id(id, index)).
This new function is brought from the material_slot remove function.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 3ce84e3a19f..6d7fc0ee57b 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -418,6 +418,7 @@ static void rna_def_ID_materials(BlenderRNA *brna) RNA_def_function_ui_description(func, "Remove a material from the data block."); parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "", "Index of material to remove.", 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_boolean(func, "remove_material_slot", 1, "", "Remove the material slot and assign 1st material to old faces."); parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove."); RNA_def_function_return(func, parm); } |