LEFT | RIGHT |
1 /* | 1 /* |
2 * $Id$ | |
3 * | |
4 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
5 * | 3 * |
6 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
10 * | 8 * |
11 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 11 matching lines...) Expand all Loading... |
25 * Contributor(s): none yet. | 23 * Contributor(s): none yet. |
26 * | 24 * |
27 * ***** END GPL LICENSE BLOCK ***** | 25 * ***** END GPL LICENSE BLOCK ***** |
28 */ | 26 */ |
29 | 27 |
30 /** \file blender/editors/transform/transform.h | 28 /** \file blender/editors/transform/transform.h |
31 * \ingroup edtransform | 29 * \ingroup edtransform |
32 */ | 30 */ |
33 | 31 |
34 | 32 |
35 #ifndef TRANSFORM_H | 33 #ifndef __TRANSFORM_H__ |
36 #define TRANSFORM_H | 34 #define __TRANSFORM_H__ |
37 | 35 |
38 #include "ED_transform.h" | 36 #include "ED_transform.h" |
39 #include "ED_numinput.h" | 37 #include "ED_numinput.h" |
| 38 #include "ED_view3d.h" |
40 | 39 |
41 #include "DNA_listBase.h" | 40 #include "DNA_listBase.h" |
42 | 41 |
43 #include "BLI_editVert.h" | 42 #include "BLI_smallhash.h" |
| 43 #include "BKE_editmesh.h" |
44 | 44 |
45 /* ************************** Types ***************************** */ | 45 /* ************************** Types ***************************** */ |
46 | 46 |
47 struct TransInfo; | 47 struct TransInfo; |
48 struct TransData; | 48 struct TransData; |
49 struct TransformOrientation; | 49 struct TransformOrientation; |
50 struct TransSnap; | 50 struct TransSnap; |
51 struct NumInput; | 51 struct NumInput; |
52 struct Object; | 52 struct Object; |
53 struct View3D; | 53 struct View3D; |
54 struct ScrArea; | 54 struct ScrArea; |
55 struct Scene; | 55 struct Scene; |
56 struct bPose; | |
57 struct bConstraint; | 56 struct bConstraint; |
58 struct BezTriple; | |
59 struct wmOperatorType; | |
60 struct wmOperator; | |
61 struct wmWindowManager; | |
62 struct wmKeyMap; | 57 struct wmKeyMap; |
63 struct wmKeyConfig; | 58 struct wmKeyConfig; |
64 struct bContext; | 59 struct bContext; |
65 struct wmEvent; | 60 struct wmEvent; |
66 struct wmTimer; | 61 struct wmTimer; |
67 struct ARegion; | 62 struct ARegion; |
68 struct ReportList; | 63 struct ReportList; |
69 | 64 |
70 /* | 65 /* transinfo->redraw */ |
71 » The ctrl value has different meaning: | 66 typedef enum { |
72 » » 0» » » : No value has been typed | 67 » TREDRAW_NOTHING = 0, |
73 | 68 » TREDRAW_HARD = 1, |
74 » » otherwise, |value| - 1 is where the cursor is located after the
period | 69 » TREDRAW_SOFT = 2, |
75 » » Positive» : number is positive | 70 } eRedrawFlag; |
76 » » Negative» : number is negative | |
77 */ | |
78 | 71 |
79 typedef struct TransSnapPoint { | 72 typedef struct TransSnapPoint { |
80 » struct TransSnapPoint *next,*prev; | 73 » struct TransSnapPoint *next, *prev; |
81 float co[3]; | 74 float co[3]; |
82 } TransSnapPoint; | 75 } TransSnapPoint; |
83 | 76 |
84 typedef struct TransSnap { | 77 typedef struct TransSnap { |
85 short mode; | 78 short mode; |
86 short target; | 79 short target; |
87 short modePoint; | 80 short modePoint; |
88 short modeSelect; | 81 short modeSelect; |
89 » short» align; | 82 » bool» align; |
90 char project; | 83 char project; |
91 char snap_self; | 84 char snap_self; |
92 short peel; | 85 short peel; |
93 short status; | 86 short status; |
94 float snapPoint[3]; /* snapping from this point */ | 87 float snapPoint[3]; /* snapping from this point */ |
95 float snapTarget[3]; /* to this point */ | 88 float snapTarget[3]; /* to this point */ |
96 float snapNormal[3]; | 89 float snapNormal[3]; |
97 float snapTangent[3]; | 90 float snapTangent[3]; |
| 91 char snapNodeBorder; |
98 ListBase points; | 92 ListBase points; |
| 93 TransSnapPoint *selectedPoint; |
99 float dist; // Distance from snapPoint to snapTarget | 94 float dist; // Distance from snapPoint to snapTarget |
100 double last; | 95 double last; |
101 void (*applySnap)(struct TransInfo *, float *); | 96 void (*applySnap)(struct TransInfo *, float *); |
102 void (*calcSnap)(struct TransInfo *, float *); | 97 void (*calcSnap)(struct TransInfo *, float *); |
103 void (*targetSnap)(struct TransInfo *); | 98 void (*targetSnap)(struct TransInfo *); |
104 float (*distance)(struct TransInfo *, float p1[3], float p2[3]); // Get
the transform distance between two points (used by Closest snap) | 99 float (*distance)(struct TransInfo *, float p1[3], float p2[3]); // Get
the transform distance between two points (used by Closest snap) |
105 } TransSnap; | 100 } TransSnap; |
106 | 101 |
107 typedef struct TransCon { | 102 typedef struct TransCon { |
108 short orientation; /**/ | 103 short orientation; /**/ |
109 char text[50]; /* Description of the Constraint for header_print
*/ | 104 char text[50]; /* Description of the Constraint for header_print
*/ |
110 float mtx[3][3]; /* Matrix of the Constraint space
*/ | 105 float mtx[3][3]; /* Matrix of the Constraint space
*/ |
111 float imtx[3][3]; /* Inverse Matrix of the Constraint space
*/ | 106 float imtx[3][3]; /* Inverse Matrix of the Constraint space
*/ |
112 float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with
some axis == 0) */ | 107 float pmtx[3][3]; /* Projection Constraint Matrix (same as imtx with
some axis == 0) */ |
113 float center[3]; /* transformation center to define where to draw th
e view widget | 108 float center[3]; /* transformation center to define where to draw th
e view widget |
114 » » » » » » » ALWAYS in global space.
Unlike the transformation center */ | 109 » * ALWAYS in global space. Unlike the transformatio
n center */ |
115 int imval[2]; /* initial mouse value for visual calculation
*/ | 110 int imval[2]; /* initial mouse value for visual calculation
*/ |
116 » » » » » » /* the one in TransInfo is not
garanty to stay the same (Rotates change it) */ | 111 » /* the one in TransInfo is not garanty to stay the
same (Rotates change it) */ |
117 int mode; /* Mode flags of the Constraint
*/ | 112 int mode; /* Mode flags of the Constraint
*/ |
118 » void (*drawExtra)(struct TransInfo *); | 113 » void (*drawExtra)(struct TransInfo *t); |
119 » » » » » » /* For constraints that needs t
o draw differently from the other | 114 » /* For constraints that needs to draw differently f
rom the other |
120 » » » » » » » uses this instead of the
generic draw function» » » » » » » */ | 115 » * uses this instead of the generic draw function
*/ |
121 » void (*applyVec)(struct TransInfo *, struct TransData *, float *, float
*, float *); | 116 » void (*applyVec)(struct TransInfo *t, struct TransData *td, const float
in[3], float out[3], float pvec[3]); |
122 » » » » » » /* Apply function pointer for l
inear vectorial transformation */ | 117 » /* Apply function pointer for linear vectorial tran
sformation */ |
123 » » » » » » /* The last three parameters ar
e pointers to the in/out/printable vectors */ | 118 » /* The last three parameters are pointers to the in
/out/printable vectors */ |
124 » void (*applySize)(struct TransInfo *, struct TransData *, float [3][3])
; | 119 » void (*applySize)(struct TransInfo *t, struct TransData *td, float smat
[3][3]); |
125 » » » » » » /* Apply function pointer for s
ize transformation */ | 120 » /* Apply function pointer for size transformation *
/ |
126 » void (*applyRot)(struct TransInfo *, struct TransData *, float [3], flo
at *); | 121 » void (*applyRot)(struct TransInfo *t, struct TransData *td, float vec[3
], float *angle); |
127 » » » » » » /* Apply function pointer for r
otation transformation */ | 122 » /* Apply function pointer for rotation transformati
on */ |
128 } TransCon; | 123 } TransCon; |
129 | 124 |
130 typedef struct TransDataExtension { | 125 typedef struct TransDataExtension { |
131 float drot[3]; /* Initial object drot */ | 126 float drot[3]; /* Initial object drot */ |
132 » // float drotAngle;» /* Initial object drotAngle, TODO: not yet i
mplimented */ | 127 » // float drotAngle;» /* Initial object drotAngle, TODO: not yet i
mplemented */ |
133 » // float drotAxis[3];» /* Initial object drotAxis, TODO: not yet impli
mented */ | 128 » // float drotAxis[3];» /* Initial object drotAxis, TODO: not yet imple
mented */ |
134 float dquat[4]; /* Initial object dquat */ | 129 float dquat[4]; /* Initial object dquat */ |
135 » float dsize[3];»» /* Initial object dsize */ | 130 » float dscale[3]; /* Initial object dscale */ |
136 float *rot; /* Rotation of the data to transform (Faculative)
*/ | 131 float *rot; /* Rotation of the data to transform (Faculative)
*/ |
137 float irot[3]; /* Initial rotation
*/ | 132 float irot[3]; /* Initial rotation
*/ |
138 float *quat; /* Rotation quaternion of the data to transform (Fa
culative) */ | 133 float *quat; /* Rotation quaternion of the data to transform (Fa
culative) */ |
139 float iquat[4]; /* Initial rotation quaternion
*/ | 134 float iquat[4]; /* Initial rotation quaternion
*/ |
140 » float *rotAngle;» /* Rotation angle of the data to transform (Fac
ulative) » » » » » » */ | 135 » float *rotAngle;» /* Rotation angle of the data to transform (Fac
ulative) */ |
141 » float irotAngle;» /* Initial rotation angle » » »
» » » » » » » » » */ | 136 » float irotAngle;» /* Initial rotation angle
*/ |
142 » float *rotAxis;»» /* Rotation axis of the data to transform (Facu
lative) » » » » » » */ | 137 » float *rotAxis;»» /* Rotation axis of the data to transform (Facu
lative) */ |
143 » float irotAxis[4];» /* Initial rotation axis » » »
» » » » » » » » » »
*/ | 138 » float irotAxis[4];» /* Initial rotation axis
*/ |
144 float *size; /* Size of the data to transform (Faculative)
*/ | 139 float *size; /* Size of the data to transform (Faculative)
*/ |
145 float isize[3]; /* Initial size
*/ | 140 float isize[3]; /* Initial size
*/ |
146 float obmat[4][4]; /* Object matrix */ | 141 float obmat[4][4]; /* Object matrix */ |
147 float l_smtx[3][3]; /* use instead of td->smtx, It is the same but with
out the 'bone->bone_mat', see TD_PBONE_LOCAL_MTX_C */ | 142 float l_smtx[3][3]; /* use instead of td->smtx, It is the same but with
out the 'bone->bone_mat', see TD_PBONE_LOCAL_MTX_C */ |
| 143 float r_mtx[3][3]; /* The rotscale matrix of pose bone, to allow using
snap-align in translation mode, |
| 144 * when td->mtx is the loc pose bone matrix (and he
nce can't be used to apply rotation in some cases, |
| 145 * namely when a bone is in "NoLocal" or "Hinge" mo
de)... */ |
| 146 float r_smtx[3][3]; /* Invers of previous one. */ |
148 int rotOrder; /* rotation mode, as defined in eRotationModes
(DNA_action_types.h) */ | 147 int rotOrder; /* rotation mode, as defined in eRotationModes
(DNA_action_types.h) */ |
| 148 float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle; /* Original ob
ject transformation used for rigid bodies */ |
149 } TransDataExtension; | 149 } TransDataExtension; |
150 | 150 |
151 typedef struct TransData2D { | 151 typedef struct TransData2D { |
152 float loc[3]; /* Location of data used to transform (x,y,0) */ | 152 float loc[3]; /* Location of data used to transform (x,y,0) */ |
153 float *loc2d; /* Pointer to real 2d location of data */ | 153 float *loc2d; /* Pointer to real 2d location of data */ |
154 | 154 |
155 float *h1, *h2; /* Pointer to handle locations, if handles aren't be
ing moved independently */ | 155 float *h1, *h2; /* Pointer to handle locations, if handles aren't be
ing moved independently */ |
156 float ih1[2], ih2[2]; | 156 float ih1[2], ih2[2]; |
157 } TransData2D; | 157 } TransData2D; |
158 | 158 |
159 /* we need to store 2 handles for each transdata incase the other handle wasnt s
elected */ | 159 /* we need to store 2 handles for each transdata in case the other handle wasnt
selected */ |
160 typedef struct TransDataCurveHandleFlags { | 160 typedef struct TransDataCurveHandleFlags { |
161 char ih1, ih2; | 161 char ih1, ih2; |
162 char *h1, *h2; | 162 char *h1, *h2; |
163 } TransDataCurveHandleFlags; | 163 } TransDataCurveHandleFlags; |
164 | 164 |
165 /* for sequencer transform */ | 165 /* for sequencer transform */ |
166 typedef struct TransDataSeq { | 166 typedef struct TransDataSeq { |
167 struct Sequence *seq; | 167 struct Sequence *seq; |
168 int flag; /* a copy of seq->flag that may be modified for
nested strips */ | 168 int flag; /* a copy of seq->flag that may be modified for
nested strips */ |
169 int start_offset; /* use this so we can have transform data at the strip
s start, but apply correctly to the start frame */ | 169 int start_offset; /* use this so we can have transform data at the strip
s start, but apply correctly to the start frame */ |
(...skipping 12 matching lines...) Expand all Loading... |
182 ········ | 182 ········ |
183 /* dummy values for transform to write in - must have 3 elements... */ | 183 /* dummy values for transform to write in - must have 3 elements... */ |
184 float h1[3]; /* start handle */ | 184 float h1[3]; /* start handle */ |
185 float h2[3]; /* end handle */ | 185 float h2[3]; /* end handle */ |
186 ········ | 186 ········ |
187 int trackIndex; /* index of track that strip is
currently in */ | 187 int trackIndex; /* index of track that strip is
currently in */ |
188 int handle; /* handle-index: 0 for d
ummy entry, -1 for start, 1 for end, 2 for both ends */ | 188 int handle; /* handle-index: 0 for d
ummy entry, -1 for start, 1 for end, 2 for both ends */ |
189 } TransDataNla; | 189 } TransDataNla; |
190 | 190 |
191 struct LinkNode; | 191 struct LinkNode; |
192 struct EditEdge; | |
193 struct EditVert; | |
194 struct GHash; | 192 struct GHash; |
195 typedef struct TransDataSlideUv { | 193 |
196 » float origuv[2]; | 194 typedef struct TransDataEdgeSlideVert { |
197 » float *uv_up, *uv_down; | 195 » struct BMVert *v_a, *v_b; |
198 » //float *fuv[4]; | 196 » struct BMVert *v; |
199 » struct LinkNode *fuv_list; | 197 » float v_co_orig[3]; |
200 } TransDataSlideUv; | 198 |
201 | 199 » float edge_len; |
202 typedef struct TransDataSlideVert { | 200 |
203 » struct EditEdge *up, *down; | 201 » /* add origvert.co to get the original locations */ |
204 » struct EditVert origvert; | 202 » float dir_a[3], dir_b[3]; |
205 } TransDataSlideVert; | 203 |
206 | 204 » int loop_nr; |
207 typedef struct SlideData { | 205 } TransDataEdgeSlideVert; |
208 » TransDataSlideUv *slideuv, *suv_last; | 206 |
209 » int totuv, uvlay_tot; | 207 typedef struct EdgeSlideData { |
210 » struct GHash *vhash, **uvhash; | 208 » TransDataEdgeSlideVert *sv; |
211 » struct EditVert *nearest; | 209 » int totsv; |
212 » struct LinkNode *edgelist, *vertlist; | 210 »······· |
213 » int start[2], end[2]; | 211 » struct GHash *origfaces; |
214 } SlideData; | 212 |
| 213 » int mval_start[2], mval_end[2]; |
| 214 » struct BMEditMesh *em; |
| 215 |
| 216 » /* flag that is set when origfaces is initialized */ |
| 217 » bool use_origfaces; |
| 218 » struct BMesh *bm_origfaces; |
| 219 |
| 220 » float perc; |
| 221 |
| 222 » bool is_proportional; |
| 223 » bool flipped_vtx; |
| 224 |
| 225 » int curr_sv_index; |
| 226 } EdgeSlideData; |
| 227 |
| 228 |
| 229 typedef struct TransDataVertSlideVert { |
| 230 » BMVert *v; |
| 231 » float co_orig_3d[3]; |
| 232 » float co_orig_2d[2]; |
| 233 » float (*co_link_orig_3d)[3]; |
| 234 » float (*co_link_orig_2d)[2]; |
| 235 » int co_link_tot; |
| 236 » int co_link_curr; |
| 237 } TransDataVertSlideVert; |
| 238 |
| 239 typedef struct VertSlideData { |
| 240 » TransDataVertSlideVert *sv; |
| 241 » int totsv; |
| 242 |
| 243 » struct BMEditMesh *em; |
| 244 |
| 245 » float perc; |
| 246 |
| 247 » bool is_proportional; |
| 248 » bool flipped_vtx; |
| 249 |
| 250 » int curr_sv_index; |
| 251 } VertSlideData; |
215 | 252 |
216 typedef struct TransData { | 253 typedef struct TransData { |
217 float dist; /* Distance needed to affect element (for Proportio
nnal Editing) */ | 254 float dist; /* Distance needed to affect element (for Proportio
nnal Editing) */ |
218 float rdist; /* Distance to the nearest element (for Proportionn
al Editing) */ | 255 float rdist; /* Distance to the nearest element (for Proportionn
al Editing) */ |
219 float factor; /* Factor of the transformation (for Proportionnal
Editing) */ | 256 float factor; /* Factor of the transformation (for Proportionnal
Editing) */ |
220 float *loc; /* Location of the data to transform
*/ | 257 float *loc; /* Location of the data to transform
*/ |
221 float iloc[3]; /* Initial location
*/ | 258 float iloc[3]; /* Initial location
*/ |
222 float *val; /* Value pointer for special transforms */ | 259 float *val; /* Value pointer for special transforms */ |
223 float ival; /* Old value*/ | 260 float ival; /* Old value*/ |
224 float center[3]; /* Individual data center
*/ | 261 float center[3]; /* Individual data center
*/ |
225 float mtx[3][3]; /* Transformation matrix from data space to global
space */ | 262 float mtx[3][3]; /* Transformation matrix from data space to global
space */ |
226 float smtx[3][3]; /* Transformation matrix from global space to data
space */ | 263 float smtx[3][3]; /* Transformation matrix from global space to data
space */ |
227 float axismtx[3][3];/* Axis orientation matrix of the data
*/ | 264 float axismtx[3][3];/* Axis orientation matrix of the data
*/ |
228 struct Object *ob; | 265 struct Object *ob; |
229 struct bConstraint *con; /* for objects/bones, the first constrai
nt in its constraint stack */ | 266 struct bConstraint *con; /* for objects/bones, the first constrai
nt in its constraint stack */ |
230 TransDataExtension *ext; /* for objects, poses. 1 single malloc p
er TransInfo! */ | 267 TransDataExtension *ext; /* for objects, poses. 1 single malloc p
er TransInfo! */ |
231 TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for
modification/cancel */ | 268 TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for
modification/cancel */ |
232 » void *extra;» » /* extra data (mirrored element pointer, in edi
tmode mesh to EditVert) (editbone for roll fixing) (...) */ | 269 » void *extra;» » /* extra data (mirrored element pointer, in edi
tmode mesh to BMVert) (editbone for roll fixing) (...) */ |
233 » int flag; /* Various flags */ | 270 » int flag; /* Various flags */ |
234 short protectflag; /* If set, copy of Object or PoseChannel protec
tion */ | 271 short protectflag; /* If set, copy of Object or PoseChannel protec
tion */ |
235 } TransData; | 272 } TransData; |
236 | 273 |
237 typedef struct MouseInput { | 274 typedef struct MouseInput { |
238 » void» (*apply)(struct TransInfo *, struct MouseInput *, const int [2],
float [3]); | 275 » void» (*apply)(struct TransInfo *t, struct MouseInput *mi, const int m
val[2], float output[3]); |
239 » void» (*post)(struct TransInfo *, float [3]); | 276 » void» (*post)(struct TransInfo *t, float values[3]); |
240 | 277 |
241 int imval[2]; /* initial mouse position
*/ | 278 int imval[2]; /* initial mouse position
*/ |
242 char precision; | 279 char precision; |
243 int precision_mval[2]; /* mouse position when precision key was
pressed */ | 280 int precision_mval[2]; /* mouse position when precision key was
pressed */ |
244 » int» » center[2]; | 281 » float» center[2]; |
245 float factor; | 282 float factor; |
246 void *data; /* additional data, if needed by the particular function
*/ | 283 void *data; /* additional data, if needed by the particular function
*/ |
247 } MouseInput; | 284 } MouseInput; |
248 | 285 |
249 typedef struct TransInfo { | 286 typedef struct TransInfo { |
250 int mode; /* current mode */ | 287 int mode; /* current mode */ |
251 int flag; /* generic flags for special behaviors
*/ | 288 int flag; /* generic flags for special behaviors
*/ |
252 int modifiers; /* special modifiers, by
function, not key */ | 289 int modifiers; /* special modifiers, by
function, not key */ |
253 short state; /* current state (running, cance
led,...)*/ | 290 short state; /* current state (running, cance
led,...)*/ |
254 int options; /* current context/options for transform
*/ | 291 int options; /* current context/options for transform
*/ |
255 float val; /* init value for some transformations (and
rotation angle) */ | 292 float val; /* init value for some transformations (and
rotation angle) */ |
256 float fac; /* factor for distance based transform */ | 293 float fac; /* factor for distance based transform */ |
257 » int (*transform)(struct TransInfo *, const int *); | 294 » void (*transform)(struct TransInfo *, const int[2]); |
258 /* transform fun
ction pointer */ | 295 /* transform fun
ction pointer */ |
259 » int (*handleEvent)(struct TransInfo *, struct wmEvent *); | 296 » eRedrawFlag (*handleEvent)(struct TransInfo *, const struct wmEvent *); |
260 /* event handler
function pointer RETURN 1 if redraw is needed */ | 297 /* event handler
function pointer RETURN 1 if redraw is needed */ |
261 int total; /* total number of transformed data */ | 298 int total; /* total number of transformed data */ |
262 TransData *data; /* transformed data (array) */ | 299 TransData *data; /* transformed data (array) */ |
263 TransDataExtension *ext; /* transformed data extension (array)
*/ | 300 TransDataExtension *ext; /* transformed data extension (array)
*/ |
264 TransData2D *data2d; /* transformed data for 2d (array)
*/ | 301 TransData2D *data2d; /* transformed data for 2d (array)
*/ |
265 TransCon con; /* transformed constraint */ | 302 TransCon con; /* transformed constraint */ |
266 TransSnap tsnap; | 303 TransSnap tsnap; |
267 NumInput num; /* numerical input */ | 304 NumInput num; /* numerical input */ |
268 MouseInput mouse; /* mouse input
*/ | 305 MouseInput mouse; /* mouse input
*/ |
269 » char redraw; /* redraw flag */ | 306 » eRedrawFlag redraw; /* redraw flag */ |
270 float prop_size; /* proportional circle radius
*/ | 307 float prop_size; /* proportional circle radius
*/ |
271 char proptext[20]; /* proportional falloff text
*/ | 308 char proptext[20]; /* proportional falloff text
*/ |
272 float center[3]; /* center of transformation */ | 309 float center[3]; /* center of transformation */ |
273 » int center2d[2]; /* center in screen coordinates */ | 310 » float center2d[2]; /* center in screen coordinates */ |
274 int imval[2]; /* initial mouse position */ | 311 int imval[2]; /* initial mouse position */ |
275 short event_type; /* event->type used to invoke tr
ansform */ | 312 short event_type; /* event->type used to invoke tr
ansform */ |
276 short idx_max; /* maximum index on the input vector
*/ | 313 short idx_max; /* maximum index on the input vector
*/ |
277 float snap[3]; /* Snapping Gears
*/ | 314 float snap[3]; /* Snapping Gears
*/ |
278 char frame_side; /* Mouse side of the cfra, 'L',
'R' or 'B' */ | 315 char frame_side; /* Mouse side of the cfra, 'L',
'R' or 'B' */ |
279 | 316 |
280 float viewmat[4][4]; /* copy from G.vd, prevents feedback,
*/ | 317 float viewmat[4][4]; /* copy from G.vd, prevents feedback,
*/ |
281 float viewinv[4][4]; /* and to make sure we don't have to
*/ | 318 float viewinv[4][4]; /* and to make sure we don't have to
*/ |
282 float persmat[4][4]; /* access G.vd from other space types
*/ | 319 float persmat[4][4]; /* access G.vd from other space types
*/ |
283 float persinv[4][4]; | 320 float persinv[4][4]; |
284 short persp; | 321 short persp; |
285 short around; | 322 short around; |
286 char spacetype; /* spacetype where transforming
is */ | 323 char spacetype; /* spacetype where transforming
is */ |
287 char helpline; /* helpline modes (not to be con
fused with hotline) */ | 324 char helpline; /* helpline modes (not to be con
fused with hotline) */ |
288 | 325 |
289 float vec[3]; /* translation, to show for widg
et */ | 326 float vec[3]; /* translation, to show for widg
et */ |
290 float mat[3][3]; /* rot/rescale, to show for widg
et */ | 327 float mat[3][3]; /* rot/rescale, to show for widg
et */ |
291 | 328 |
292 char *undostr; /* if set, uses this string for
undo */ | |
293 float spacemtx[3][3]; /* orientation matrix of the current spa
ce */ | 329 float spacemtx[3][3]; /* orientation matrix of the current spa
ce */ |
294 » char» » spacename[32];» /* name of the current space» »
» » */ | 330 » char» » spacename[64];» /* name of the current space, MAX_NAME»
» */ |
295 | 331 |
296 struct Object *poseobj; /* if t->flag & T_POSE, this denotes pos
e object */ | 332 struct Object *poseobj; /* if t->flag & T_POSE, this denotes pos
e object */ |
297 | 333 |
298 void *customData; /* Per Transform custom data */ | 334 void *customData; /* Per Transform custom data */ |
299 void (*customFree)(struct TransInfo *); /* if a special free functi
on is needed */ | 335 void (*customFree)(struct TransInfo *); /* if a special free functi
on is needed */ |
300 | 336 |
301 /*************** NEW STUFF *********************/ | 337 /*************** NEW STUFF *********************/ |
302 short launch_event; /* event type used to launch transform *
/ | 338 short launch_event; /* event type used to launch transform *
/ |
303 | 339 |
304 short current_orientation; | 340 short current_orientation; |
305 short twtype; /* backup from view3d, to restor
e on end */ | 341 short twtype; /* backup from view3d, to restor
e on end */ |
306 | 342 |
307 short prop_mode; | 343 short prop_mode; |
308 ········ | 344 ········ |
309 short mirror; | 345 short mirror; |
310 | 346 |
311 float values[4]; | 347 float values[4]; |
312 float auto_values[4]; | 348 float auto_values[4]; |
313 float axis[3]; | 349 float axis[3]; |
314 float axis_orig[3]; /* TransCon can change 'axis', store the
original value here */ | 350 float axis_orig[3]; /* TransCon can change 'axis', store the
original value here */ |
| 351 |
| 352 short remove_on_cancel; /* remove elements if operator is canc
eled */ |
315 | 353 |
316 void *view; | 354 void *view; |
317 struct bContext *context; /* Only valid (non null) during an operator ca
lled function. */ | 355 struct bContext *context; /* Only valid (non null) during an operator ca
lled function. */ |
318 struct ScrArea *sa; | 356 struct ScrArea *sa; |
319 struct ARegion *ar; | 357 struct ARegion *ar; |
320 struct Scene *scene; | 358 struct Scene *scene; |
321 struct ToolSettings *settings; | 359 struct ToolSettings *settings; |
322 struct wmTimer *animtimer; | 360 struct wmTimer *animtimer; |
| 361 struct wmKeyMap *keymap; /* so we can do lookups for header text */ |
| 362 struct ReportList *reports; /* assign from the operator, or can be NULL
*/ |
323 int mval[2]; /* current mouse position */ | 363 int mval[2]; /* current mouse position */ |
324 » struct Object *obedit; | 364 » float zfac; /* use for 3d view */ |
| 365 » struct Object *obedit; |
| 366 » float obedit_mat[3][3]; /* normalized editmode matrix (T_EDIT o
nly) */ |
325 void *draw_handle_apply; | 367 void *draw_handle_apply; |
326 void *draw_handle_view; | 368 void *draw_handle_view; |
327 void *draw_handle_pixel; | 369 void *draw_handle_pixel; |
328 void *draw_handle_cursor; | 370 void *draw_handle_cursor; |
329 } TransInfo; | 371 } TransInfo; |
330 | 372 |
331 | 373 |
332 /* ******************** Macros & Prototypes *********************** */ | 374 /* ******************** Macros & Prototypes *********************** */ |
333 | 375 |
334 /* transinfo->state */ | 376 /* transinfo->state */ |
335 #define TRANS_STARTING 0 | 377 #define TRANS_STARTING 0 |
336 #define TRANS_RUNNING 1 | 378 #define TRANS_RUNNING 1 |
337 #define TRANS_CONFIRM 2 | 379 #define TRANS_CONFIRM 2 |
338 #define TRANS_CANCEL 3 | 380 #define TRANS_CANCEL 3 |
339 | 381 |
340 /* transinfo->redraw */ | |
341 #define TREDRAW_NOTHING 0 | |
342 #define TREDRAW_HARD 1 | |
343 #define TREDRAW_SOFT 2 | |
344 | |
345 | |
346 /* transinfo->flag */ | |
347 #define T_OBJECT (1 << 0) | |
348 #define T_EDIT (1 << 1) | |
349 #define T_POSE (1 << 2) | |
350 #define T_TEXTURE (1 << 3) | |
351 #define T_CAMERA (1 << 4) | |
352 // trans on points, having no rotation/scale | |
353 #define T_POINTS (1 << 6) | |
354 // for manipulator exceptions, like scaling using center point,
drawing help lines | |
355 #define T_USES_MANIPULATOR (1 << 7) | |
356 | |
357 /* restrictions flags */ | |
358 #define T_ALL_RESTRICTIONS ((1 << 8)|(1 << 9)|(1 << 10)) | |
359 #define T_NO_CONSTRAINT (1 << 8) | |
360 #define T_NULL_ONE (1 << 9) | |
361 #define T_NO_ZERO (1 << 10) | |
362 | |
363 #define T_PROP_EDIT (1 << 11) | |
364 #define T_PROP_CONNECTED (1 << 12) | |
365 | |
366 #define T_V3D_ALIGN (1 << 14) | |
367 /* for 2d views like uv or ipo */ | |
368 #define T_2D_EDIT (1 << 15) | |
369 #define T_CLIP_UV (1 << 16) | |
370 | |
371 #define T_FREE_CUSTOMDATA (1 << 17) | |
372 /* auto-ik is on */ | |
373 #define T_AUTOIK (1 << 18) | |
374 | |
375 #define T_MIRROR (1 << 19) | |
376 | |
377 #define T_AUTOVALUES (1 << 20) | |
378 | |
379 /* to specificy if we save back settings at the end */ | |
380 #define T_MODAL (1 << 21) | |
381 | |
382 /* no retopo */ | |
383 #define T_NO_PROJECT (1 << 22) | |
384 | 382 |
385 #define T_RELEASE_CONFIRM (1 << 23) | 383 #define T_RELEASE_CONFIRM (1 << 23) |
386 | |
387 /* alternative transformation. used to add offset to tracking markers */ | |
388 #define T_ALT_TRANSFORM (1 << 24) | |
389 | 384 |
390 /* TransInfo->modifiers */ | 385 /* TransInfo->modifiers */ |
391 #define MOD_CONSTRAINT_SELECT 0x01 | 386 #define MOD_CONSTRAINT_SELECT 0x01 |
392 #define MOD_PRECISION 0x02 | 387 #define MOD_PRECISION 0x02 |
393 #define MOD_SNAP 0x04 | |
394 #define MOD_SNAP_INVERT 0x08 | |
395 #define MOD_CONSTRAINT_PLANE 0x10 | |
396 | |
397 | |
398 /* *****************************************************************************
*** */ | |
399 | |
400 /* transinfo->helpline */ | |
401 #define HLP_NONE 0 | |
402 #define HLP_SPRING 1 | |
403 #define HLP_ANGLE 2 | |
404 #define HLP_HARROW 3 | |
405 #define HLP_VARROW 4 | |
406 #define HLP_TRACKBALL 5 | |
407 | |
408 /* transinfo->con->mode */ | |
409 #define CON_APPLY 1 | |
410 #define CON_AXIS0 2 | |
411 #define CON_AXIS1 4 | |
412 #define CON_AXIS2 8 | |
413 #define CON_SELECT 16 | |
414 #define CON_NOFLIP 32 /* does not reorient vector to face view
port when on */ | |
415 #define CON_USER 64 | |
416 | |
417 /* transdata->flag */ | |
418 #define TD_SELECTED 1 | |
419 #define TD_ACTIVE (1 << 1) | |
420 #define TD_NOACTION (1 << 2) | |
421 #define TD_USEQUAT (1 << 3) | |
422 #define TD_NOTCONNECTED (1 << 4) | |
423 #define TD_SINGLESIZE (1 << 5) /* used for scaling of MetaElem-
>rad */ | |
424 /*#define TD_TIMEONLY (1 << 8) */ /*UNUSED*/ | |
425 #define TD_NOCENTER (1 << 9) | |
426 #define TD_NO_EXT (1 << 10) /* ext abused for partic
le key timing */ | |
427 #define TD_SKIP (1 << 11) /* don't transform this
data */ | |
428 #define TD_BEZTRIPLE (1 << 12) /* if this is a bez triple, we n
eed to restore the handles, if this is set transdata->misc.hdata needs freeing *
/ | |
429 #define TD_NO_LOC (1 << 13) /* when this is set, don
't apply translation changes to this element */ | |
430 #define TD_NOTIMESNAP (1 << 14) /* for Graph Editor autosnap, in
dicates that point should not undergo autosnapping */ | |
431 #define TD_INTVALUES (1 << 15) /* for Graph Editor - curves tha
t can only have int-values need their keyframes tagged with this */ | |
432 #define TD_MIRROR_EDGE (1 << 16) /* For editmode mirror, clamp to
x = 0 */ | |
433 #define TD_MOVEHANDLE1 (1 << 17) /* For fcurve handles, move them
along with their keyframes */ | |
434 #define TD_MOVEHANDLE2 (1 << 18) | |
435 #define TD_PBONE_LOCAL_MTX_P (1 << 19) /* exceptional case with pose bone rotat
ing when a parent bone has 'Local Location' option enabled and rotating also tra
nsforms it. */ | |
436 #define TD_PBONE_LOCAL_MTX_C (1 << 20) /* same as above but for a child bone */ | |
437 | |
438 /* transsnap->status */ | |
439 #define SNAP_FORCED 1 | |
440 #define TARGET_INIT 2 | |
441 #define POINT_INIT 4 | |
442 #define MULTI_POINTS 8 | |
443 | |
444 void TRANSFORM_OT_transform(struct wmOperatorType *ot); | |
445 | |
446 int initTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op
, struct wmEvent *event, int mode); | |
447 void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *o
p); | |
448 int transformEvent(TransInfo *t, struct wmEvent *event); | |
449 void transformApply(struct bContext *C, TransInfo *t); | |
450 int transformEnd(struct bContext *C, TransInfo *t); | |
451 | |
452 void setTransformViewMatrices(TransInfo *t); | |
453 void convertViewVec(TransInfo *t, float *vec, int dx, int dy); | |
454 void projectIntView(TransInfo *t, float *vec, int *adr); | |
455 void projectFloatView(TransInfo *t, float *vec, float *adr); | |
456 | |
457 void applyAspectRatio(TransInfo *t, float *vec); | |
458 void removeAspectRatio(TransInfo *t, float *vec); | |
459 | |
460 void initWarp(TransInfo *t); | |
461 int handleEventWarp(TransInfo *t, struct wmEvent *event); | |
462 int Warp(TransInfo *t, const int mval[2]); | |
463 | |
464 void initShear(TransInfo *t); | |
465 int handleEventShear(TransInfo *t, struct wmEvent *event); | |
466 int Shear(TransInfo *t, const int mval[2]); | |
467 | |
468 void initResize(TransInfo *t); | |
469 int Resize(TransInfo *t, const int mval[2]); | |
470 | |
471 void initTranslation(TransInfo *t); | |
472 int Translation(TransInfo *t, const int mval[2]); | |
473 | |
474 void initToSphere(TransInfo *t); | |
475 int ToSphere(TransInfo *t, const int mval[2]); | |
476 | |
477 void initRotation(TransInfo *t); | |
478 int Rotation(TransInfo *t, const int mval[2]); | |
479 | |
480 void initShrinkFatten(TransInfo *t); | |
481 int ShrinkFatten(TransInfo *t, const int mval[2]); | |
482 | |
483 void initTilt(TransInfo *t); | |
484 int Tilt(TransInfo *t, const int mval[2]); | |
485 | |
486 void initCurveShrinkFatten(TransInfo *t); | |
487 int CurveShrinkFatten(TransInfo *t, const int mval[2]); | |
488 | |
489 void initTrackball(TransInfo *t); | |
490 int Trackball(TransInfo *t, const int mval[2]); | |
491 | |
492 void initPushPull(TransInfo *t); | |
493 int PushPull(TransInfo *t, const int mval[2]); | |
494 | |
495 void initBevel(TransInfo *t); | |
496 int handleEventBevel(TransInfo *t, struct wmEvent *event); | |
497 int Bevel(TransInfo *t, const int mval[2]); | |
498 | |
499 void initBevelWeight(TransInfo *t); | |
500 int BevelWeight(TransInfo *t, const int mval[2]); | |
501 | |
502 void initCrease(TransInfo *t); | |
503 int Crease(TransInfo *t, const int mval[2]); | |
504 | |
505 void initBoneSize(TransInfo *t); | |
506 int BoneSize(TransInfo *t, const int mval[2]); | |
507 | |
508 void initBoneEnvelope(TransInfo *t); | |
509 int BoneEnvelope(TransInfo *t, const int mval[2]); | |
510 | |
511 void initBoneRoll(TransInfo *t); | |
512 int BoneRoll(TransInfo *t, const int mval[2]); | |
513 | |
514 void initEdgeSlide(TransInfo *t); | |
515 int EdgeSlide(TransInfo *t, const int mval[2]); | |
516 | |
517 void initTimeTranslate(TransInfo *t); | |
518 int TimeTranslate(TransInfo *t, const int mval[2]); | |
519 | |
520 void initTimeSlide(TransInfo *t); | |
521 int TimeSlide(TransInfo *t, const int mval[2]); | |
522 | |
523 void initTimeScale(TransInfo *t); | |
524 int TimeScale(TransInfo *t, const int mval[2]); | |
525 | |
526 void initBakeTime(TransInfo *t); | |
527 int BakeTime(TransInfo *t, const int mval[2]); | |
528 | |
529 void initMirror(TransInfo *t); | |
530 int Mirror(TransInfo *t, const int mval[2]); | |
531 | |
532 void initAlign(TransInfo *t); | |
533 int Align(TransInfo *t, const int mval[2]); | |
534 | |
535 void initSeqSlide(TransInfo *t); | |
536 int SeqSlide(TransInfo *t, const int mval[2]); | |
537 | |
538 void drawPropCircle(const struct bContext *C, TransInfo *t); | |
539 | |
540 struct wmKeyMap *transform_modal_keymap(struct wmKeyConfig *keyconf); | |
541 | |
542 | |
543 /*********************** transform_conversions.c ********** */ | |
544 struct ListBase; | |
545 | |
546 void flushTransGPactionData(TransInfo *t); | |
547 void flushTransGraphData(TransInfo *t); | |
548 void remake_graph_transdata(TransInfo *t, struct ListBase *anim_data); | |
549 void flushTransUVs(TransInfo *t); | |
550 void flushTransParticles(TransInfo *t); | |
551 int clipUVTransform(TransInfo *t, float *vec, int resize); | |
552 void flushTransNodes(TransInfo *t); | |
553 void flushTransSeq(TransInfo *t); | |
554 void flushTransTracking(TransInfo *t); | |
555 | |
556 /*********************** exported from transform_manipulator.c ********** */ | |
557 int gimbal_axis(struct Object *ob, float gmat[][3]); /* return 0 when no gimbal
for selection */ | |
558 int calc_manipulator_stats(const struct bContext *C); | |
559 | |
560 /*********************** TransData Creation and General Handling *********** */ | |
561 void createTransData(struct bContext *C, TransInfo *t); | |
562 void sort_trans_data_dist(TransInfo *t); | |
563 void add_tdi_poin(float *poin, float *old, float delta); | |
564 void special_aftertrans_update(struct bContext *C, TransInfo *t); | |
565 | |
566 void transform_autoik_update(TransInfo *t, short mode); | |
567 | |
568 int count_set_pose_transflags(int *out_mode, short around, struct Object *ob); | |
569 | |
570 /* auto-keying stuff used by special_aftertrans_update */ | |
571 void autokeyframe_ob_cb_func(struct bContext *C, struct Scene *scene, struct Vie
w3D *v3d, struct Object *ob, int tmode); | |
572 void autokeyframe_pose_cb_func(struct bContext *C, struct Scene *scene, struct V
iew3D *v3d, struct Object *ob, int tmode, short targetless_ik); | |
573 | |
574 /*********************** Constraints *****************************/ | |
575 | |
576 void drawConstraint(TransInfo *t); | |
577 | |
578 void getConstraintMatrix(TransInfo *t); | |
579 void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[])
; | |
580 void setLocalConstraint(TransInfo *t, int mode, const char text[]); | |
581 void setUserConstraint(TransInfo *t, short orientation, int mode, const char tex
t[]); | |
582 | |
583 void constraintNumInput(TransInfo *t, float vec[3]); | |
584 | |
585 int isLockConstraint(TransInfo *t); | |
586 int getConstraintSpaceDimension(TransInfo *t); | |
587 char constraintModeToChar(TransInfo *t); | |
588 | |
589 void startConstraint(TransInfo *t); | |
590 void stopConstraint(TransInfo *t); | |
591 | |
592 void initSelectConstraint(TransInfo *t, float mtx[3][3]); | |
593 void selectConstraint(TransInfo *t); | |
594 void postSelectConstraint(TransInfo *t); | |
595 | |
596 void setNearestAxis(TransInfo *t); | |
597 | |
598 /*********************** Snapping ********************************/ | |
599 | |
600 typedef enum { | |
601 NO_GEARS = 0, | |
602 BIG_GEARS = 1, | |
603 SMALL_GEARS = 2 | |
604 } GearsType; | |
605 | |
606 void snapGrid(TransInfo *t, float *val); | |
607 void snapGridAction(TransInfo *t, float *val, GearsType action); | |
608 | |
609 int activeSnap(TransInfo *t); | |
610 int validSnap(TransInfo *t); | |
611 | |
612 void initSnapping(struct TransInfo *t, struct wmOperator *op); | |
613 void applyProject(TransInfo *t); | |
614 void applySnapping(TransInfo *t, float *vec); | |
615 void resetSnapping(TransInfo *t); | |
616 int handleSnapping(TransInfo *t, struct wmEvent *event); | |
617 void drawSnapping(const struct bContext *C, TransInfo *t); | |
618 int usingSnappingNormal(TransInfo *t); | |
619 int validSnappingNormal(TransInfo *t); | |
620 | |
621 void getSnapPoint(TransInfo *t, float vec[3]); | |
622 void addSnapPoint(TransInfo *t); | |
623 void removeSnapPoint(TransInfo *t); | |
624 | |
625 /********************** Mouse Input ******************************/ | |
626 | |
627 typedef enum { | |
628 INPUT_NONE, | |
629 INPUT_VECTOR, | |
630 INPUT_SPRING, | |
631 INPUT_SPRING_FLIP, | |
632 INPUT_ANGLE, | |
633 INPUT_TRACKBALL, | |
634 INPUT_HORIZONTAL_RATIO, | |
635 INPUT_HORIZONTAL_ABSOLUTE, | |
636 INPUT_VERTICAL_RATIO, | |
637 INPUT_VERTICAL_ABSOLUTE, | |
638 INPUT_CUSTOM_RATIO | |
639 } MouseInputMode; | |
640 | |
641 void initMouseInput(TransInfo *t, MouseInput *mi, int center[2], int mval[2]); | |
642 void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode); | |
643 int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, struct wmEvent
*event); | |
644 void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, const int mval[
2], float output[3]); | |
645 | |
646 void setCustomPoints(TransInfo *t, MouseInput *mi, int start[2], int end[2]); | |
647 void setInputPostFct(MouseInput *mi, void (*post)(struct TransInfo *, floa
t [3])); | |
648 | |
649 /*********************** Generics ********************************/ | |
650 | |
651 int initTransInfo(struct bContext *C, TransInfo *t, struct wmOperator *op, struc
t wmEvent *event); | |
652 void postTrans (struct bContext *C, TransInfo *t); | |
653 void resetTransRestrictions(TransInfo *t); | |
654 | |
655 void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
; | |
656 | |
657 TransDataCurveHandleFlags *initTransDataCurveHandes(TransData *td, struct BezTri
ple *bezt); | |
658 | |
659 /* DRAWLINE options flags */ | |
660 #define DRAWLIGHT 1 | |
661 | |
662 void applyTransObjects(TransInfo *t); | |
663 void restoreTransObjects(TransInfo *t); | |
664 void restoreTransNodes(TransInfo *t); | |
665 void recalcData(TransInfo *t); | |
666 | |
667 void calculateCenter(TransInfo *t); | |
668 void calculateCenter2D(TransInfo *t); | |
669 void calculateCenterBound(TransInfo *t); | |
670 void calculateCenterMedian(TransInfo *t); | |
671 void calculateCenterCursor(TransInfo *t); | |
672 | |
673 void calculateCenterCursor2D(TransInfo *t); | |
674 void calculatePropRatio(TransInfo *t); | |
675 | |
676 void getViewVector(TransInfo *t, float coord[3], float vec[3]); | |
677 | |
678 /*********************** Transform Orientations ******************************/ | |
679 | |
680 void initTransformOrientation(struct bContext *C, TransInfo *t); | |
681 | |
682 struct TransformOrientation *createObjectSpace(struct bContext *C, struct Report
List *reports, char *name, int overwrite); | |
683 struct TransformOrientation *createMeshSpace(struct bContext *C, struct ReportLi
st *reports, char *name, int overwrite); | |
684 struct TransformOrientation *createBoneSpace(struct bContext *C, struct ReportLi
st *reports, char *name, int overwrite); | |
685 | |
686 /* Those two fill in mat and return non-zero on success */ | |
687 int createSpaceNormal(float mat[3][3], float normal[3]); | |
688 int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3])
; | |
689 | |
690 struct TransformOrientation *addMatrixSpace(struct bContext *C, float mat[3][3],
char name[], int overwrite); | |
691 int addObjectSpace(struct bContext *C, struct Object *ob); | |
692 void applyTransformOrientation(const struct bContext *C, float mat[3][3], char *
name); | |
693 | |
694 #define ORIENTATION_NONE 0 | |
695 #define ORIENTATION_NORMAL 1 | |
696 #define ORIENTATION_VERT 2 | |
697 #define ORIENTATION_EDGE 3 | |
698 #define ORIENTATION_FACE 4 | |
699 | |
700 int getTransformOrientation(const struct bContext *C, float normal[3], float pla
ne[3], int activeOnly); | |
701 | |
702 void freeSlideVerts(TransInfo *t); | |
703 | |
704 #endif | |
LEFT | RIGHT |