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:
authorHans Goudey <h.goudey@me.com>2022-05-09 18:33:30 +0300
committerHans Goudey <h.goudey@me.com>2022-05-09 18:33:41 +0300
commite0e95f789576fec43550ef8aae8ae94151f7967f (patch)
tree3b01c42c23582c29fe10d31b7f7db6ca9d18145e /source/blender/blenkernel/intern/curves.cc
parent9f8f35008ca907ea9a9511aff811452fb25fc560 (diff)
Refactor: Move resample curves code to the geometry module
This commit moves the code for the resample curves node to the geometry module, to allow reusing it in any editor. Split from D14870.
Diffstat (limited to 'source/blender/blenkernel/intern/curves.cc')
-rw-r--r--source/blender/blenkernel/intern/curves.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc
index 1df1492bac1..bcfd6206a78 100644
--- a/source/blender/blenkernel/intern/curves.cc
+++ b/source/blender/blenkernel/intern/curves.cc
@@ -379,4 +379,11 @@ Curves *curves_new_nomain_single(const int points_num, const CurveType type)
return curves;
}
+Curves *curves_new_nomain(CurvesGeometry curves)
+{
+ Curves *curves_id = static_cast<Curves *>(BKE_id_new_nomain(ID_CV, nullptr));
+ bke::CurvesGeometry::wrap(curves_id->geometry) = std::move(curves);
+ return curves_id;
+}
+
} // namespace blender::bke