diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index 292f774ec53..a679fa43d30 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -185,16 +185,8 @@ class GreasePencilBrushFalloff: col.prop(brush, "curve_distance_falloff_preset", text="") if brush.curve_distance_falloff_preset == 'CUSTOM': - layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True) - - col = layout.column(align=True) - row = col.row(align=True) - row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' - row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' + layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, + use_negative_slope=True, show_presets=True) class GREASE_PENCIL_MT_move_to_layer(Menu): diff --git a/scripts/startup/bl_ui/properties_paint_common.py b/scripts/startup/bl_ui/properties_paint_common.py index a18cf655496..9131a2be6e5 100644 --- a/scripts/startup/bl_ui/properties_paint_common.py +++ b/scripts/startup/bl_ui/properties_paint_common.py @@ -655,16 +655,11 @@ class FalloffPanel(BrushPanel): col.prop(brush, "curve_distance_falloff_preset", text="") if brush.curve_distance_falloff_preset == 'CUSTOM': - layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True) + layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, + use_negative_slope=True, show_presets=True) col = layout.column(align=True) row = col.row(align=True) - row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' - row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' show_falloff_shape = False if mode in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT'} and brush.sculpt_brush_type != 'POSE': diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 0583ab98f79..de2f5fdee59 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -9012,14 +9012,8 @@ class VIEW3D_PT_curves_sculpt_parameter_falloff(Panel): layout.template_curve_mapping( brush.curves_sculpt_settings, "curve_parameter_falloff", - brush=True) - row = layout.row(align=True) - row.operator("brush.sculpt_curves_falloff_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' - row.operator("brush.sculpt_curves_falloff_preset", icon='SPHERECURVE', text="").shape = 'ROUND' - row.operator("brush.sculpt_curves_falloff_preset", icon='ROOTCURVE', text="").shape = 'ROOT' - row.operator("brush.sculpt_curves_falloff_preset", icon='SHARPCURVE', text="").shape = 'SHARP' - row.operator("brush.sculpt_curves_falloff_preset", icon='LINCURVE', text="").shape = 'LINE' - row.operator("brush.sculpt_curves_falloff_preset", icon='NOCURVE', text="").shape = 'MAX' + brush=True, + show_presets=True) class VIEW3D_PT_curves_sculpt_grow_shrink_scaling(Panel): diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index ed263d410f7..1e9c5106979 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -872,16 +872,8 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel): col.prop(brush, "curve_distance_falloff_preset", expand=True) if brush.curve_distance_falloff_preset == 'CUSTOM': - layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True) - - col = layout.column(align=True) - row = col.row(align=True) - row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' - row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' - row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' - row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' - row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' - row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' + layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, + use_negative_slope=True, show_presets=True) # TODO, move to space_view3d.py diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 4d2363d0860..5f27c1d56f0 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -2439,7 +2439,8 @@ void uiTemplateCurveMapping(uiLayout *layout, bool levels, bool brush, bool neg_slope, - bool tone); + bool tone, + bool presets); /** * Template for a path creation widget intended for custom bevel profiles. * This section is quite similar to #uiTemplateCurveMapping, but with reduced complexity. diff --git a/source/blender/editors/interface/templates/interface_template_color_management.cc b/source/blender/editors/interface/templates/interface_template_color_management.cc index ad89c40a910..1b9b6d87989 100644 --- a/source/blender/editors/interface/templates/interface_template_color_management.cc +++ b/source/blender/editors/interface/templates/interface_template_color_management.cc @@ -65,7 +65,7 @@ void uiTemplateColormanagedViewSettings(uiLayout *layout, col->prop(&view_transform_ptr, "use_curve_mapping", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES) { uiTemplateCurveMapping( - col, &view_transform_ptr, "curve_mapping", 'c', true, false, false, false); + col, &view_transform_ptr, "curve_mapping", 'c', true, false, false, false, false); } col = &layout->column(false); diff --git a/source/blender/editors/interface/templates/interface_template_curve_mapping.cc b/source/blender/editors/interface/templates/interface_template_curve_mapping.cc index 5b40bdd68e1..7e0fc6fcb7c 100644 --- a/source/blender/editors/interface/templates/interface_template_curve_mapping.cc +++ b/source/blender/editors/interface/templates/interface_template_curve_mapping.cc @@ -318,6 +318,27 @@ static void curvemap_buttons_redraw(bContext &C) ED_region_tag_redraw(CTX_wm_region(&C)); } +static void add_preset_button(uiBlock *block, + const float dx, + const int icon, + std::optional tip, + CurveMapping *cumap, + const bool neg_slope, + const int preset, + const RNAUpdateCb &cb) +{ + uiBut *bt = uiDefIconBut(block, ButType::Row, 0, icon, 0, 0, dx, dx, &cumap->cur, 0.0, 3.0, tip); + UI_but_func_set(bt, [&, cumap, neg_slope, preset, cb](bContext &C) { + const CurveMapSlopeType slope = neg_slope ? CurveMapSlopeType::Negative : + CurveMapSlopeType::Positive; + cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; + cumap->preset = preset; + BKE_curvemap_reset(cumap->cm, &cumap->clipr, cumap->preset, slope); + BKE_curvemapping_changed(cumap, false); + rna_update_cb(C, cb); + }); +} + /** * \note Still unsure how this call evolves. * @@ -330,6 +351,7 @@ static void curvemap_buttons_layout(uiLayout *layout, bool brush, bool neg_slope, bool tone, + bool presets, const RNAUpdateCb &cb) { CurveMapping *cumap = static_cast(ptr->data); @@ -768,6 +790,41 @@ static void curvemap_buttons_layout(uiLayout *layout, }); } + if (presets) { + row = &layout->row(true); + sub->alignment_set(blender::ui::LayoutAlign::Left); + add_preset_button(block, + dx, + ICON_SMOOTHCURVE, + TIP_("Smooth preset"), + cumap, + neg_slope, + CURVE_PRESET_SMOOTH, + cb); + add_preset_button(block, + dx, + ICON_SPHERECURVE, + TIP_("Round preset"), + cumap, + neg_slope, + CURVE_PRESET_ROUND, + cb); + add_preset_button( + block, dx, ICON_ROOTCURVE, TIP_("Root preset"), cumap, neg_slope, CURVE_PRESET_ROOT, cb); + add_preset_button(block, + dx, + ICON_SHARPCURVE, + TIP_("Sharp preset"), + cumap, + neg_slope, + CURVE_PRESET_SHARP, + cb); + add_preset_button( + block, dx, ICON_LINCURVE, TIP_("Linear preset"), cumap, neg_slope, CURVE_PRESET_LINE, cb); + add_preset_button( + block, dx, ICON_NOCURVE, TIP_("Constant preset"), cumap, neg_slope, CURVE_PRESET_MAX, cb); + } + UI_block_funcN_set(block, nullptr, nullptr, nullptr); } @@ -778,7 +835,8 @@ void uiTemplateCurveMapping(uiLayout *layout, bool levels, bool brush, bool neg_slope, - bool tone) + bool tone, + bool presets) { PropertyRNA *prop = RNA_struct_find_property(ptr, propname.c_str()); uiBlock *block = layout->block(); @@ -804,7 +862,7 @@ void uiTemplateCurveMapping(uiLayout *layout, UI_block_lock_set(block, (id && !ID_IS_EDITABLE(id)), ERROR_LIBDATA_MESSAGE); curvemap_buttons_layout( - layout, &cptr, type, levels, brush, neg_slope, tone, RNAUpdateCb{*ptr, prop}); + layout, &cptr, type, levels, brush, neg_slope, tone, presets, RNAUpdateCb{*ptr, prop}); UI_block_lock_clear(block); } diff --git a/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc b/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc index 0f06ae6576a..24179d55fdd 100644 --- a/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc +++ b/source/blender/editors/sculpt_paint/grease_pencil_interpolate.cc @@ -1377,7 +1377,7 @@ static void grease_pencil_interpolate_sequence_ui(bContext *C, wmOperator *op) PointerRNA gpsettings_ptr = RNA_pointer_create_discrete( &scene->id, &RNA_GPencilInterpolateSettings, &ts->gp_interpolate); uiTemplateCurveMapping( - layout, &gpsettings_ptr, "interpolation_curve", 0, false, true, true, false); + layout, &gpsettings_ptr, "interpolation_curve", 0, false, true, true, false, false); } else if (type != InterpolationType::Linear) { row = &layout->row(false); diff --git a/source/blender/editors/sculpt_paint/paint_ops.cc b/source/blender/editors/sculpt_paint/paint_ops.cc index d4a29e395db..d6054427f14 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.cc +++ b/source/blender/editors/sculpt_paint/paint_ops.cc @@ -990,8 +990,6 @@ void ED_operatortypes_paint() /* brush */ WM_operatortype_append(BRUSH_OT_scale_size); - WM_operatortype_append(BRUSH_OT_curve_preset); - WM_operatortype_append(BRUSH_OT_sculpt_curves_falloff_preset); WM_operatortype_append(BRUSH_OT_stencil_control); WM_operatortype_append(BRUSH_OT_stencil_fit_image_aspect); WM_operatortype_append(BRUSH_OT_stencil_reset_transform); diff --git a/source/blender/editors/sculpt_paint/paint_utils.cc b/source/blender/editors/sculpt_paint/paint_utils.cc index dd7b5d38264..596c2f4a264 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.cc +++ b/source/blender/editors/sculpt_paint/paint_utils.cc @@ -179,86 +179,6 @@ void paint_stroke_operator_properties(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } -/* 3D Paint */ - -static wmOperatorStatus brush_curve_preset_exec(bContext *C, wmOperator *op) -{ - Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - - if (br) { - Scene *scene = CTX_data_scene(C); - ViewLayer *view_layer = CTX_data_view_layer(C); - BKE_brush_curve_preset(br, eCurveMappingPreset(RNA_enum_get(op->ptr, "shape"))); - BKE_paint_invalidate_cursor_overlay(scene, view_layer, br->curve_distance_falloff); - } - - return OPERATOR_FINISHED; -} - -static bool brush_curve_preset_poll(bContext *C) -{ - Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - - return br && br->curve_distance_falloff; -} - -static const EnumPropertyItem prop_shape_items[] = { - {CURVE_PRESET_SHARP, "SHARP", 0, "Sharp", ""}, - {CURVE_PRESET_SMOOTH, "SMOOTH", 0, "Smooth", ""}, - {CURVE_PRESET_MAX, "MAX", 0, "Max", ""}, - {CURVE_PRESET_LINE, "LINE", 0, "Line", ""}, - {CURVE_PRESET_ROUND, "ROUND", 0, "Round", ""}, - {CURVE_PRESET_ROOT, "ROOT", 0, "Root", ""}, - {0, nullptr, 0, nullptr, nullptr}, -}; - -void BRUSH_OT_curve_preset(wmOperatorType *ot) -{ - ot->name = "Preset"; - ot->description = "Set brush shape"; - ot->idname = "BRUSH_OT_curve_preset"; - - ot->exec = brush_curve_preset_exec; - ot->poll = brush_curve_preset_poll; - - PropertyRNA *prop; - prop = RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); - RNA_def_property_translation_context(prop, - BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ -} - -static bool brush_sculpt_curves_falloff_preset_poll(bContext *C) -{ - Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - return br && br->curves_sculpt_settings && br->curves_sculpt_settings->curve_parameter_falloff; -} - -static wmOperatorStatus brush_sculpt_curves_falloff_preset_exec(bContext *C, wmOperator *op) -{ - Brush *brush = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - CurveMapping *mapping = brush->curves_sculpt_settings->curve_parameter_falloff; - mapping->preset = RNA_enum_get(op->ptr, "shape"); - CurveMap *map = mapping->cm; - BKE_curvemap_reset(map, &mapping->clipr, mapping->preset, CurveMapSlopeType::Positive); - BKE_brush_tag_unsaved_changes(brush); - return OPERATOR_FINISHED; -} - -void BRUSH_OT_sculpt_curves_falloff_preset(wmOperatorType *ot) -{ - ot->name = "Curve Falloff Preset"; - ot->description = "Set Curve Falloff Preset"; - ot->idname = "BRUSH_OT_sculpt_curves_falloff_preset"; - - ot->exec = brush_sculpt_curves_falloff_preset_exec; - ot->poll = brush_sculpt_curves_falloff_preset_poll; - - PropertyRNA *prop; - prop = RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); - RNA_def_property_translation_context(prop, - BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ -} - /* face-select ops */ static wmOperatorStatus paint_select_linked_exec(bContext *C, wmOperator * /*op*/) { diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.cc b/source/blender/editors/sculpt_paint/sculpt_ops.cc index e5dada6d2ce..6db00a39ba4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/sculpt_ops.cc @@ -1300,8 +1300,15 @@ static void mask_from_cavity_ui(bContext *C, wmOperator *op) if (sd && RNA_boolean_get(op->ptr, "use_curve")) { PointerRNA sculpt_ptr = RNA_pointer_create_discrete(&scene->id, &RNA_Sculpt, sd); - uiTemplateCurveMapping( - layout, &sculpt_ptr, "automasking_cavity_curve_op", 'v', false, false, false, false); + uiTemplateCurveMapping(layout, + &sculpt_ptr, + "automasking_cavity_curve_op", + 'v', + false, + false, + false, + false, + false); } break; } diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 96398b6ee35..1fbfdef10e6 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -106,7 +106,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext * /*C*/, PointerRNA *pt static void node_buts_time(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiTemplateCurveMapping(layout, ptr, "curve", 's', false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "curve", 's', false, false, false, false, false); } static void node_buts_colorramp(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) @@ -116,12 +116,12 @@ static void node_buts_colorramp(uiLayout *layout, bContext * /*C*/, PointerRNA * static void node_buts_curvevec(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false, false); } static void node_buts_curvefloat(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - uiTemplateCurveMapping(layout, ptr, "mapping", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "mapping", 0, false, false, false, false, false); } } // namespace blender::ed::space_node @@ -157,7 +157,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext * /*C*/, PointerRNA *p /* "Tone" (Standard/Film-like) only used in the Compositor. */ bNodeTree *ntree = (bNodeTree *)ptr->owner_id; uiTemplateCurveMapping( - layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT)); + layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT), false); } static void node_buts_normal(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) @@ -542,7 +542,7 @@ static void node_composit_buts_huecorrect(uiLayout *layout, bContext * /*C*/, Po cumap->flag &= ~CUMA_DRAW_SAMPLE; } - uiTemplateCurveMapping(layout, ptr, "mapping", 'h', false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "mapping", 'h', false, false, false, false, false); } static void node_composit_buts_combsep_color(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_ui_api.cc b/source/blender/makesrna/intern/rna_ui_api.cc index cb59bd16436..073803344f0 100644 --- a/source/blender/makesrna/intern/rna_ui_api.cc +++ b/source/blender/makesrna/intern/rna_ui_api.cc @@ -1870,6 +1870,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_boolean(func, "brush", false, "", "Show brush options"); RNA_def_boolean(func, "use_negative_slope", false, "", "Use a negative slope by default"); RNA_def_boolean(func, "show_tone", false, "", "Show tone options"); + RNA_def_boolean(func, "show_presets", false, "", "Show preset options"); func = RNA_def_function(srna, "template_curveprofile", "uiTemplateCurveProfile"); RNA_def_function_ui_description(func, "A profile path editor used for custom profiles"); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc b/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc index 8415160aa2f..22606e22e3e 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_hook.cc @@ -296,7 +296,7 @@ static void panel_draw(const bContext *C, Panel *panel) sub->prop(ptr, "use_falloff_uniform", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "falloff_type") == eWarp_Falloff_Curve) { - uiTemplateCurveMapping(sub, ptr, "custom_curve", 0, false, false, false, false); + uiTemplateCurveMapping(sub, ptr, "custom_curve", 0, false, false, false, false, false); } } diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc index f30f8effe91..f52ef07780c 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc @@ -191,7 +191,7 @@ void draw_custom_curve_settings(const bContext * /*C*/, uiLayout *layout, Pointe row->use_property_decorate_set(false); row->prop(ptr, "use_custom_curve", UI_ITEM_NONE, IFACE_("Custom Curve"), ICON_NONE); if (use_custom_curve) { - uiTemplateCurveMapping(layout, ptr, "custom_curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "custom_curve", 0, false, false, false, false, false); } } diff --git a/source/blender/modifiers/intern/MOD_hook.cc b/source/blender/modifiers/intern/MOD_hook.cc index 99ed27551c4..f271d3df79f 100644 --- a/source/blender/modifiers/intern/MOD_hook.cc +++ b/source/blender/modifiers/intern/MOD_hook.cc @@ -501,7 +501,7 @@ static void falloff_panel_draw(const bContext * /*C*/, Panel *panel) layout->prop(ptr, "use_falloff_uniform", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (RNA_enum_get(ptr, "falloff_type") == eWarp_Falloff_Curve) { - uiTemplateCurveMapping(layout, ptr, "falloff_curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "falloff_curve", 0, false, false, false, false, false); } } diff --git a/source/blender/modifiers/intern/MOD_ui_common.cc b/source/blender/modifiers/intern/MOD_ui_common.cc index 32c27157bd2..41d962e7a5d 100644 --- a/source/blender/modifiers/intern/MOD_ui_common.cc +++ b/source/blender/modifiers/intern/MOD_ui_common.cc @@ -157,7 +157,7 @@ void modifier_grease_pencil_curve_panel_draw(const bContext * /*C*/, Panel *pane PointerRNA *ptr = modifier_panel_get_property_pointers(panel, nullptr); - uiTemplateCurveMapping(layout, ptr, "curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "curve", 0, false, false, false, false, false); } /** diff --git a/source/blender/modifiers/intern/MOD_warp.cc b/source/blender/modifiers/intern/MOD_warp.cc index ff30858dca8..537f0d30f8d 100644 --- a/source/blender/modifiers/intern/MOD_warp.cc +++ b/source/blender/modifiers/intern/MOD_warp.cc @@ -393,7 +393,7 @@ static void falloff_panel_draw(const bContext * /*C*/, Panel *panel) } if (use_falloff && RNA_enum_get(ptr, "falloff_type") == eWarp_Falloff_Curve) { - uiTemplateCurveMapping(layout, ptr, "falloff_curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "falloff_curve", 0, false, false, false, false, false); } } diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.cc b/source/blender/modifiers/intern/MOD_weightvgedit.cc index c20388895b7..240328a525b 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.cc +++ b/source/blender/modifiers/intern/MOD_weightvgedit.cc @@ -342,7 +342,7 @@ static void falloff_panel_draw(const bContext * /*C*/, Panel *panel) sub->use_property_split_set(false); row->prop(ptr, "invert_falloff", UI_ITEM_NONE, "", ICON_ARROW_LEFTRIGHT); if (RNA_enum_get(ptr, "falloff_type") == MOD_WVG_MAPPING_CURVE) { - uiTemplateCurveMapping(layout, ptr, "map_curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "map_curve", 0, false, false, false, false, false); } } diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc index e3f2b12a172..5247bebf0ba 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc @@ -670,7 +670,7 @@ static void falloff_panel_draw(const bContext * /*C*/, Panel *panel) sub->use_property_split_set(false); row->prop(ptr, "invert_falloff", UI_ITEM_NONE, "", ICON_ARROW_LEFTRIGHT); if (RNA_enum_get(ptr, "falloff_type") == MOD_WVG_MAPPING_CURVE) { - uiTemplateCurveMapping(layout, ptr, "map_curve", 0, false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "map_curve", 0, false, false, false, false, false); } modifier_error_message_draw(layout, ptr); } diff --git a/source/blender/sequencer/intern/modifiers/MOD_curves.cc b/source/blender/sequencer/intern/modifiers/MOD_curves.cc index 465d200cda3..4b7b5d835af 100644 --- a/source/blender/sequencer/intern/modifiers/MOD_curves.cc +++ b/source/blender/sequencer/intern/modifiers/MOD_curves.cc @@ -93,7 +93,7 @@ static void curves_panel_draw(const bContext *C, Panel *panel) uiLayout *layout = panel->layout; PointerRNA *ptr = UI_panel_custom_data_get(panel); - uiTemplateCurveMapping(layout, ptr, "curve_mapping", 'c', false, false, false, true); + uiTemplateCurveMapping(layout, ptr, "curve_mapping", 'c', false, false, false, true, false); if (uiLayout *mask_input_layout = layout->panel_prop( C, ptr, "open_mask_input_panel", IFACE_("Mask Input"))) diff --git a/source/blender/sequencer/intern/modifiers/MOD_hue_correct.cc b/source/blender/sequencer/intern/modifiers/MOD_hue_correct.cc index 7091fdf42a1..88687d52621 100644 --- a/source/blender/sequencer/intern/modifiers/MOD_hue_correct.cc +++ b/source/blender/sequencer/intern/modifiers/MOD_hue_correct.cc @@ -120,7 +120,7 @@ static void hue_correct_panel_draw(const bContext *C, Panel *panel) uiLayout *layout = panel->layout; PointerRNA *ptr = UI_panel_custom_data_get(panel); - uiTemplateCurveMapping(layout, ptr, "curve_mapping", 'h', false, false, false, false); + uiTemplateCurveMapping(layout, ptr, "curve_mapping", 'h', false, false, false, false, false); if (uiLayout *mask_input_layout = layout->panel_prop( C, ptr, "open_mask_input_panel", IFACE_("Mask Input"))) diff --git a/source/blender/sequencer/intern/modifiers/MOD_sound_equalizer.cc b/source/blender/sequencer/intern/modifiers/MOD_sound_equalizer.cc index 3bb710e5f9d..f553bd0b4b7 100644 --- a/source/blender/sequencer/intern/modifiers/MOD_sound_equalizer.cc +++ b/source/blender/sequencer/intern/modifiers/MOD_sound_equalizer.cc @@ -46,7 +46,7 @@ static void sound_equalizermodifier_draw(const bContext * /*C*/, Panel *panel) split.label("Hz", ICON_NONE); split.alignment_set(ui::LayoutAlign::Right); split.label(fmt::format("{:.2f}", clip_max_x), ICON_NONE); - uiTemplateCurveMapping(&col, &sound_eq, "curve_mapping", 0, false, true, true, false); + uiTemplateCurveMapping(&col, &sound_eq, "curve_mapping", 0, false, true, true, false, false); uiLayout &row = col.row(false); row.alignment_set(ui::LayoutAlign::Center); row.label("dB", ICON_NONE);