Blender V5.3
DNA_mask_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2012 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12#pragma once
13
14#include "DNA_ID.h"
15#include "DNA_curve_types.h"
16#include "DNA_listBase.h"
17
18#include "BLI_enum_flags.hh"
19
20namespace blender {
21
22#ifdef __cplusplus
23namespace bke {
25}
27#else
29#endif
30
31enum MaskParentType : int {
32 MASK_PARENT_POINT_TRACK = 0, /* parenting happens to point track */
33 MASK_PARENT_PLANE_TRACK = 1, /* parenting happens to plane track */
34};
35
36enum MaskSplineFlag : short {
41};
43
48
53
55 MASK_HIDE_VIEW = 1 << 0, /* Note: match #OB_HIDE_VIEWPORT value. */
56 MASK_HIDE_SELECT = 1 << 1, /* Note: match #OB_HIDE_SELECT value. */
57 MASK_HIDE_RENDER = 1 << 2, /* Note: match #OB_HIDE_RENDER value. */
58};
60
61/* #MaskSpaceInfo.draw_flag */
62enum MaskDrawFlag : char {
63 MASK_DRAWFLAG_SMOOTH_DEPRECATED = 1 << 0, /* Deprecated. */
66};
68
69/* #MaskSpaceInfo.draw_type. Note: match values of #eSpaceImage_UVDT. */
76
77/* #MaskSpaceInfo.overlay_mode */
82
94
95enum MaskLayerBlendFlag : char {
97};
99
100enum MaskLayerFlag : char {
103
104 /* no holes */
107 MASK_LAYERFLAG_FILL_OVERLAP = static_cast<char>(1 << 7),
108};
110
111/* masklay_shape->flag */
114};
116
117enum MaskAnimFlag : int {
119};
121
122
134
135struct MaskLayerShapeElem;
136
138 /* The Depsgraph::update_count when this ID was last updated. Covers any IDRecalcFlag. */
140};
141
142struct Mask {
143#ifdef __cplusplus
145 static constexpr ID_Type id_type = ID_MSK;
146#endif
147
149 struct AnimData *adt = nullptr;
151 ListBaseT<struct MaskLayer> masklayers = {nullptr, nullptr};
153 int masklay_act = 0;
155 int masklay_tot = 0;
156
158 int sfra = 0, efra = 0;
159
162 char _pad[4] = {};
163
165};
166
176 ID *id = nullptr;
181 char parent[64] = "";
186 char sub_parent[64] = "";
191 float parent_orig[2] = {};
192
194 float parent_corners_orig[4][2] = {};
195};
196
199 float u = 0, w = 0;
201 int flag = 0;
202};
203
207 char _pad[4] = {};
209 int tot_uw = 0;
214};
215
235
236/* one per frame */
238 struct MaskLayerShape *next = nullptr, *prev = nullptr;
239
240 float *data = nullptr; /* Internally a #MaskLayerShapeElem struct for each vertex. */
241 int tot_vert = 0;
242 int frame = 0;
244 char _pad[7] = {};
245
246#ifdef __cplusplus
247 const MaskLayerShapeElem *vertices() const
248 {
249 return reinterpret_cast<const MaskLayerShapeElem *>(this->data);
250 }
251 MaskLayerShapeElem *vertices()
252 {
253 return reinterpret_cast<MaskLayerShapeElem *>(this->data);
254 }
255#endif
256};
257
258struct MaskLayer {
259 struct MaskLayer *next = nullptr, *prev = nullptr;
260
262 char name[/*MAX_NAME*/ 64] = "";
263
265 ListBaseT<MaskSpline> splines = {nullptr, nullptr};
266 ListBaseT<MaskLayerShape> splines_shapes = {nullptr, nullptr};
267
269 struct MaskSpline *act_spline = nullptr;
276 struct MaskSplinePoint *act_point = nullptr;
277
278 /* blending options */
279 float alpha = 0;
282 char falloff = 0;
284 char _pad[6] = {};
285
289};
290
291} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
These structs are the foundation for all linked lists in the library system.
BMesh Iterators.
unsigned __int64 uint64_t
Definition BKE_text.h:91
@ MASK_OVERLAY_COMBINED
@ MASK_OVERLAY_ALPHACHANNEL
@ MASK_PARENT_POINT_TRACK
@ MASK_PARENT_PLANE_TRACK
@ MASK_BLEND_DIFFERENCE
@ MASK_BLEND_REPLACE
@ MASK_BLEND_MERGE_ADD
@ MASK_BLEND_LIGHTEN
@ MASK_BLEND_MERGE_SUBTRACT
@ MASK_BLEND_SUBTRACT
@ MASK_BLEND_DARKEN
@ MASK_SPLINE_CYCLIC
@ MASK_SPLINE_NOFILL
@ MASK_SPLINE_SELECT
@ MASK_SPLINE_NOINTERSECT
@ MASK_FILL_SOLVER_SWEEP_LINE
@ MASK_FILL_SOLVER_CDT
@ MASK_DRAWFLAG_SMOOTH_DEPRECATED
@ MASK_DRAWFLAG_SPLINE
@ MASK_DRAWFLAG_OVERLAY
@ MASK_BLENDFLAG_INVERT
@ MASK_LAYERFLAG_LOCKED
@ MASK_LAYERFLAG_FILL_DISCRETE
@ MASK_LAYERFLAG_FILL_OVERLAP
@ MASK_LAYERFLAG_SELECT
@ MASK_SPLINE_INTERP_EASE
@ MASK_SPLINE_INTERP_LINEAR
@ MASK_SPLINE_OFFSET_EVEN
@ MASK_SPLINE_OFFSET_SMOOTH
struct MaskLayerShape * prev
MaskLayerShapeFlag flag
struct MaskLayerShape * next
MaskLayerBlendFlag blend_flag
struct MaskSplinePoint * act_point
struct MaskSpline * act_spline
MaskLayerBlend blend
ListBaseT< MaskLayerShape > splines_shapes
MaskLayerVisibility visibility_flag
struct MaskLayer * prev
ListBaseT< MaskSpline > splines
struct MaskLayer * next
MaskLayerFillSolverType fill_solver
float parent_corners_orig[4][2]
MaskParentType type
MaskSplinePointUW * uw
MaskSplineInterp weight_interp
MaskSplinePoint * points
struct MaskSpline * prev
MaskSplineRuntime * runtime
struct MaskSpline * next
MaskSplineFlag flag
MaskSplineOffset offset_mode
MaskAnimFlag flag
Mask_Runtime runtime
struct AnimData * adt
ListBaseT< struct MaskLayer > masklayers