Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-07-05 15:56:04 +0300
committerJacques Lucke <jacques@blender.org>2022-07-05 16:06:31 +0300
commitc46d4d9fad5e16daa9f50e30e6373d20b8386bbb (patch)
treef06b55f4f2d9ddc967562ddadd9e8ea788d69bc6 /source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
parent7f24d90f11a6d26b2737bf28df1c66d169e7e8c2 (diff)
Curves: move curves surface transforms to blenkernel
This utility struct is useful outside of sculpting code as well.
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_brush.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_brush.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
index 7d17db515fb..10564942ab9 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
@@ -258,7 +258,7 @@ std::optional<CurvesBrush3D> sample_curves_surface_3d_brush(
const Depsgraph &depsgraph,
const ARegion &region,
const View3D &v3d,
- const CurvesSculptTransforms &transforms,
+ const CurvesSurfaceTransforms &transforms,
const BVHTreeFromMesh &surface_bvh,
const float2 &brush_pos_re,
const float brush_radius_re)
@@ -380,18 +380,4 @@ CurvesSculptCommonContext::CurvesSculptCommonContext(const bContext &C)
this->rv3d = CTX_wm_region_view3d(&C);
}
-CurvesSculptTransforms::CurvesSculptTransforms(const Object &curves_ob, const Object *surface_ob)
-{
- this->curves_to_world = curves_ob.obmat;
- this->world_to_curves = this->curves_to_world.inverted();
-
- if (surface_ob != nullptr) {
- this->surface_to_world = surface_ob->obmat;
- this->world_to_surface = this->surface_to_world.inverted();
- this->surface_to_curves = this->world_to_curves * this->surface_to_world;
- this->curves_to_surface = this->world_to_surface * this->curves_to_world;
- this->surface_to_curves_normal = this->surface_to_curves.inverted().transposed();
- }
-}
-
} // namespace blender::ed::sculpt_paint