Blender  V2.93
DNA_mask_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2012 Blender Foundation.
17  * All rights reserved.
18  */
19 
27 #pragma once
28 
29 #include "DNA_ID.h"
30 #include "DNA_curve_types.h"
31 #include "DNA_defs.h"
32 #include "DNA_listBase.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 typedef struct Mask {
39  ID id;
40  struct AnimData *adt;
47 
49  int sfra, efra;
50 
52  int flag;
53  char _pad[4];
54 } Mask;
55 
56 typedef struct MaskParent {
57  //* /* Parenting flags */ /* not used. */
58  // int flag;
60  int id_type;
62  int type;
67  ID *id;
72  char parent[64];
77  char sub_parent[64];
82  float parent_orig[2];
83 
85  float parent_corners_orig[4][2];
87 
88 typedef struct MaskSplinePointUW {
90  float u, w;
92  int flag;
94 
95 typedef struct MaskSplinePoint {
98  char _pad[4];
100  int tot_uw;
106 
107 typedef struct MaskSpline {
108  struct MaskSpline *next, *prev;
109 
111  short flag;
116 
123 
127 
128 /* one per frame */
129 typedef struct MaskLayerShape {
131 
133  float *data;
135  int tot_vert;
137  int frame;
139  char flag;
140  char _pad[7];
142 
143 /* cast to this for convenience, not saved */
144 #define MASK_OBJECT_SHAPE_ELEM_SIZE 8 /* 3x 2D points + weight + radius == 8 */
145 
146 #
147 #
148 typedef struct MaskLayerShapeElem {
151 
152 typedef struct MaskLayer {
153  struct MaskLayer *next, *prev;
154 
156  char name[64];
157 
161 
166 
167  /* blending options */
168  float alpha;
169  char blend;
171  char falloff;
172  char _pad[7];
173 
175  char flag;
179 
180 /* MaskParent->flag */
181 /* #define MASK_PARENT_ACTIVE (1 << 0) */ /* UNUSED */
182 
183 /* MaskParent->type */
184 enum {
185  MASK_PARENT_POINT_TRACK = 0, /* parenting happens to point track */
186  MASK_PARENT_PLANE_TRACK = 1, /* parenting happens to plane track */
187 };
188 
189 /* MaskSpline->flag */
190 /* reserve (1 << 0) for SELECT */
191 enum {
192  MASK_SPLINE_CYCLIC = (1 << 1),
193  MASK_SPLINE_NOFILL = (1 << 2),
195 };
196 
197 /* MaskSpline->weight_interp */
198 enum {
201 };
202 
203 /* MaskSpline->offset_mode */
204 enum {
207 };
208 
209 /* ob->restrictflag */
210 #define MASK_RESTRICT_VIEW (1 << 0)
211 #define MASK_RESTRICT_SELECT (1 << 1)
212 #define MASK_RESTRICT_RENDER (1 << 2)
213 
214 /* SpaceClip->mask_draw_flag */
215 #define MASK_DRAWFLAG_SMOOTH (1 << 0)
216 #define MASK_DRAWFLAG_OVERLAY (1 << 1)
217 
218 /* copy of eSpaceImage_UVDT */
219 /* SpaceClip->mask_draw_type */
220 enum {
225 };
226 
227 /* MaskSpaceInfo->overlay_mode */
228 typedef enum eMaskOverlayMode {
232 
233 /* masklay->blend */
234 enum {
244 };
245 
246 /* masklay->blend_flag */
247 enum {
249 };
250 
251 /* masklay->flag */
252 enum {
255 
256  /* no holes */
259 };
260 
261 /* masklay_shape->flag */
262 enum {
263  MASK_SHAPE_SELECT = (1 << 0),
264 };
265 
266 /* mask->flag */
267 enum {
268  MASK_ANIMF_EXPAND = (1 << 4),
269 };
270 
271 #ifdef __cplusplus
272 }
273 #endif
ID and Library types, which are fundamental for sdna.
These structs are the foundation for all linked lists in the library system.
@ MASK_LAYERFLAG_LOCKED
@ MASK_LAYERFLAG_FILL_OVERLAP
@ MASK_LAYERFLAG_FILL_DISCRETE
@ MASK_LAYERFLAG_SELECT
@ MASK_PARENT_PLANE_TRACK
@ MASK_PARENT_POINT_TRACK
@ MASK_DT_BLACK
@ MASK_DT_WHITE
@ MASK_DT_DASH
@ MASK_DT_OUTLINE
@ MASK_SHAPE_SELECT
struct MaskParent MaskParent
@ MASK_BLENDFLAG_INVERT
@ MASK_BLEND_ADD
@ MASK_BLEND_REPLACE
@ MASK_BLEND_DARKEN
@ MASK_BLEND_DIFFERENCE
@ MASK_BLEND_LIGHTEN
@ MASK_BLEND_MERGE_ADD
@ MASK_BLEND_SUBTRACT
@ MASK_BLEND_MUL
@ MASK_BLEND_MERGE_SUBTRACT
struct MaskLayer MaskLayer
#define MASK_OBJECT_SHAPE_ELEM_SIZE
@ MASK_ANIMF_EXPAND
eMaskOverlayMode
@ MASK_OVERLAY_COMBINED
@ MASK_OVERLAY_ALPHACHANNEL
@ MASK_SPLINE_OFFSET_SMOOTH
@ MASK_SPLINE_OFFSET_EVEN
struct MaskSplinePoint MaskSplinePoint
@ MASK_SPLINE_INTERP_EASE
@ MASK_SPLINE_INTERP_LINEAR
struct MaskSplinePointUW MaskSplinePointUW
struct Mask Mask
struct MaskSpline MaskSpline
struct MaskLayerShapeElem MaskLayerShapeElem
struct MaskLayerShape MaskLayerShape
@ MASK_SPLINE_CYCLIC
@ MASK_SPLINE_NOINTERSECT
@ MASK_SPLINE_NOFILL
Definition: DNA_ID.h:273
float value[MASK_OBJECT_SHAPE_ELEM_SIZE]
struct MaskLayerShape * prev
struct MaskLayerShape * next
struct MaskLayer * next
ListBase splines_shapes
ListBase splines
char _pad[7]
struct MaskLayer * prev
struct MaskSplinePoint * act_point
char name[64]
char restrictflag
struct MaskSpline * act_spline
char parent[64]
float parent_orig[2]
float parent_corners_orig[4][2]
char sub_parent[64]
MaskSplinePointUW * uw
MaskParent parent
MaskParent parent
struct MaskSpline * prev
MaskSplinePoint * points_deform
char weight_interp
struct MaskSpline * next
MaskSplinePoint * points
ListBase masklayers
int sfra
int masklay_tot
int flag
struct AnimData * adt
int efra
char _pad[4]
int masklay_act