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;
42 void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid);
43 void transform_operatortypes(void);
45 /* ******************** Macros & Prototypes *********************** */
47 /* 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 void BIF_setSingleAxisConstraint(float vec[3], char *text);
100 void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
101 void BIF_setLocalAxisConstraint(char axis, char *text);
102 void BIF_setLocalLockConstraint(char axis, char *text);
104 int BIF_snappingSupported(struct Object *obedit);
106 struct TransformOrientation;
109 void BIF_clearTransformOrientation(struct bContext *C);
110 void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
111 void BIF_manageTransformOrientation(struct bContext *C, int confirm, int set);
112 int BIF_menuselectTransformOrientation(void);
113 void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
114 void BIF_selectTransformOrientationValue(struct bContext *C, int orientation);
116 void BIF_menuTransformOrientation(struct bContext *C, struct uiMenuItem *head, void *arg);
117 char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */
118 int BIF_countTransformOrientation(const struct bContext *C);
120 void BIF_getPropCenter(float *center);
122 void BIF_TransformSetUndo(char *str);
124 void BIF_selectOrientation(void);
126 /* view3d manipulators */
127 void initManipulator(int mode);
128 void ManipulatorTransform();
130 //int BIF_do_manipulator(struct ScrArea *sa);
131 //void BIF_draw_manipulator(struct ScrArea *sa);