Blender V2.61 - r43446
|
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) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00032 #ifndef DNA_IMAGE_TYPES_H 00033 #define DNA_IMAGE_TYPES_H 00034 00035 #include "DNA_ID.h" 00036 00037 struct PackedFile; 00038 struct Scene; 00039 struct anim; 00040 struct ImBuf; 00041 struct RenderResult; 00042 struct GPUTexture; 00043 00044 00045 /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ 00046 /* should be used in conjunction with an ID * to Image. */ 00047 typedef struct ImageUser { 00048 struct Scene *scene; /* to retrieve render result */ 00049 00050 int framenr; /* movies, sequences: current to display */ 00051 int frames; /* total amount of frames to use */ 00052 int offset, sfra; /* offset within movie, start frame in global time */ 00053 char fie_ima, cycl; /* fields/image in movie, cyclic flag */ 00054 char ok, pad; 00055 00056 short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */ 00057 00058 short flag; 00059 00060 int pad2; 00061 00062 } ImageUser; 00063 00064 /* iuser->flag */ 00065 #define IMA_ANIM_ALWAYS 1 00066 #define IMA_ANIM_REFRESHED 2 00067 /* #define IMA_DO_PREMUL 4 */ 00068 00069 typedef struct Image { 00070 ID id; 00071 00072 char name[240]; /* file path, 240 = FILE_MAX */ 00073 00074 ListBase ibufs; /* not written in file */ 00075 struct GPUTexture *gputexture; /* not written in file */ 00076 00077 /* sources from: */ 00078 struct anim *anim; 00079 struct RenderResult *rr; 00080 00081 struct RenderResult *renders[8]; /* IMA_MAX_RENDER_SLOT */ 00082 short render_slot, last_render_slot; 00083 00084 short ok, flag; 00085 short source, type; 00086 int lastframe; 00087 00088 /* texture page */ 00089 short tpageflag, totbind; 00090 short xrep, yrep; 00091 short twsta, twend; 00092 unsigned int bindcode; /* only for current image... */ 00093 unsigned int *repbind; /* for repeat of parts of images */ 00094 00095 struct PackedFile * packedfile; 00096 struct PreviewImage * preview; 00097 00098 /* game engine tile animation */ 00099 float lastupdate; 00100 int lastused; 00101 short animspeed; 00102 00103 /* for generated images */ 00104 short gen_x, gen_y; 00105 char gen_type, gen_flag; 00106 00107 /* display aspect - for UV editing images resized for faster openGL display */ 00108 float aspx, aspy; 00109 } Image; 00110 00111 00112 /* **************** IMAGE ********************* */ 00113 00114 /* Image.flag */ 00115 #define IMA_FIELDS 1 00116 #define IMA_STD_FIELD 2 00117 #define IMA_DO_PREMUL 4 00118 #define IMA_REFLECT 16 00119 #define IMA_NOCOLLECT 32 00120 #define IMA_DEPRECATED 64 00121 #define IMA_OLD_PREMUL 128 00122 #define IMA_CM_PREDIVIDE 256 00123 00124 /* Image.tpageflag */ 00125 #define IMA_TILES 1 00126 #define IMA_TWINANIM 2 00127 #define IMA_COLCYCLE 4 /* Depreciated */ 00128 #define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */ 00129 #define IMA_CLAMP_U 16 00130 #define IMA_CLAMP_V 32 00131 #define IMA_TPAGE_REFRESH 64 00132 00133 /* ima->type and ima->source moved to BKE_image.h, for API */ 00134 00135 /* render */ 00136 #define IMA_MAX_RENDER_TEXT 512 00137 #define IMA_MAX_RENDER_SLOT 8 00138 00139 /* gen_flag */ 00140 #define IMA_GEN_FLOAT 1 00141 00142 #endif 00143