diff options
author | Matt Ebb <matt@mke3.net> | 2009-12-10 04:30:47 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-12-10 04:30:47 +0300 |
commit | 985c24b0f10da0de347965de0572fb6b715d8f55 (patch) | |
tree | bd83fcd65e6611fb3fbeb94b400a55186c0b6717 /source | |
parent | 653593b5748eb7ca78c74336bca1166ade0bbc75 (diff) |
Fix for 'Copy materials to selected' button freezing when using linked geometry
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 59b220dec63..4be35a4a2c4 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -442,7 +442,9 @@ static int material_slot_copy_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { if(ob != ob_iter && give_matarar(ob_iter)) { - assign_matarar(ob_iter, matar, ob->totcol); + if (ob->data != ob_iter->data) + assign_matarar(ob_iter, matar, ob->totcol); + if(ob_iter->totcol==ob->totcol) { ob_iter->actcol= ob->actcol; WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 9fc24516d2d..6c13a36cdf3 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -274,6 +274,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) case ND_CONSTRAINT: ED_area_tag_redraw(sa); break; + case ND_DRAW: case ND_SHADING: case ND_SHADING_DRAW: /* currently works by redraws... if preview is set, it (re)starts job */ diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index d0447cf0376..c4bfb9e0197 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1040,13 +1040,13 @@ static void rna_def_material_slot(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL); RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot."); - RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update"); prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, link_items); RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL); RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data."); - RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update"); 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); |