diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2012-08-12 21:12:07 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2012-08-12 21:12:07 +0400 |
commit | 3ebbfe2c406955ed765a697825cde0c891e83a24 (patch) | |
tree | f4e06ea01bca2221722f93a0c413b7d90712a028 /source/blender/editors/object | |
parent | b2fdb3f50e0eb4aa1725c33c54afc0901d829c59 (diff) |
new parameter in assign_material() to specify where material shall be assigned: object, obdata, by userpref(default) (as discussed with ideasman_42)
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 561ebafc0d7..d8c964ff2df 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1368,7 +1368,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) /* new approach, using functions from kernel */ for (a = 0; a < ob_src->totcol; a++) { Material *ma = give_current_material(ob_src, a + 1); - assign_material(ob_dst, ma, a + 1); /* also works with ma==NULL */ + assign_material(ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF); /* also works with ma==NULL */ } break; case MAKE_LINKS_ANIMDATA: @@ -1692,7 +1692,7 @@ static void single_mat_users(Scene *scene, int flag, int do_textures) BKE_copy_animdata_id_action(&man->id); man->id.us = 0; - assign_material(ob, man, a); + assign_material(ob, man, a, BKE_MAT_ASSIGN_USERPREF); if (do_textures) { for (b = 0; b < MAX_MTEX; b++) { @@ -2044,7 +2044,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *even if (base == NULL || ma == NULL) return OPERATOR_CANCELLED; - assign_material(base->object, ma, 1); + assign_material(base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF); DAG_ids_flush_update(bmain, 0); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); |