Blender V5.0
BKE_texture.h File Reference

Go to the source code of this file.

Macros

#define MAXCOLORBAND   32

Functions

void BKE_texture_mtex_foreach_id (struct LibraryForeachIDData *data, struct MTex *mtex)
void BKE_texture_default (struct Tex *tex)
struct TexBKE_texture_add (struct Main *bmain, const char *name)
void BKE_texture_type_set (struct Tex *tex, int type)
void BKE_texture_mtex_default (struct MTex *mtex)
struct MTexBKE_texture_mtex_add (void)
struct MTexBKE_texture_mtex_add_id (struct ID *id, int slot)
struct Texgive_current_linestyle_texture (struct FreestyleLineStyle *linestyle)
struct Texgive_current_brush_texture (struct Brush *br)
struct Texgive_current_particle_texture (struct ParticleSettings *part)
bool give_active_mtex (struct ID *id, struct MTex ***mtex_ar, short *act)
void set_active_mtex (struct ID *id, short act)
void set_current_brush_texture (struct Brush *br, struct Tex *tex)
void set_current_linestyle_texture (struct FreestyleLineStyle *linestyle, struct Tex *tex)
void set_current_particle_texture (struct ParticleSettings *part, struct Tex *tex)
struct TexMappingBKE_texture_mapping_add (int type)
void BKE_texture_mapping_default (struct TexMapping *texmap, int type)
void BKE_texture_mapping_init (struct TexMapping *texmap)
struct ColorMappingBKE_texture_colormapping_add (void)
void BKE_texture_colormapping_default (struct ColorMapping *colormap)
bool BKE_texture_dependsOnTime (const struct Tex *texture)
bool BKE_texture_is_image_user (const struct Tex *tex)
void BKE_texture_get_value_ex (struct Tex *texture, const float *tex_co, struct TexResult *texres, struct ImagePool *pool, bool use_color_management)
void BKE_texture_get_value (struct Tex *texture, const float *tex_co, struct TexResult *texres, bool use_color_management)
void BKE_texture_fetch_images_for_pool (struct Tex *texture, struct ImagePool *pool)

Macro Definition Documentation

◆ MAXCOLORBAND

#define MAXCOLORBAND   32

ColorBand.data length.

Definition at line 23 of file BKE_texture.h.

Function Documentation

◆ BKE_texture_add()

struct Tex * BKE_texture_add ( struct Main * bmain,
const char * name )

Definition at line 370 of file texture.cc.

References BKE_id_new(), and name.

Referenced by new_texture_exec().

◆ BKE_texture_colormapping_add()

struct ColorMapping * BKE_texture_colormapping_add ( void )

Definition at line 328 of file texture.cc.

References BKE_texture_colormapping_default(), and MEM_callocN().

◆ BKE_texture_colormapping_default()

◆ BKE_texture_default()

void BKE_texture_default ( struct Tex * tex)

Definition at line 358 of file texture.cc.

References Tex::id, and texture_init_data().

Referenced by init().

◆ BKE_texture_dependsOnTime()

bool BKE_texture_dependsOnTime ( const struct Tex * texture)

◆ BKE_texture_fetch_images_for_pool()

void BKE_texture_fetch_images_for_pool ( struct Tex * texture,
struct ImagePool * pool )

Make sure all images used by texture are loaded into pool.

Definition at line 661 of file texture.cc.

References BKE_image_pool_acquire_ibuf(), TEX_IMAGE, texture(), and texture_nodes_fetch_images_for_pool().

Referenced by displaceModifier_do(), and shader_preview_texture().

◆ BKE_texture_get_value()

void BKE_texture_get_value ( struct Tex * texture,
const float * tex_co,
struct TexResult * texres,
bool use_color_management )

Definition at line 638 of file texture.cc.

References BKE_texture_get_value_ex(), and texture().

Referenced by warpModifier_do(), waveModifier_do(), and weightvg_do_mask().

◆ BKE_texture_get_value_ex()

void BKE_texture_get_value_ex ( struct Tex * texture,
const float * tex_co,
struct TexResult * texres,
struct ImagePool * pool,
bool use_color_management )

◆ BKE_texture_is_image_user()

bool BKE_texture_is_image_user ( const struct Tex * tex)
Returns
true if this texture can use its #Texture.ima (even if its NULL).

References texture().

◆ BKE_texture_mapping_add()

struct TexMapping * BKE_texture_mapping_add ( int type)

Definition at line 225 of file texture.cc.

References BKE_texture_mapping_default(), and MEM_callocN().

◆ BKE_texture_mapping_default()

◆ BKE_texture_mapping_init()

◆ BKE_texture_mtex_add()

struct MTex * BKE_texture_mtex_add ( void )

◆ BKE_texture_mtex_add_id()

struct MTex * BKE_texture_mtex_add_id ( struct ID * id,
int slot )

Slot -1 for first free ID.

Definition at line 399 of file texture.cc.

References BKE_texture_mtex_add(), give_active_mtex(), i, id_us_min(), MAX_MTEX, and MEM_freeN().

◆ BKE_texture_mtex_default()

void BKE_texture_mtex_default ( struct MTex * mtex)

Definition at line 381 of file texture.cc.

References DNA_struct_default_get.

Referenced by BKE_texture_mtex_add(), blo_do_versions_250(), and blo_do_versions_260().

◆ BKE_texture_mtex_foreach_id()

void BKE_texture_mtex_foreach_id ( struct LibraryForeachIDData * data,
struct MTex * mtex )

Utility for all IDs using those texture slots.

Definition at line 217 of file texture.cc.

References BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, IDWALK_CB_NOP, IDWALK_CB_USER, MTex::object, and MTex::tex.

Referenced by brush_foreach_id(), linestyle_foreach_id(), and particle_settings_foreach_id().

◆ BKE_texture_type_set()

void BKE_texture_type_set ( struct Tex * tex,
int type )

Definition at line 363 of file texture.cc.

References Tex::type.

◆ give_active_mtex()

bool give_active_mtex ( struct ID * id,
struct MTex *** mtex_ar,
short * act )

Definition at line 480 of file texture.cc.

References GS, ID_LS, ID_PA, and ID::name.

Referenced by BKE_texture_mtex_add_id(), and texture_slot_move_exec().

◆ give_current_brush_texture()

struct Tex * give_current_brush_texture ( struct Brush * br)

Definition at line 527 of file texture.cc.

References Brush::mtex, and MTex::tex.

Referenced by texture_get_from_context().

◆ give_current_linestyle_texture()

struct Tex * give_current_linestyle_texture ( struct FreestyleLineStyle * linestyle)

Definition at line 443 of file texture.cc.

References FreestyleLineStyle::mtex, MTex::tex, and FreestyleLineStyle::texact.

Referenced by texture_get_from_context().

◆ give_current_particle_texture()

struct Tex * give_current_particle_texture ( struct ParticleSettings * part)

Definition at line 545 of file texture.cc.

References ParticleSettings::mtex, MTex::tex, and ParticleSettings::texact.

◆ set_active_mtex()

void set_active_mtex ( struct ID * id,
short act )

Definition at line 506 of file texture.cc.

References GS, ID_LS, ID_PA, MAX_MTEX, and ID::name.

Referenced by texture_slot_move_exec().

◆ set_current_brush_texture()

void set_current_brush_texture ( struct Brush * br,
struct Tex * tex )

◆ set_current_linestyle_texture()

void set_current_linestyle_texture ( struct FreestyleLineStyle * linestyle,
struct Tex * tex )

◆ set_current_particle_texture()

void set_current_particle_texture ( struct ParticleSettings * part,
struct Tex * tex )