Blender  V3.3
Macros | Functions
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 (const struct Scene *scene, struct Tex *texture, const float *tex_co, struct TexResult *texres, struct ImagePool *pool, bool use_color_management)
 
void BKE_texture_get_value (const struct Scene *scene, 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 27 of file BKE_texture.h.

Function Documentation

◆ BKE_texture_add()

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

Definition at line 373 of file texture.c.

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 331 of file texture.c.

References BKE_texture_colormapping_default(), and MEM_callocN.

◆ BKE_texture_colormapping_default()

void BKE_texture_colormapping_default ( struct ColorMapping colormap)

◆ BKE_texture_default()

void BKE_texture_default ( struct Tex tex)

Definition at line 361 of file texture.c.

References Tex::id, tex, and texture_init_data().

Referenced by init().

◆ BKE_texture_dependsOnTime()

bool BKE_texture_dependsOnTime ( const struct Tex texture)

Definition at line 670 of file texture.c.

References Tex::adt, BKE_image_is_animated(), Tex::ima, TEX_NOISE, and Tex::type.

Referenced by dependsOnTime().

◆ 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 743 of file texture.c.

References BKE_image_pool_acquire_ibuf(), Tex::ima, Tex::iuser, Tex::nodetree, NULL, blender::compositor::pool, TEX_IMAGE, texture_nodes_fetch_images_for_pool(), and Tex::type.

Referenced by displaceModifier_do(), and shader_preview_texture().

◆ BKE_texture_get_value()

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

◆ BKE_texture_get_value_ex()

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 
)

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

Definition at line 659 of file texture.c.

References tex, TEX_IMAGE, and Tex::type.

Referenced by texture_copy_data().

◆ BKE_texture_mapping_add()

struct TexMapping* BKE_texture_mapping_add ( int  type)

◆ BKE_texture_mapping_default()

void BKE_texture_mapping_default ( struct TexMapping texmap,
int  type 
)

◆ BKE_texture_mapping_init()

void BKE_texture_mapping_init ( struct TexMapping texmap)

◆ 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 402 of file texture.c.

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

◆ BKE_texture_mtex_default()

void BKE_texture_mtex_default ( struct MTex mtex)

Definition at line 384 of file texture.c.

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 221 of file texture.c.

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_pointdensity_add()

struct PointDensity* BKE_texture_pointdensity_add ( void  )

Definition at line 619 of file texture.c.

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 652 of file texture.c.

References BKE_texture_pointdensity_free_data(), and MEM_freeN.

◆ BKE_texture_pointdensity_free_data()

void BKE_texture_pointdensity_free_data ( struct PointDensity pd)

◆ BKE_texture_pointdensity_init_data()

void BKE_texture_pointdensity_init_data ( struct PointDensity pd)

◆ BKE_texture_type_set()

void BKE_texture_type_set ( struct Tex tex,
int  type 
)

Definition at line 366 of file texture.c.

References tex, type, and Tex::type.

◆ give_active_mtex()

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

Definition at line 483 of file texture.c.

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

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 530 of file texture.c.

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 547 of file texture.c.

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

◆ set_active_mtex()

void set_active_mtex ( struct ID id,
short  act 
)

Definition at line 509 of file texture.c.

References GS, id, 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 
)

Definition at line 535 of file texture.c.

References Tex::id, id_us_min(), id_us_plus(), Brush::mtex, and MTex::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 
)