Blender  V2.93
BKE_texture.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 #pragma once
20 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct Brush;
30 struct ColorBand;
31 struct FreestyleLineStyle;
32 struct ImagePool;
34 struct MTex;
35 struct Main;
36 struct ParticleSettings;
37 struct PointDensity;
38 struct Tex;
39 struct TexMapping;
40 struct TexResult;
41 
43 #define MAXCOLORBAND 32
44 
45 void BKE_texture_mtex_foreach_id(struct LibraryForeachIDData *data, struct MTex *mtex);
46 
47 void BKE_texture_default(struct Tex *tex);
48 struct Tex *BKE_texture_add(struct Main *bmain, const char *name);
49 void BKE_texture_type_set(struct Tex *tex, int type);
50 
51 void BKE_texture_mtex_default(struct MTex *mtex);
52 struct MTex *BKE_texture_mtex_add(void);
53 struct MTex *BKE_texture_mtex_add_id(struct ID *id, int slot);
54 /* UNUSED */
55 // void autotexname(struct Tex *tex);
56 
58 struct Tex *give_current_brush_texture(struct Brush *br);
60 
61 bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
62 void set_active_mtex(struct ID *id, short act);
63 
64 void set_current_brush_texture(struct Brush *br, struct Tex *tex);
66 void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex);
67 
69 void BKE_texture_mapping_default(struct TexMapping *texmap, int type);
70 void BKE_texture_mapping_init(struct TexMapping *texmap);
71 
73 void BKE_texture_colormapping_default(struct ColorMapping *colormap);
74 
79 struct PointDensity *BKE_texture_pointdensity_copy(const struct PointDensity *pd, const int flag);
80 
81 bool BKE_texture_dependsOnTime(const struct Tex *texture);
82 bool BKE_texture_is_image_user(const struct Tex *tex);
83 
85  struct Tex *texture,
86  const float *tex_co,
87  struct TexResult *texres,
88  struct ImagePool *pool,
89  bool use_color_management);
90 
91 void BKE_texture_get_value(const struct Scene *scene,
92  struct Tex *texture,
93  const float *tex_co,
94  struct TexResult *texres,
95  bool use_color_management);
96 
98 
99 #ifdef __cplusplus
100 }
101 #endif
void BKE_texture_mtex_default(struct MTex *mtex)
Definition: texture.c:398
bool BKE_texture_dependsOnTime(const struct Tex *texture)
Definition: texture.c:697
void BKE_texture_default(struct Tex *tex)
Definition: texture.c:375
struct PointDensity * BKE_texture_pointdensity_copy(const struct PointDensity *pd, const int flag)
void BKE_texture_mapping_init(struct TexMapping *texmap)
Definition: texture.c:267
void BKE_texture_fetch_images_for_pool(struct Tex *texture, struct ImagePool *pool)
Definition: texture.c:771
void set_current_brush_texture(struct Brush *br, struct Tex *tex)
Definition: texture.c:551
void BKE_texture_pointdensity_free(struct PointDensity *pd)
Definition: texture.c:675
void BKE_texture_pointdensity_init_data(struct PointDensity *pd)
Definition: texture.c:606
bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act)
Definition: texture.c:499
struct MTex * BKE_texture_mtex_add(void)
Definition: texture.c:405
void BKE_texture_mtex_foreach_id(struct LibraryForeachIDData *data, struct MTex *mtex)
Definition: texture.c:235
void set_active_mtex(struct ID *id, short act)
Definition: texture.c:525
void set_current_linestyle_texture(struct FreestyleLineStyle *linestyle, struct Tex *tex)
Definition: texture.c:476
void BKE_texture_type_set(struct Tex *tex, int type)
Definition: texture.c:380
void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex)
Definition: texture.c:580
void BKE_texture_mapping_default(struct TexMapping *texmap, int type)
Definition: texture.c:252
void BKE_texture_get_value(const struct Scene *scene, struct Tex *texture, const float *tex_co, struct TexResult *texres, bool use_color_management)
struct Tex * give_current_brush_texture(struct Brush *br)
Definition: texture.c:546
void BKE_texture_get_value_ex(const struct Scene *scene, struct Tex *texture, const float *tex_co, struct TexResult *texres, struct ImagePool *pool, bool use_color_management)
bool BKE_texture_is_image_user(const struct Tex *tex)
Definition: texture.c:685
struct MTex * BKE_texture_mtex_add_id(struct ID *id, int slot)
Definition: texture.c:417
struct TexMapping * BKE_texture_mapping_add(int type)
Definition: texture.c:243
struct Tex * give_current_particle_texture(struct ParticleSettings *part)
Definition: texture.c:563
struct ColorMapping * BKE_texture_colormapping_add(void)
Definition: texture.c:345
struct Tex * give_current_linestyle_texture(struct FreestyleLineStyle *linestyle)
Definition: texture.c:461
void BKE_texture_pointdensity_free_data(struct PointDensity *pd)
Definition: texture.c:657
void BKE_texture_colormapping_default(struct ColorMapping *colormap)
Definition: texture.c:354
struct Tex * BKE_texture_add(struct Main *bmain, const char *name)
Definition: texture.c:387
struct PointDensity * BKE_texture_pointdensity_add(void)
Definition: texture.c:636
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Scene scene
FreestyleLineStyle linestyle
Definition: DNA_ID.h:273
Definition: BKE_main.h:116