|
Blender V5.0
|
#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include <optional>#include "MEM_guardedalloc.h"#include "BLI_kdopbvh.hh"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_node_legacy_types.hh"#include "DNA_brush_types.h"#include "DNA_color_types.h"#include "DNA_defaults.h"#include "DNA_linestyle_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_particle_types.h"#include "DNA_texture_types.h"#include "BKE_brush.hh"#include "BKE_colorband.hh"#include "BKE_colortools.hh"#include "BKE_icons.h"#include "BKE_idtype.hh"#include "BKE_image.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_node_runtime.hh"#include "BKE_preview_image.hh"#include "BKE_texture.h"#include "NOD_texture.h"#include "RE_texture.h"#include "DRW_engine.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
Variables | |
| IDTypeInfo | IDType_ID_TE |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 27 of file texture.cc.
Definition at line 370 of file texture.cc.
References BKE_id_new(), and name.
Referenced by new_texture_exec().
| ColorMapping * BKE_texture_colormapping_add | ( | void | ) |
Definition at line 328 of file texture.cc.
References BKE_texture_colormapping_default(), and MEM_callocN().
| void BKE_texture_colormapping_default | ( | ColorMapping * | colormap | ) |
Definition at line 337 of file texture.cc.
References BKE_colorband_init(), ColorMapping::blend_color, ColorMapping::blend_factor, ColorMapping::blend_type, ColorMapping::bright, ColorMapping::coba, ColorMapping::contrast, MA_RAMP_BLEND, and ColorMapping::saturation.
Referenced by BKE_texture_colormapping_add(), blo_do_versions_400(), blender::nodes::node_shader_tex_brick_cc::node_shader_init_tex_brick(), blender::nodes::node_shader_tex_checker_cc::node_shader_init_tex_checker(), blender::nodes::node_shader_tex_environment_cc::node_shader_init_tex_environment(), blender::nodes::node_shader_tex_gabor_cc::node_shader_init_tex_gabor(), blender::nodes::node_shader_tex_gradient_cc::node_shader_init_tex_gradient(), blender::nodes::node_shader_tex_image_cc::node_shader_init_tex_image(), blender::nodes::node_shader_tex_magic_cc::node_shader_init_tex_magic(), blender::nodes::node_shader_tex_noise_cc::node_shader_init_tex_noise(), blender::nodes::node_shader_tex_sky_cc::node_shader_init_tex_sky(), blender::nodes::node_shader_tex_voronoi_cc::node_shader_init_tex_voronoi(), and blender::nodes::node_shader_tex_wave_cc::node_shader_init_tex_wave().
| void BKE_texture_default | ( | Tex * | tex | ) |
Definition at line 358 of file texture.cc.
References Tex::id, and texture_init_data().
Referenced by init().
| bool BKE_texture_dependsOnTime | ( | const Tex * | texture | ) |
Definition at line 598 of file texture.cc.
References BKE_image_is_animated(), TEX_NOISE, and texture().
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().
| void BKE_texture_get_value | ( | Tex * | texture, |
| const float * | tex_co, | ||
| 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().
| void BKE_texture_get_value_ex | ( | Tex * | texture, |
| const float * | tex_co, | ||
| TexResult * | texres, | ||
| ImagePool * | pool, | ||
| bool | use_color_management ) |
Definition at line 616 of file texture.cc.
References copy_v3_fl(), multitex_ext_safe(), TEX_RGB, texture(), TexResult::tin, and TexResult::trgba.
Referenced by BKE_texture_get_value(), displaceModifier_do_task(), and shader_preview_texture().
| bool BKE_texture_is_image_user | ( | const Tex * | tex | ) |
Definition at line 587 of file texture.cc.
References TEX_IMAGE, and Tex::type.
Referenced by texture_copy_data().
| TexMapping * BKE_texture_mapping_add | ( | int | type | ) |
Definition at line 225 of file texture.cc.
References BKE_texture_mapping_default(), and MEM_callocN().
| void BKE_texture_mapping_default | ( | TexMapping * | texmap, |
| int | type ) |
Definition at line 234 of file texture.cc.
References TexMapping::mapping, TexMapping::mat, TexMapping::max, MTEX_FLAT, PROJ_X, PROJ_Y, PROJ_Z, TexMapping::projx, TexMapping::projy, TexMapping::projz, TexMapping::size, TexMapping::type, and unit_m4().
Referenced by BKE_texture_mapping_add(), blo_do_versions_400(), blender::nodes::node_shader_tex_brick_cc::node_shader_init_tex_brick(), blender::nodes::node_shader_tex_checker_cc::node_shader_init_tex_checker(), blender::nodes::node_shader_tex_environment_cc::node_shader_init_tex_environment(), blender::nodes::node_shader_tex_gabor_cc::node_shader_init_tex_gabor(), blender::nodes::node_shader_tex_gradient_cc::node_shader_init_tex_gradient(), blender::nodes::node_shader_tex_image_cc::node_shader_init_tex_image(), blender::nodes::node_shader_tex_magic_cc::node_shader_init_tex_magic(), blender::nodes::node_shader_tex_noise_cc::node_shader_init_tex_noise(), blender::nodes::node_shader_tex_sky_cc::node_shader_init_tex_sky(), blender::nodes::node_shader_tex_voronoi_cc::node_shader_init_tex_voronoi(), and blender::nodes::node_shader_tex_wave_cc::node_shader_init_tex_wave().
| void BKE_texture_mapping_init | ( | TexMapping * | texmap | ) |
Definition at line 249 of file texture.cc.
References copy_v3_v3(), ELEM, eul_to_mat4(), fabsf, TexMapping::flag, invert_m4(), is_one_v3(), is_zero_v3(), TexMapping::loc, TexMapping::mat, mul_m4_m4m4(), mul_m4_series, PROJ_N, PROJ_X, PROJ_Y, PROJ_Z, TexMapping::projx, TexMapping::projy, TexMapping::projz, TexMapping::rot, signf(), size(), TexMapping::size, size_to_mat4(), TEXMAP_TYPE_NORMAL, TEXMAP_TYPE_POINT, TEXMAP_TYPE_TEXTURE, TEXMAP_TYPE_VECTOR, TEXMAP_UNIT_MATRIX, transpose_m4(), TexMapping::type, unit_m4(), and zero_m4().
| MTex * BKE_texture_mtex_add | ( | void | ) |
Definition at line 388 of file texture.cc.
References BKE_texture_mtex_default(), and MEM_callocN().
Referenced by BKE_texture_mtex_add_id(), set_current_linestyle_texture(), and set_current_particle_texture().
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().
| void BKE_texture_mtex_default | ( | 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().
| 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().
| void BKE_texture_type_set | ( | Tex * | tex, |
| int | type ) |
Definition at line 363 of file texture.cc.
References Tex::type.
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().
Definition at line 527 of file texture.cc.
References Brush::mtex, and MTex::tex.
Referenced by texture_get_from_context().
| Tex * give_current_linestyle_texture | ( | FreestyleLineStyle * | linestyle | ) |
Definition at line 443 of file texture.cc.
References FreestyleLineStyle::mtex, MTex::tex, and FreestyleLineStyle::texact.
Referenced by texture_get_from_context().
| Tex * give_current_particle_texture | ( | ParticleSettings * | part | ) |
Definition at line 545 of file texture.cc.
References ParticleSettings::mtex, MTex::tex, and ParticleSettings::texact.
| void set_active_mtex | ( | 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().
Definition at line 532 of file texture.cc.
References BKE_brush_tag_unsaved_changes(), Tex::id, id_us_min(), id_us_plus(), Brush::mtex, and MTex::tex.
| void set_current_linestyle_texture | ( | FreestyleLineStyle * | linestyle, |
| Tex * | newtex ) |
Definition at line 458 of file texture.cc.
References BKE_texture_mtex_add(), Tex::id, id_us_min(), id_us_plus(), MEM_SAFE_FREE, FreestyleLineStyle::mtex, MTex::tex, FreestyleLineStyle::texact, MTex::texco, and TEXCO_STROKE.
| void set_current_particle_texture | ( | ParticleSettings * | part, |
| Tex * | newtex ) |
Definition at line 562 of file texture.cc.
References BKE_texture_mtex_add(), MTex::blendtype, Tex::id, id_us_min(), id_us_plus(), MEM_SAFE_FREE, ParticleSettings::mtex, MTEX_MUL, MTex::tex, ParticleSettings::texact, MTex::texco, and TEXCO_ORCO.
|
static |
Definition at line 172 of file texture.cc.
References BKE_previewimg_blend_read(), BLO_read_struct, Tex::coba, Tex::iuser, Tex_Runtime::last_update, Tex::preview, Tex::runtime, and ImageUser::scene.
|
static |
Definition at line 148 of file texture.cc.
References BKE_id_blend_write(), BKE_previewimg_blend_write(), BLO_write_id_struct, BLO_write_struct, BLO_write_struct_at_address, Tex::coba, BLO_Write_IDBuffer::get(), bNodeTree::id, Tex::id, blender::bke::node_tree_blend_write(), Tex::nodetree, and Tex::preview.
|
static |
Definition at line 70 of file texture.cc.
References BKE_id_copy_in_lib(), BKE_previewimg_id_copy(), BKE_texture_is_image_user(), Tex::coba, flag, bNodeTree::id, Tex::id, Tex::ima, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_LOCAL, LIB_ID_CREATE_NO_ALLOCATE, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN(), blender::bke::node_tree_localize(), Tex::nodetree, ntreeTexEndExecTree(), Tex::preview, and bNodeTree::runtime.
|
static |
Definition at line 136 of file texture.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_library_foreach_ID_embedded(), data, IDWALK_CB_USER, and texture().
|
static |
Definition at line 119 of file texture.cc.
References BKE_icon_id_delete(), BKE_previewimg_free(), MEM_freeN(), MEM_SAFE_FREE, blender::bke::node_tree_free_embedded_tree(), and texture().
|
static |
Definition at line 59 of file texture.cc.
References BKE_imageuser_default(), BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, and texture().
Referenced by BKE_texture_default().
|
static |
Definition at line 646 of file texture.cc.
References BKE_image_pool_acquire_ibuf(), bNodeTree::id, Image::id, SH_NODE_TEX_IMAGE, texture(), and texture_nodes_fetch_images_for_pool().
Referenced by BKE_texture_fetch_images_for_pool(), and texture_nodes_fetch_images_for_pool().
| IDTypeInfo IDType_ID_TE |
Definition at line 186 of file texture.cc.