diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-06 11:04:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-06 11:07:44 +0300 |
commit | be1a684755905fd022be5ceecf9a7b2687475793 (patch) | |
tree | 5bcc3a62904a75e67980ea0e73dedd3a713c5e89 /source/blender/makesrna | |
parent | fa4172c28cfee1cd8c4b91481b6377eae48fdf93 (diff) |
Fix T45695: Assigning material reverts MaterialSlot.link
Setting the material was resetting the link bit, this is OK from the UI,
confusing for scripts.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 7e1b0df9ce7..54f1798b10c 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -710,7 +710,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value) Object *ob = (Object *)ptr->id.data; DAG_id_tag_update(value.data, 0); - assign_material(ob, value.data, ob->actcol, BKE_MAT_ASSIGN_USERPREF); + assign_material(ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING); } static int rna_Object_active_material_editable(PointerRNA *ptr) @@ -882,7 +882,7 @@ static void rna_MaterialSlot_material_set(PointerRNA *ptr, PointerRNA value) Object *ob = (Object *)ptr->id.data; int index = (Material **)ptr->data - ob->mat; - assign_material(ob, value.data, index + 1, BKE_MAT_ASSIGN_USERPREF); + assign_material(ob, value.data, index + 1, BKE_MAT_ASSIGN_EXISTING); } static int rna_MaterialSlot_link_get(PointerRNA *ptr) |