new addon simple_deform_helper #104464

Closed
EMM wants to merge 29 commits from Guai_Wo_Ge_EMM/blender-addons:simple_deform_helper into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 79308887c9 - Show all commits

View File

@ -25,33 +25,34 @@ class SimpleDeformHelperToolPanel(Panel, GizmoUtils):
@staticmethod @staticmethod
def draw_property(layout, context): def draw_property(layout, context):
cls = SimpleDeformHelperToolPanel if GizmoUtils.poll_simple_deform_public(context):
pref = cls.pref_() cls = SimpleDeformHelperToolPanel
pref = cls.pref_()
obj = context.object obj = context.object
mod = obj.modifiers.active mod = obj.modifiers.active
prop = obj.SimpleDeformGizmo_PropertyGroup prop = obj.SimpleDeformGizmo_PropertyGroup
ctrl_obj = mod.origin.SimpleDeformGizmo_PropertyGroup if mod.origin else prop ctrl_obj = mod.origin.SimpleDeformGizmo_PropertyGroup if mod.origin else prop
layout.prop(ctrl_obj, layout.prop(ctrl_obj,
'origin_mode', 'origin_mode',
text='') text='')
layout.prop(pref,
'update_deform_wireframe',
icon='MOD_WIREFRAME',
text='')
layout.prop(pref,
'show_set_axis_button',
icon='EMPTY_AXIS',
text='')
if pref.modifier_deform_method_is_bend:
layout.prop(pref, layout.prop(pref,
'display_bend_axis_switch_gizmo', 'update_deform_wireframe',
toggle=1) icon='MOD_WIREFRAME',
layout.prop(pref, text='')
'modifiers_limits_tolerance', layout.prop(pref,
text='') 'show_set_axis_button',
icon='EMPTY_AXIS',
text='')
if pref.modifier_deform_method_is_bend:
layout.prop(pref,
'display_bend_axis_switch_gizmo',
toggle=1)
layout.prop(pref,
'modifiers_limits_tolerance',
text='')
def draw_settings(self, context): def draw_settings(self, context):
show_in_settings = GizmoUtils.pref_().show_gizmo_property_location == 'ToolSettings' show_in_settings = GizmoUtils.pref_().show_gizmo_property_location == 'ToolSettings'