diff options
author | Jacques Lucke <jacques@blender.org> | 2022-04-21 15:51:37 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-04-21 15:51:37 +0300 |
commit | ed971a19fad4ce0c8b81dc4613336eff9322bd20 (patch) | |
tree | 90e906cee58497e700e53d920ea8970f2d58bc1b /source/blender/editors | |
parent | 2882cbe685e7eca2a79438998354035c5d665205 (diff) |
Curves: show sculpt tool settings in panels
Ref T97444.
Differential Revision: https://developer.blender.org/D14700
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_add.cc | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc index 5f262384945..0d399419ad8 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc @@ -96,6 +96,7 @@ struct AddOperationExecutor { CurvesSculpt *curves_sculpt_ = nullptr; Brush *brush_ = nullptr; + BrushCurvesSculptSettings *brush_settings_ = nullptr; float brush_radius_re_; float2 brush_pos_re_; @@ -162,17 +163,18 @@ struct AddOperationExecutor { curves_sculpt_ = scene_->toolsettings->curves_sculpt; brush_ = BKE_paint_brush(&curves_sculpt_->paint); + brush_settings_ = brush_->curves_sculpt_settings; brush_radius_re_ = BKE_brush_size_get(scene_, brush_); brush_pos_re_ = stroke_extension.mouse_position; use_front_face_ = brush_->flag & BRUSH_FRONTFACE; const eBrushFalloffShape falloff_shape = static_cast<eBrushFalloffShape>( brush_->falloff_shape); - add_amount_ = std::max(0, brush_->curves_sculpt_settings->add_amount); - interpolate_length_ = curves_sculpt_->flag & CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH; - interpolate_shape_ = curves_sculpt_->flag & CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE; + add_amount_ = std::max(0, brush_settings_->add_amount); + interpolate_length_ = brush_settings_->flag & BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH; + interpolate_shape_ = brush_settings_->flag & BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE; use_interpolation_ = interpolate_length_ || interpolate_shape_; - new_curve_length_ = curves_sculpt_->curve_length; + new_curve_length_ = brush_settings_->curve_length; tot_old_curves_ = curves_->curves_num(); tot_old_points_ = curves_->points_num(); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 6cb3d629e55..1d22c2f237b 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -1628,7 +1628,7 @@ void ED_view3d_buttons_region_layout_ex(const bContext *C, ARRAY_SET_ITEMS(contexts, ".greasepencil_vertex"); break; case CTX_MODE_SCULPT_CURVES: - ARRAY_SET_ITEMS(contexts, ".curves_sculpt"); + ARRAY_SET_ITEMS(contexts, ".paint_common", ".curves_sculpt"); break; default: break; |