diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-11-12 01:18:46 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-11-12 01:18:46 +0300 |
commit | c29795452cc71cb9f5a571a4aff0f593a2d7acaf (patch) | |
tree | 53a46bb77f3102c545f7e55d3344e310b3bf6116 /source/blender/modifiers/intern/MOD_ui_common.c | |
parent | 9980fd0b8e1f3a07060316f28469f55a3f2fc0cd (diff) | |
parent | 03ccf37162d365f3fdc8d8cd0cd6e9ff314fec6e (diff) |
Merge branch 'master' into temp-sculpt-roll-mappingtemp-sculpt-roll-mapping
Diffstat (limited to 'source/blender/modifiers/intern/MOD_ui_common.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ui_common.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c index c027cae8cdb..0f6c40610a0 100644 --- a/source/blender/modifiers/intern/MOD_ui_common.c +++ b/source/blender/modifiers/intern/MOD_ui_common.c @@ -326,8 +326,34 @@ static void modifier_panel_header(const bContext *C, Panel *panel) } } /* Tessellation point for curve-typed objects. */ else if (ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT)) { + /* Smooth modifier can work with tessellated curves only (works on mesh edges explicitly). */ + if (md->type == eModifierType_Smooth) { + /* Add button (appearing to be OFF) and add tip why this can't be changed. */ + sub = uiLayoutRow(row, true); + uiBlock *block = uiLayoutGetBlock(sub); + static int apply_on_spline_always_off_hack = 0; + uiBut *but = uiDefIconButBitI(block, + UI_BTYPE_TOGGLE, + eModifierMode_ApplyOnSpline, + 0, + ICON_SURFACE_DATA, + 0, + 0, + UI_UNIT_X - 2, + UI_UNIT_Y, + &apply_on_spline_always_off_hack, + 0.0, + 0.0, + 0.0, + 0.0, + TIP_("Apply on Spline")); + UI_but_disable( + but, TIP_("This modifier can only deform filled curve/surface, not the control points")); + buttons_number++; + } /* Some modifiers can work with pre-tessellated curves only. */ - if (ELEM(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { + else if (ELEM( + md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { /* Add button (appearing to be ON) and add tip why this can't be changed. */ sub = uiLayoutRow(row, true); uiBlock *block = uiLayoutGetBlock(sub); |