Blender V2.61 - r43446

ED_uvedit.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  * Contributor(s): Blender Foundation
00022  *
00023  * ***** END GPL LICENSE BLOCK *****
00024  */
00025 
00030 #ifndef ED_UVEDIT_H
00031 #define ED_UVEDIT_H
00032 
00033 struct ARegionType;
00034 struct EditFace;
00035 struct Image;
00036 struct Main;
00037 struct ImageUser;
00038 struct MTFace;
00039 struct Object;
00040 struct Scene;
00041 struct SpaceImage;
00042 struct bContext;
00043 struct bNode;
00044 struct wmKeyConfig;
00045 
00046 /* uvedit_ops.c */
00047 void ED_operatortypes_uvedit(void);
00048 void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
00049 
00050 void ED_uvedit_assign_image(struct Main *bmain, struct Scene *scene, struct Object *obedit, struct Image *ima, struct Image *previma);
00051 int ED_uvedit_minmax(struct Scene *scene, struct Image *ima, struct Object *obedit, float *min, float *max);
00052 
00053 int ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **ima, struct ImageUser **iuser, struct bNode **node);
00054 void ED_object_assign_active_image(struct Main *bmain, struct Object *ob, int mat_nr, struct Image *ima);
00055 
00056 int ED_uvedit_test_silent(struct Object *obedit);
00057 int ED_uvedit_test(struct Object *obedit);
00058 
00059 /* visibility and selection */
00060 int uvedit_edge_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00061 int uvedit_face_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
00062 int uvedit_face_visible_nolocal(struct Scene *scene, struct EditFace *efa);
00063 int uvedit_face_visible(struct Scene *scene, struct Image *ima, struct EditFace *efa, struct MTFace *tf);
00064 int uvedit_uv_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00065 void uvedit_edge_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00066 void uvedit_edge_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00067 void uvedit_face_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
00068 void uvedit_face_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
00069 void uvedit_uv_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00070 void uvedit_uv_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
00071 
00072 
00073 int ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima, float co[2], float uv[2]);
00074 
00075 /* uvedit_unwrap_ops.c */
00076 void ED_uvedit_live_unwrap_begin(struct Scene *scene, struct Object *obedit);
00077 void ED_uvedit_live_unwrap_re_solve(void);
00078 void ED_uvedit_live_unwrap_end(short cancel);
00079 
00080 /* single call up unwrap using scene settings, used for edge tag unwrapping */
00081 void ED_unwrap_lscm(struct Scene *scene, struct Object *obedit, const short sel);
00082 
00083 /* uvedit_draw.c */
00084 void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit);
00085 
00086 /* uvedit_buttons.c */
00087 void ED_uvedit_buttons_register(struct ARegionType *art);
00088 
00089 #endif /* ED_UVEDIT_H */
00090