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:
authorSergey Sharybin <sergey@blender.org>2022-03-29 12:25:13 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-29 18:21:02 +0300
commit9a0e1950eae744bde5f00d4799be5448bf14122b (patch)
treeb1104b20700cf150771fe875b2ef54d957658318 /source/blender/blenkernel/intern
parent1f6c2507f80ce4330fd9ddad8b4ea62086008012 (diff)
Cover DNA_gpencil_types.h with C++ structure methods
Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14487
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/gpencil_geom.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc
index a0b6ab2d654..6130d71e030 100644
--- a/source/blender/blenkernel/intern/gpencil_geom.cc
+++ b/source/blender/blenkernel/intern/gpencil_geom.cc
@@ -1302,7 +1302,7 @@ void BKE_gpencil_stroke_smooth(bGPDstroke *gps,
}
/* Make a copy of the point data to avoid directionality of the smooth operation. */
- bGPDstroke gps_old = *gps;
+ bGPDstroke gps_old = blender::dna::shallow_copy(*gps);
gps_old.points = (bGPDspoint *)MEM_dupallocN(gps->points);
/* Smooth stroke. */
@@ -1930,7 +1930,7 @@ void BKE_gpencil_dissolve_points(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps,
(gps->dvert != nullptr) ? dvert = gps->dvert : nullptr;
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
if ((pt->flag & tag) == 0) {
- *npt = *pt;
+ *npt = blender::dna::shallow_copy(*pt);
npt++;
if (gps->dvert != nullptr) {
@@ -3471,13 +3471,13 @@ void BKE_gpencil_stroke_join(bGPDstroke *gps_a,
/* don't visibly link the first and last points? */
if (leave_gaps) {
/* 1st: add one tail point to start invisible area */
- point = gps_a->points[gps_a->totpoints - 1];
+ point = blender::dna::shallow_copy(gps_a->points[gps_a->totpoints - 1]);
deltatime = point.time;
gpencil_stroke_copy_point(gps_a, nullptr, &point, delta, 0.0f, 0.0f, 0.0f);
/* 2nd: add one head point to finish invisible area */
- point = gps_b->points[0];
+ point = blender::dna::shallow_copy(gps_b->points[0]);
gpencil_stroke_copy_point(gps_a, nullptr, &point, delta, 0.0f, 0.0f, deltatime);
}