Fix Surface Deform not unbinding if target is removed

This commit is contained in:
Luca Rood
2017-04-20 17:48:37 +02:00
parent 52295dd480
commit ca958642fa
2 changed files with 2 additions and 2 deletions

View File

@@ -969,11 +969,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator() layout.separator()
col = layout.column() col = layout.column()
col.active = md.target is not None
if md.is_bound: if md.is_bound:
col.operator("object.surfacedeform_bind", text="Unbind") col.operator("object.surfacedeform_bind", text="Unbind")
else: else:
col.active = md.target is not None
col.operator("object.surfacedeform_bind", text="Bind") col.operator("object.surfacedeform_bind", text="Bind")
def UV_PROJECT(self, layout, ob, md): def UV_PROJECT(self, layout, ob, md):

View File

@@ -1195,7 +1195,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{ {
SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md; SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
return !smd->target; return !smd->target && !(smd->verts && !(smd->flags & MOD_SDEF_BIND));
} }
ModifierTypeInfo modifierType_SurfaceDeform = { ModifierTypeInfo modifierType_SurfaceDeform = {