2 * blenlib/DNA_image_types.h (mar-2001 nzc)
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
31 #ifndef DNA_IMAGE_TYPES_H
32 #define DNA_IMAGE_TYPES_H
44 /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
45 /* should be used in conjunction with an ID * to Image. */
46 typedef struct ImageUser {
47 int framenr; /* movies, sequences: current to display */
48 int frames; /* total amount of frames to use */
49 int offset, sfra; /* offset within movie, start frame in global time */
50 short fie_ima, cycl; /* fields/image in movie, cyclic flag */
53 short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
54 /* short menunr; */ /* localized menu entry, for handling browse event */
57 struct Scene *scene; /* to retrieve render result */
61 #define IMA_ANIM_ALWAYS 1
62 #define IMA_ANIM_REFRESHED 2
63 /* #define IMA_DO_PREMUL 4 */
65 typedef struct Image {
68 char name[240]; /* file path */
70 ListBase ibufs; /* not written in file */
71 struct GPUTexture *gputexture; /* not written in file */
75 struct RenderResult *rr;
77 struct RenderResult *renders[8]; /* IMA_MAX_RENDER_SLOT */
78 short render_slot, last_render_slot;
85 short tpageflag, totbind;
88 unsigned int bindcode; /* only for current image... */
89 unsigned int *repbind; /* for repeat of parts of images */
91 struct PackedFile * packedfile;
92 struct PreviewImage * preview;
94 /* game engine tile animation */
99 /* for generated images */
100 short gen_x, gen_y, gen_type;
102 /* display aspect - for UV editing images resized for faster openGL display */
107 /* **************** IMAGE ********************* */
111 #define IMA_STD_FIELD 2
112 #define IMA_DO_PREMUL 4
114 #define IMA_REFLECT 16
115 #define IMA_NOCOLLECT 32
116 #define IMA_DEPRECATED 64
117 #define IMA_OLD_PREMUL 128
119 /* Image.tpageflag */
121 #define IMA_TWINANIM 2
122 #define IMA_COLCYCLE 4 /* Depreciated */
123 #define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */
124 #define IMA_CLAMP_U 16
125 #define IMA_CLAMP_V 32
126 #define IMA_TPAGE_REFRESH 64
128 /* ima->type and ima->source moved to BKE_image.h, for API */
131 #define IMA_MAX_RENDER_TEXT 512
132 #define IMA_MAX_RENDER_SLOT 8