Fix Surface Deform not unbinding if target is removed
This commit is contained in:
@@ -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):
|
||||||
|
@@ -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 = {
|
||||||
|
Reference in New Issue
Block a user