Blender V4.3
transform_data.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11struct Object;
12struct bConstraint;
13
14#define TRANSDATABASIC \
15
16 \
17 void *extra; \
18 \
19 float *loc; \
20 \
21 float iloc[3]; \
22 \
23 float center[3]; \
24 \
25 float *val; \
26 \
27 float ival; \
28 \
29 int flag
33};
37 // int pad;
39 float *loc_src;
40};
42struct TransDataExtension {
44 float drot[3];
45#if 0 /* TODO: not yet implemented. */
46 /* Initial object `drotAngle`. */
47 float drotAngle;
48 /* Initial object `drotAxis`. */
49 float drotAxis[3];
50#endif
52 float dquat[4];
54 float dscale[3];
56 float *rot;
58 float irot[3];
60 float *quat;
62 float iquat[4];
64 float *rotAngle;
66 float irotAngle;
68 float *rotAxis;
70 float irotAxis[4];
72 float *size;
74 float isize[3];
76 float obmat[4][4];
78 float axismtx_gimbal[3][3];
81 float l_smtx[3][3];
87 float r_mtx[3][3];
89 float r_smtx[3][3];
91 int rotOrder;
93 float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle;
94};
96struct TransData2D {
98 float loc[3];
99 union {
101 float *loc2d;
102 int *loc2d_i;
103 };
105 float *h1, *h2;
106 float ih1[2], ih2[2];
107};
108
115 uint8_t *h1, *h2;
116};
118struct TransData {
121 float dist;
123 float rdist;
125 float factor;
127 float mtx[3][3];
129 float smtx[3][3];
131 float axismtx[3][3];
132 Object *ob;
140 short protectflag;
141};
143#define TRANSDATA_THREAD_LIMIT 1024
144
146enum {
147 TD_SELECTED = 1 << 0,
148 TD_USEQUAT = 1 << 1,
149 /* TD_NOTCONNECTED = 1 << 2, */
151 TD_SINGLESIZE = 1 << 3,
154 TD_NOCENTER = 1 << 5,
156 TD_NO_EXT = 1 << 6,
158 TD_SKIP = 1 << 7,
163 TD_BEZTRIPLE = 1 << 8,
165 TD_NO_LOC = 1 << 9,
167 TD_NOTIMESNAP = 1 << 10,
172 TD_INTVALUES = 1 << 11,
174 TD_MIRROR_X = 1 << 12,
175 TD_MIRROR_Y = 1 << 13,
176 TD_MIRROR_Z = 1 << 14,
177#define TD_MIRROR_EDGE_AXIS_SHIFT 12
181 TD_MIRROR_EDGE_Z = 1 << 14,
183 TD_MOVEHANDLE1 = 1 << 15,
184 TD_MOVEHANDLE2 = 1 << 16,
189 TD_PBONE_LOCAL_MTX_P = 1 << 17,
191 TD_PBONE_LOCAL_MTX_C = 1 << 18,
192 /* Grease pencil layer frames. */
193 TD_GREASE_PENCIL_FRAME = 1 << 19,
194};
195
196/* Hard min/max for proportional size. */
197#define T_PROP_SIZE_MIN 1e-6f
198#define T_PROP_SIZE_MAX 1e12f
unsigned char uint8_t
Definition stdint.h:78
float axismtx_gimbal[3][3]
TransDataCurveHandleFlags * hdata
float smtx[3][3]
float axismtx[3][3]
float mtx[3][3]
TransDataExtension * ext
bConstraint * con
@ TD_MIRROR_EDGE_Y
@ TD_USEQUAT
@ TD_MIRROR_Z
@ TD_INDIVIDUAL_SCALE
@ TD_SINGLESIZE
@ TD_MIRROR_EDGE_Z
@ TD_PBONE_LOCAL_MTX_P
@ TD_BEZTRIPLE
@ TD_PBONE_LOCAL_MTX_C
@ TD_MIRROR_X
@ TD_MOVEHANDLE1
@ TD_GREASE_PENCIL_FRAME
@ TD_INTVALUES
@ TD_MIRROR_Y
@ TD_MIRROR_EDGE_X
@ TD_NO_EXT
@ TD_SELECTED
@ TD_SKIP
@ TD_NO_LOC
@ TD_NOTIMESNAP
@ TD_NOCENTER
@ TD_MOVEHANDLE2