|
Blender
V2.59
|
00001 /* 00002 * $Id: ED_util.h 37185 2011-06-04 17:03:46Z ton $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2008 Blender Foundation. 00021 * All rights reserved. 00022 * 00023 * 00024 * Contributor(s): Blender Foundation 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 00033 #ifndef ED_UTIL_H 00034 #define ED_UTIL_H 00035 00036 struct Scene; 00037 struct Object; 00038 struct bContext; 00039 struct ARegion; 00040 struct uiBlock; 00041 struct wmOperator; 00042 struct wmOperatorType; 00043 struct EditMesh; 00044 struct Mesh; 00045 00046 /* ed_util.c */ 00047 00048 void ED_editors_init (struct bContext *C); 00049 void ED_editors_exit (struct bContext *C); 00050 00051 /* ************** Undo ************************ */ 00052 00053 /* undo.c */ 00054 void ED_undo_push (struct bContext *C, const char *str); 00055 void ED_undo_push_op (struct bContext *C, struct wmOperator *op); 00056 void ED_undo_pop_op (struct bContext *C, struct wmOperator *op); 00057 void ED_undo_pop (struct bContext *C); 00058 void ED_undo_redo (struct bContext *C); 00059 void ED_OT_undo (struct wmOperatorType *ot); 00060 void ED_OT_undo_push (struct wmOperatorType *ot); 00061 void ED_OT_redo (struct wmOperatorType *ot); 00062 void ED_OT_undo_history (struct wmOperatorType *ot); 00063 00064 int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); 00065 /* convenience since UI callbacks use this mostly*/ 00066 void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); 00067 void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); 00068 00069 int ED_undo_valid (const struct bContext *C, const char *undoname); 00070 00071 /* undo_editmode.c */ 00072 void undo_editmode_push(struct bContext *C, const char *name, 00073 void * (*getdata)(struct bContext *C), 00074 void (*freedata)(void *), 00075 void (*to_editmode)(void *, void *), 00076 void *(*from_editmode)(void *), 00077 int (*validate_undo)(void *, void *)); 00078 00079 00080 void undo_editmode_clear (void); 00081 00082 /* crazyspace.c */ 00083 float *crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit); 00084 void crazyspace_set_quats_editmesh(struct EditMesh *em, float *origcos, float *mappedcos, float *quats); 00085 void crazyspace_set_quats_mesh(struct Mesh *me, float *origcos, float *mappedcos, float *quats); 00086 int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); 00087 void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); 00088 00089 00090 /* ************** XXX OLD CRUFT WARNING ************* */ 00091 00092 void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); 00093 int GetButStringLength(const char *str); 00094 00095 /* where else to go ? */ 00096 void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf); 00097 00098 #endif /* ED_UTIL_H */ 00099