|
Blender
V2.59
|
00001 /* 00002 * $Id: BKE_texture.h 37078 2011-06-01 16:17:38Z blendix $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef BKE_TEXTURE_H 00030 #define BKE_TEXTURE_H 00031 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 struct bNode; 00043 struct Brush; 00044 struct ColorBand; 00045 struct EnvMap; 00046 struct HaloRen; 00047 struct Lamp; 00048 struct LampRen; 00049 struct Material; 00050 struct MTex; 00051 struct ParticleSettings; 00052 struct PluginTex; 00053 struct PointDensity; 00054 struct Tex; 00055 struct TexMapping; 00056 struct VoxelData; 00057 struct World; 00058 00059 /* in ColorBand struct */ 00060 #define MAXCOLORBAND 32 00061 00062 00063 void free_texture(struct Tex *t); 00064 int test_dlerr(const char *name, const char *symbol); 00065 void open_plugin_tex(struct PluginTex *pit); 00066 struct PluginTex *add_plugin_tex(char *str); 00067 void free_plugin_tex(struct PluginTex *pit); 00068 00069 void init_colorband(struct ColorBand *coba, int rangetype); 00070 struct ColorBand *add_colorband(int rangetype); 00071 int do_colorband(struct ColorBand *coba, float in, float out[4]); 00072 void colorband_table_RGBA(struct ColorBand *coba, float **array, int *size); 00073 int vergcband(const void *a1, const void *a2); 00074 struct CBData *colorband_element_add(struct ColorBand *coba, float position); 00075 int colorband_element_remove(struct ColorBand *coba, int index); 00076 00077 void default_tex(struct Tex *tex); 00078 struct Tex *add_texture(const char *name); 00079 void tex_set_type(struct Tex *tex, int type); 00080 void default_mtex(struct MTex *mtex); 00081 struct MTex *add_mtex(void); 00082 struct MTex *add_mtex_id(struct ID *id, int slot); 00083 struct Tex *copy_texture(struct Tex *tex); 00084 struct Tex *localize_texture(struct Tex *tex); 00085 void make_local_texture(struct Tex *tex); 00086 void autotexname(struct Tex *tex); 00087 00088 struct Tex *give_current_object_texture(struct Object *ob); 00089 struct Tex *give_current_material_texture(struct Material *ma); 00090 struct Tex *give_current_lamp_texture(struct Lamp *la); 00091 struct Tex *give_current_world_texture(struct World *world); 00092 struct Tex *give_current_brush_texture(struct Brush *br); 00093 struct Tex *give_current_particle_texture(struct ParticleSettings *part); 00094 00095 struct bNode *give_current_material_texture_node(struct Material *ma); 00096 00097 int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act); 00098 void set_active_mtex(struct ID *id, short act); 00099 00100 void set_current_brush_texture(struct Brush *br, struct Tex *tex); 00101 void set_current_world_texture(struct World *wo, struct Tex *tex); 00102 void set_current_material_texture(struct Material *ma, struct Tex *tex); 00103 void set_current_lamp_texture(struct Lamp *la, struct Tex *tex); 00104 void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex); 00105 00106 int has_current_material_texture(struct Material *ma); 00107 00108 struct TexMapping *add_mapping(void); 00109 void init_mapping(struct TexMapping *texmap); 00110 00111 00112 void BKE_free_envmapdata(struct EnvMap *env); 00113 void BKE_free_envmap(struct EnvMap *env); 00114 struct EnvMap *BKE_add_envmap(void); 00115 struct EnvMap *BKE_copy_envmap(struct EnvMap *env); 00116 00117 void BKE_free_pointdensitydata(struct PointDensity *pd); 00118 void BKE_free_pointdensity(struct PointDensity *pd); 00119 struct PointDensity *BKE_add_pointdensity(void); 00120 struct PointDensity *BKE_copy_pointdensity(struct PointDensity *pd); 00121 00122 void BKE_free_voxeldatadata(struct VoxelData *vd); 00123 void BKE_free_voxeldata(struct VoxelData *vd); 00124 struct VoxelData *BKE_add_voxeldata(void); 00125 struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd); 00126 00127 int BKE_texture_dependsOnTime(const struct Tex *texture); 00128 00129 #ifdef __cplusplus 00130 } 00131 #endif 00132 00133 #endif 00134