Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-03-01 23:56:10 +0300
committerLuca Rood <dev@lucarood.com>2017-03-01 23:56:10 +0300
commit856077618a9dfe33a6fb25c86effdfd2b3098419 (patch)
tree57a5c57aa978302ba24850ec2174012d1bfa2a75 /release
parent193827e59bd45f9e5818551cf605e9645c78e14c (diff)
Fix T50830: Wrong context when calling surfacedeform_bind
The custom poll function for surfacedeform_bind seems to have caused issues when calling it from Python. Fixed by using the generic modifier poll function, and setting the button to be active or not in the Python UI code instead. (there might be a better way, but for now this works fine)
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index d62c20d4589..68b6265ab15 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -960,10 +960,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
+ col = layout.column()
+ col.active = md.target is not None
+
if md.is_bound:
- layout.operator("object.surfacedeform_bind", text="Unbind")
+ col.operator("object.surfacedeform_bind", text="Unbind")
else:
- layout.operator("object.surfacedeform_bind", text="Bind")
+ col.operator("object.surfacedeform_bind", text="Bind")
def UV_PROJECT(self, layout, ob, md):
split = layout.split()