Blender  V3.3
transform_data.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
8 #pragma once
9 
10 struct Object;
11 struct bConstraint;
12 
13 #define TRANSDATABASIC \
14  \
16  void *extra; \
17  \
18  float *loc; \
19  \
20  float iloc[3]; \
21  \
22  float center[3]; \
23  \
24  int flag
25 
26 typedef struct TransDataBasic {
29 
30 typedef struct TransDataMirror {
32  // int pad;
34  float *loc_src;
36 
37 typedef struct TransDataExtension {
39  float drot[3];
40 #if 0 /* TODO: not yet implemented */
41  /* Initial object drotAngle */
42  float drotAngle;
43  /* Initial object drotAxis */
44  float drotAxis[3];
45 #endif
47  float dquat[4];
49  float dscale[3];
51  float *rot;
53  float irot[3];
55  float *quat;
57  float iquat[4];
59  float *rotAngle;
61  float irotAngle;
63  float *rotAxis;
65  float irotAxis[4];
67  float *size;
69  float isize[3];
71  float obmat[4][4];
73  float axismtx_gimbal[3][3];
76  float l_smtx[3][3];
80  float r_mtx[3][3];
82  float r_smtx[3][3];
84  int rotOrder;
86  float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle;
88 
89 typedef struct TransData2D {
91  float loc[3];
93  float *loc2d;
94 
96  float *h1, *h2;
97  float ih1[2], ih2[2];
98 } TransData2D;
99 
108 
109 typedef struct TransData {
112  float dist;
114  float rdist;
116  float factor;
118  float *val;
120  float ival;
122  float mtx[3][3];
124  float smtx[3][3];
126  float axismtx[3][3];
127  struct Object *ob;
129  struct bConstraint *con;
135  short protectflag;
136 } TransData;
137 
138 #define TRANSDATA_THREAD_LIMIT 1024
139 
141 enum {
142  TD_SELECTED = 1 << 0,
143  TD_USEQUAT = 1 << 1,
144  TD_NOTCONNECTED = 1 << 2,
146  TD_SINGLESIZE = 1 << 3,
149  TD_NOCENTER = 1 << 5,
151  TD_NO_EXT = 1 << 6,
153  TD_SKIP = 1 << 7,
156  TD_BEZTRIPLE = 1 << 8,
158  TD_NO_LOC = 1 << 9,
160  TD_NOTIMESNAP = 1 << 10,
163  TD_INTVALUES = 1 << 11,
164 #define TD_MIRROR_AXIS_SHIFT 12
166  TD_MIRROR_X = 1 << 12,
167  TD_MIRROR_Y = 1 << 13,
168  TD_MIRROR_Z = 1 << 14,
169 #define TD_MIRROR_EDGE_AXIS_SHIFT 12
171  TD_MIRROR_EDGE_X = 1 << 12,
172  TD_MIRROR_EDGE_Y = 1 << 13,
173  TD_MIRROR_EDGE_Z = 1 << 14,
175  TD_MOVEHANDLE1 = 1 << 15,
176  TD_MOVEHANDLE2 = 1 << 16,
179  TD_PBONE_LOCAL_MTX_P = 1 << 17,
181  TD_PBONE_LOCAL_MTX_C = 1 << 18,
182 };
183 
184 /* Hard min/max for proportional size. */
185 #define T_PROP_SIZE_MIN 1e-6f
186 #define T_PROP_SIZE_MAX 1e12f
unsigned char uint8_t
Definition: stdint.h:78
float * loc2d
float ih2[2]
float ih1[2]
float loc[3]
float r_smtx[3][3]
float l_smtx[3][3]
float axismtx_gimbal[3][3]
TransDataCurveHandleFlags * hdata
float smtx[3][3]
short protectflag
struct bConstraint * con
float axismtx[3][3]
float mtx[3][3]
TransDataExtension * ext
float * val
struct Object * ob
@ 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_NOTCONNECTED
@ TD_MOVEHANDLE1
@ 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
struct TransData2D TransData2D
struct TransData TransData
struct TransDataCurveHandleFlags TransDataCurveHandleFlags
struct TransDataMirror TransDataMirror
struct TransDataBasic TransDataBasic
struct TransDataExtension TransDataExtension