Blender V4.3
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)
 
void BKE_texture_pointdensity_init_data (struct PointDensity *pd)
 
void BKE_texture_pointdensity_free_data (struct PointDensity *pd)
 
void BKE_texture_pointdensity_free (struct PointDensity *pd)
 
struct PointDensityBKE_texture_pointdensity_add (void)
 
struct PointDensityBKE_texture_pointdensity_copy (const struct PointDensity *pd, int flag)
 
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 28 of file BKE_texture.h.

Function Documentation

◆ BKE_texture_add()

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

Definition at line 383 of file texture.cc.

References BKE_id_new(), ID_TE, and tex.

Referenced by new_texture_exec().

◆ BKE_texture_colormapping_add()

struct ColorMapping * BKE_texture_colormapping_add ( void )

Definition at line 341 of file texture.cc.

References BKE_texture_colormapping_default().

◆ BKE_texture_colormapping_default()

◆ BKE_texture_default()

void BKE_texture_default ( struct Tex * tex)

Definition at line 371 of file texture.cc.

References Tex::id, tex, 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 745 of file texture.cc.

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

Referenced by blender::realtime_compositor::CachedTexture::CachedTexture(), 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 722 of file texture.cc.

References BKE_texture_get_value_ex().

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).

◆ BKE_texture_mapping_add()

struct TexMapping * BKE_texture_mapping_add ( int type)

◆ 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 412 of file texture.cc.

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

◆ BKE_texture_mtex_default()

void BKE_texture_mtex_default ( struct MTex * mtex)

Definition at line 394 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 230 of file texture.cc.

References BKE_LIB_FOREACHID_PROCESS_IDSUPER, 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_pointdensity_add()

struct PointDensity * BKE_texture_pointdensity_add ( void )

Definition at line 630 of file texture.cc.

References BKE_texture_pointdensity_init_data(), and MEM_callocN.

◆ BKE_texture_pointdensity_copy()

struct PointDensity * BKE_texture_pointdensity_copy ( const struct PointDensity * pd,
int flag )

◆ BKE_texture_pointdensity_free()

void BKE_texture_pointdensity_free ( struct PointDensity * pd)

Definition at line 664 of file texture.cc.

References BKE_texture_pointdensity_free_data(), and MEM_freeN().

◆ BKE_texture_pointdensity_free_data()

◆ BKE_texture_pointdensity_init_data()

◆ BKE_texture_type_set()

void BKE_texture_type_set ( struct Tex * tex,
int type )

Definition at line 376 of file texture.cc.

References tex, and Tex::type.

◆ give_active_mtex()

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

Definition at line 493 of file texture.cc.

References GS, ID_LS, and ID_PA.

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 540 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)

◆ give_current_particle_texture()

struct Tex * give_current_particle_texture ( struct ParticleSettings * part)

Definition at line 558 of file texture.cc.

References int, MTex::tex, and tex.

◆ set_active_mtex()

void set_active_mtex ( struct ID * id,
short act )

Definition at line 519 of file texture.cc.

References GS, ID_LS, ID_PA, and MAX_MTEX.

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 )