[Bf-blender-cvs] [ca958642fa9] master: Fix Surface Deform not unbinding if target is removed
Luca Rood
noreply at git.blender.org
Thu Apr 20 17:50:18 CEST 2017
Commit: ca958642fa92118f8c6fc1f585f897999ff6d32a
Author: Luca Rood
Date: Thu Apr 20 17:48:37 2017 +0200
Branches: master
https://developer.blender.org/rBca958642fa92118f8c6fc1f585f897999ff6d32a
Fix Surface Deform not unbinding if target is removed
===================================================================
M release/scripts/startup/bl_ui/properties_data_modifier.py
M source/blender/modifiers/intern/MOD_surfacedeform.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index a37d61dd0af..d72855fab6b 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -969,11 +969,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
col = layout.column()
- col.active = md.target is not None
if md.is_bound:
col.operator("object.surfacedeform_bind", text="Unbind")
else:
+ col.active = md.target is not None
col.operator("object.surfacedeform_bind", text="Bind")
def UV_PROJECT(self, layout, ob, md):
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index da9b926d1f4..e9ec90198c4 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1195,7 +1195,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
- return !smd->target;
+ return !smd->target && !(smd->verts && !(smd->flags & MOD_SDEF_BIND));
}
ModifierTypeInfo modifierType_SurfaceDeform = {
More information about the Bf-blender-cvs
mailing list