diff options
author | Ton Roosendaal <ton@blender.org> | 2008-09-08 19:15:00 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-09-08 19:15:00 +0400 |
commit | de4828036857e76141ca336997b99978ee09fb5f (patch) | |
tree | 45573868c6b0129bbe9b005ab5514f11a45e426c /source/blender/src/buttons_editing.c | |
parent | f7a6d032fc7f82fb1cf8947ae6914ab2131155c1 (diff) |
Bugfix #17566
Modifier buttons: now check properly for external lib data, modifiers are
on object only. Only "Apply" is locked now.
Diffstat (limited to 'source/blender/src/buttons_editing.c')
-rw-r--r-- | source/blender/src/buttons_editing.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 0a792b05428..425ec8956cb 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1855,6 +1855,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco y -= 18; if (!isVirtual && (md->type!=eModifierType_Collision)) { + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); /* only here obdata, the rest of modifiers is ob level */ + uiBlockBeginAlign(block); if (md->type==eModifierType_ParticleSystem) { but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Convert", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Convert the current particles to a mesh object"); @@ -1870,6 +1872,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiButSetFunc(but, modifiers_copyModifier, ob, md); } uiBlockEndAlign(block); + + uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE); } lx = x + 10; @@ -2552,7 +2556,7 @@ static void editing_panel_modifiers(Object *ob) block= uiNewBlock(&curarea->uiblocks, "editing_panel_modifiers", UI_EMBOSS, UI_HELV, curarea->win); if( uiNewPanel(curarea, block, "Modifiers", "Editing", 640, 0, 318, 204)==0) return; - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + uiSetButLock((ob && ob->id.lib), ERROR_LIBDATA_MESSAGE); uiNewPanelHeight(block, 204); uiDefBlockBut(block, modifiers_add_menu, ob, "Add Modifier", 0, 190, 130, 20, "Add a new modifier"); |