Blender V2.61 - r43446

ED_util.h

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