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

BKE_gpencil_curve.h « blenkernel « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5672185086fd633de133247fca4cbf24181d1635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * The Original Code is Copyright (C) 2008, Blender Foundation
 * This is a new part of Blender
 */

#pragma once

/** \file
 * \ingroup bke
 */

#ifdef __cplusplus
extern "C" {
#endif

struct Main;
struct Object;
struct Scene;
struct bGPDcurve;
struct bGPDlayer;
struct bGPDstroke;
struct bGPDcurve;
struct bGPDcurve_point;
struct bGPdata;
enum eGPStrokeGeoUpdateFlag;

void BKE_gpencil_convert_curve(struct Main *bmain,
                               struct Scene *scene,
                               struct Object *ob_gp,
                               struct Object *ob_cu,
                               const bool use_collections,
                               const float scale_thickness,
                               const float sample);

struct bGPDcurve *BKE_gpencil_stroke_editcurve_generate(struct bGPDstroke *gps,
                                                        const float error_threshold,
                                                        const float corner_angle);
struct bGPDcurve *BKE_gpencil_stroke_editcurve_tagged_segments_update(struct bGPDstroke *gps,
                                                                      const float error_threshold,
                                                                      const float corner_angle);
void BKE_gpencil_stroke_editcurve_regenerate_single(struct bGPDstroke *gps,
                                                    uint32_t start_idx,
                                                    uint32_t end_idx,
                                                    const float error_threshold);
void BKE_gpencil_stroke_refit_curve(struct bGPDstroke *gps,
                                    const float threshold,
                                    const float corner_angle,
                                    const enum eGPStrokeGeoUpdateFlag flag);
void BKE_gpencil_editcurve_stroke_sync_selection(struct bGPdata *gpd,
                                                 struct bGPDstroke *gps,
                                                 struct bGPDcurve *gpc);
void BKE_gpencil_stroke_editcurve_sync_selection(struct bGPdata *gpd,
                                                 struct bGPDstroke *gps,
                                                 struct bGPDcurve *gpc);
void BKE_gpencil_stroke_update_geometry_from_editcurve(struct bGPDstroke *gps,
                                                       const uint resolution,
                                                       const bool is_adaptive,
                                                       const enum eGPStrokeGeoUpdateFlag flag);
bool BKE_gpencil_editcurve_recalculate_handles(struct bGPDstroke *gps);
void BKE_gpencil_editcurve_subdivide(struct bGPDstroke *gps, const int cuts);
int BKE_gpencil_editcurve_dissolve(struct bGPDstroke *gps,
                                   const uint flag,
                                   const bool refit_segments,
                                   const float error_threshold);
void BKE_gpencil_editcurve_simplify_adaptive(struct bGPDstroke *gps, const float threshold);
void BKE_gpencil_editcurve_simplify_fixed(struct bGPDstroke *gps, const int count);
void BKE_gpencil_editcurve_smooth_ex(struct bGPDstroke *gps,
                                     const float factor,
                                     const uint step_size,
                                     const uint repeat,
                                     const bool only_selected,
                                     const bool affect_endpoints,
                                     const bool use_vertex_groups,
                                     const bool invert_weights,
                                     const int deform_group,
                                     const CurveMapping *curve_mapping,
                                     const bool do_positions,
                                     const bool do_pressure,
                                     const bool do_strength);
void BKE_gpencil_editcurve_smooth(struct bGPDstroke *gps,
                                  const float factor,
                                  const uint step_size,
                                  const uint repeat,
                                  const bool only_selected,
                                  const bool affect_endpoints,
                                  const bool do_positions,
                                  const bool do_pressure,
                                  const bool do_strength);
bool BKE_gpencil_editcurve_merge_distance(struct bGPDstroke *gps,
                                          const float threshold,
                                          const bool use_unselected,
                                          const bool refit_segments,
                                          const float error_threshold);
#ifdef __cplusplus
}
#endif