diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-03 23:04:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-03 23:16:20 +0300 |
commit | c69458985cdb0cc1b388b81f61e5091c73461003 (patch) | |
tree | a6da9bba98ca516553b2c0af8c9755c72331e257 /release/scripts/startup/bl_ui/properties_data_modifier.py | |
parent | a66a54c06d414a7d70b8ad13f683b6f5e1874e68 (diff) |
Hook Modifier: add falloff & radius options
- Add falloff types & curves (matching warp-modifier)
- Add uniform scale option,
important when adding hooks to non-uniform scaled objects,
especially for use with lattice objects which can't avoid uneven scaling.
This uses relative transformation set when the hook is assigned,
when measuring the distances.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_modifier.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_modifier.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 4c967079137..92e9e02ffca 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -352,6 +352,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.label(text="Settings are inside the Physics tab") def HOOK(self, layout, ob, md): + use_falloff = (md.falloff_type != 'NONE') split = layout.split() col = split.column() @@ -366,19 +367,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.separator() - split = layout.split() + row = layout.row(align=True) + if use_falloff: + row.prop(md, "falloff_radius") + row.prop(md, "strength", slider=True) + layout.prop(md, "falloff_type") - col = split.column() - col.prop(md, "falloff") - col.prop(md, "force", slider=True) + col = layout.column() + if use_falloff: + if md.falloff_type == 'CURVE': + col.template_curve_mapping(md, "falloff_curve") + + split = layout.split() col = split.column() - col.operator("object.hook_reset", text="Reset") - col.operator("object.hook_recenter", text="Recenter") + col.prop(md, "use_falloff_uniform") if ob.mode == 'EDIT': - layout.separator() - row = layout.row() + row = col.row(align=True) + row.operator("object.hook_reset", text="Reset") + row.operator("object.hook_recenter", text="Recenter") + + row = layout.row(align=True) row.operator("object.hook_select", text="Select") row.operator("object.hook_assign", text="Assign") |