4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
30 #ifndef BIF_TRANSFORM_H
31 #define BIF_TRANSFORM_H
33 /* ******************* Registration Function ********************** */
35 struct wmWindowManager;
41 void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
42 void transform_operatortypes(void);
44 /* ******************** Macros & Prototypes *********************** */
46 /* MODE AND NUMINPUT FLAGS */
65 TFM_CURVE_SHRINKFATTEN,
77 /* TRANSFORM CONTEXTS */
83 #define CTX_NO_MIRROR 16
84 #define CTX_AUTOCONFIRM 32
88 /* Standalone call to get the transformation center corresponding to the current situation
89 * returns 1 if successful, 0 otherwise (usually means there's no selection)
90 * (if 0 is returns, *vec is unmodified)
92 int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
99 struct TransInfo * BIF_GetTransInfo(void);
100 void BIF_setSingleAxisConstraint(float vec[3], char *text);
101 void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
102 void BIF_setLocalAxisConstraint(char axis, char *text);
103 void BIF_setLocalLockConstraint(char axis, char *text);
105 int BIF_snappingSupported(struct Object *obedit);
107 struct TransformOrientation;
109 void BIF_clearTransformOrientation(void);
110 void BIF_removeTransformOrientation(struct TransformOrientation *ts);
111 void BIF_manageTransformOrientation(int confirm, int set);
112 int BIF_menuselectTransformOrientation(void);
113 void BIF_selectTransformOrientation(struct TransformOrientation *ts);
114 void BIF_selectTransformOrientationFromIndex(int index);
116 char * BIF_menustringTransformOrientation(char *title); /* the returned value was allocated and needs to be freed after use */
117 int BIF_countTransformOrientation();
119 /* Drawing callbacks */
120 void BIF_drawConstraint(void);
121 void BIF_drawPropCircle(void);
122 void BIF_drawSnap(void);
124 void BIF_getPropCenter(float *center);
126 void BIF_TransformSetUndo(char *str);
128 void BIF_selectOrientation(void);
130 /* view3d manipulators */
131 void initManipulator(int mode);
132 void ManipulatorTransform();
134 //int BIF_do_manipulator(struct ScrArea *sa);
135 //void BIF_draw_manipulator(struct ScrArea *sa);