From 7eae2080f23446054d0a7a3f30f8dd6c4969d1fa Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Jan 2009 22:09:23 +0000 Subject: [PATCH] Fix for bug #18087: Editing of object name and modifiers did not work in editing buttons if the object data was linked. --- source/blender/src/buttons_editing.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 7ba6f122d39..953519416e1 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1944,13 +1944,14 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiButSetFunc(but, modifiers_applyModifier, ob, md); } + uiClearButLock(); + uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE); + if (md->type!=eModifierType_Fluidsim && md->type!=eModifierType_Softbody && md->type!=eModifierType_ParticleSystem && (md->type!=eModifierType_Cloth)) { but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Copy", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Duplicate the current modifier at the same position in the stack"); uiButSetFunc(but, modifiers_copyModifier, ob, md); } uiBlockEndAlign(block); - - uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE); } lx = x + 10; @@ -5525,7 +5526,6 @@ static void editing_panel_links(Object *ob) uiBlockSetCol(block, TH_AUTO); } if(ob) { - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); but = uiDefBut(block, TEX, B_IDNAME, "OB:", xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 21.0, 0, 0, "Active Object name."); #ifdef WITH_VERSE if(ob->vnode) uiButSetFunc(but, test_and_send_idbutton_cb, ob, ob->id.name); @@ -5534,6 +5534,7 @@ static void editing_panel_links(Object *ob) uiButSetFunc(but, test_idbutton_cb, ob->id.name, NULL); #endif + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); } /* empty display handling, note it returns! */