diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2022-07-26 00:43:48 +0300 |
commit | f081e76037432cb926be45e980eac201d337032c (patch) | |
tree | dd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/editors/sculpt_paint/curves_sculpt_intern.hh | |
parent | fa2084ae58a77b1201289b6bedac427f73c762d1 (diff) | |
parent | 462f99bf38648a08226b1fba423315aec2bc577b (diff) |
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_intern.hh')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_intern.hh | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh index ad3871bee45..7d40ed80a65 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh @@ -12,8 +12,11 @@ #include "BLI_virtual_array.hh" #include "BKE_attribute.h" +#include "BKE_crazyspace.hh" #include "BKE_curves.hh" +#include "ED_curves_sculpt.h" + struct ARegion; struct RegionView3D; struct Depsgraph; @@ -22,15 +25,18 @@ struct Object; struct Brush; struct Scene; struct BVHTreeFromMesh; +struct ReportList; namespace blender::ed::sculpt_paint { using bke::CurvesGeometry; +using bke::CurvesSurfaceTransforms; struct StrokeExtension { bool is_first; float2 mouse_position; float pressure; + ReportList *reports = nullptr; }; float brush_radius_factor(const Brush &brush, const StrokeExtension &stroke_extension); @@ -52,8 +58,7 @@ class CurvesSculptStrokeOperation { virtual void on_stroke_extended(const bContext &C, const StrokeExtension &stroke_extension) = 0; }; -std::unique_ptr<CurvesSculptStrokeOperation> new_add_operation(const bContext &C, - ReportList *reports); +std::unique_ptr<CurvesSculptStrokeOperation> new_add_operation(); std::unique_ptr<CurvesSculptStrokeOperation> new_comb_operation(); std::unique_ptr<CurvesSculptStrokeOperation> new_delete_operation(); std::unique_ptr<CurvesSculptStrokeOperation> new_snake_hook_operation(); @@ -66,7 +71,7 @@ std::unique_ptr<CurvesSculptStrokeOperation> new_pinch_operation(const BrushStro std::unique_ptr<CurvesSculptStrokeOperation> new_smooth_operation(); std::unique_ptr<CurvesSculptStrokeOperation> new_puff_operation(); std::unique_ptr<CurvesSculptStrokeOperation> new_density_operation( - const BrushStrokeMode brush_mode, const bContext &C); + const BrushStrokeMode brush_mode, const bContext &C, const StrokeExtension &stroke_start); std::unique_ptr<CurvesSculptStrokeOperation> new_slide_operation(); struct CurvesBrush3D { @@ -97,12 +102,6 @@ VArray<float> get_curves_selection(const Curves &curves_id); */ VArray<float> get_point_selection(const Curves &curves_id); -/** - * Find curves that have any point selected (a selection factor greater than zero), - * or curves that have their own selection factor greater than zero. - */ -IndexMask retrieve_selected_curves(const Curves &curves_id, Vector<int64_t> &r_indices); - void move_last_point_and_resample(MutableSpan<float3> positions, const float3 &new_last_position); class CurvesSculptCommonContext { @@ -111,29 +110,16 @@ class CurvesSculptCommonContext { const Scene *scene = nullptr; ARegion *region = nullptr; const View3D *v3d = nullptr; - const RegionView3D *rv3d = nullptr; + RegionView3D *rv3d = nullptr; CurvesSculptCommonContext(const bContext &C); }; -struct CurvesSculptTransforms { - float4x4 curves_to_world; - float4x4 curves_to_surface; - float4x4 world_to_curves; - float4x4 world_to_surface; - float4x4 surface_to_world; - float4x4 surface_to_curves; - float4x4 surface_to_curves_normal; - - CurvesSculptTransforms() = default; - CurvesSculptTransforms(const Object &curves_ob, const Object *surface_ob); -}; - std::optional<CurvesBrush3D> sample_curves_surface_3d_brush( const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, - const CurvesSculptTransforms &transforms, + const CurvesSurfaceTransforms &transforms, const BVHTreeFromMesh &surface_bvh, const float2 &brush_pos_re, const float brush_radius_re); @@ -142,4 +128,9 @@ float transform_brush_radius(const float4x4 &transform, const float3 &brush_position, const float old_radius); +void report_missing_surface(ReportList *reports); +void report_missing_uv_map_on_original_surface(ReportList *reports); +void report_missing_uv_map_on_evaluated_surface(ReportList *reports); +void report_invalid_uv_map(ReportList *reports); + } // namespace blender::ed::sculpt_paint |