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 struct Scene *scene; /* to retrieve render result */
49 int framenr; /* movies, sequences: current to display */
50 int frames; /* total amount of frames to use */
51 int offset, sfra; /* offset within movie, start frame in global time */
52 char fie_ima, cycl; /* fields/image in movie, cyclic flag */
55 short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
64 #define IMA_ANIM_ALWAYS 1
65 #define IMA_ANIM_REFRESHED 2
66 /* #define IMA_DO_PREMUL 4 */
68 typedef struct Image {
71 char name[240]; /* file path */
73 ListBase ibufs; /* not written in file */
74 struct GPUTexture *gputexture; /* not written in file */
78 struct RenderResult *rr;
80 struct RenderResult *renders[8]; /* IMA_MAX_RENDER_SLOT */
81 short render_slot, last_render_slot;
88 short tpageflag, totbind;
91 unsigned int bindcode; /* only for current image... */
92 unsigned int *repbind; /* for repeat of parts of images */
94 struct PackedFile * packedfile;
95 struct PreviewImage * preview;
97 /* game engine tile animation */
102 /* for generated images */
103 short gen_x, gen_y, gen_type;
105 /* display aspect - for UV editing images resized for faster openGL display */
110 /* **************** IMAGE ********************* */
114 #define IMA_STD_FIELD 2
115 #define IMA_DO_PREMUL 4
117 #define IMA_REFLECT 16
118 #define IMA_NOCOLLECT 32
119 #define IMA_DEPRECATED 64
120 #define IMA_OLD_PREMUL 128
122 /* Image.tpageflag */
124 #define IMA_TWINANIM 2
125 #define IMA_COLCYCLE 4 /* Depreciated */
126 #define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */
127 #define IMA_CLAMP_U 16
128 #define IMA_CLAMP_V 32
129 #define IMA_TPAGE_REFRESH 64
131 /* ima->type and ima->source moved to BKE_image.h, for API */
134 #define IMA_MAX_RENDER_TEXT 512
135 #define IMA_MAX_RENDER_SLOT 8