|
Blender
V2.93
|
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_kdopbvh.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_math_color.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "DNA_brush_types.h"#include "DNA_color_types.h"#include "DNA_defaults.h"#include "DNA_key_types.h"#include "DNA_linestyle_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_particle_types.h"#include "IMB_imbuf.h"#include "BKE_main.h"#include "BKE_anim_data.h"#include "BKE_colorband.h"#include "BKE_colortools.h"#include "BKE_icons.h"#include "BKE_idtype.h"#include "BKE_image.h"#include "BKE_key.h"#include "BKE_lib_id.h"#include "BKE_lib_query.h"#include "BKE_material.h"#include "BKE_node.h"#include "BKE_scene.h"#include "BKE_texture.h"#include "RE_texture.h"#include "BLO_read_write.h"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
Variables | |
| IDTypeInfo | IDType_ID_TE |
Definition at line 387 of file texture.c.
References BKE_id_new(), ID_TE, and tex.
Referenced by new_texture_exec().
| ColorMapping* BKE_texture_colormapping_add | ( | void | ) |
Definition at line 345 of file texture.c.
References BKE_texture_colormapping_default(), and MEM_callocN.
| void BKE_texture_colormapping_default | ( | ColorMapping * | colormap | ) |
Definition at line 354 of file texture.c.
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(), node_shader_init_tex_brick(), node_shader_init_tex_checker(), node_shader_init_tex_environment(), node_shader_init_tex_gradient(), node_shader_init_tex_image(), node_shader_init_tex_magic(), node_shader_init_tex_musgrave(), node_shader_init_tex_noise(), node_shader_init_tex_sky(), node_shader_init_tex_voronoi(), and node_shader_init_tex_wave().
| void BKE_texture_default | ( | Tex * | tex | ) |
| bool BKE_texture_dependsOnTime | ( | const struct Tex * | texture | ) |
Definition at line 697 of file texture.c.
References BKE_image_is_animated(), and TEX_NOISE.
Referenced by dependsOnTime().
Definition at line 771 of file texture.c.
References BKE_image_pool_acquire_ibuf(), NULL, blender::compositor::pool, TEX_IMAGE, and texture_nodes_fetch_images_for_pool().
Referenced by displaceModifier_do(), and shader_preview_texture().
| void BKE_texture_get_value | ( | const Scene * | scene, |
| Tex * | texture, | ||
| const float * | tex_co, | ||
| TexResult * | texres, | ||
| bool | use_color_management | ||
| ) |
Definition at line 744 of file texture.c.
References BKE_texture_get_value_ex(), NULL, and scene.
| void BKE_texture_get_value_ex | ( | const Scene * | scene, |
| Tex * | texture, | ||
| const float * | tex_co, | ||
| TexResult * | texres, | ||
| struct ImagePool * | pool, | ||
| bool | use_color_management | ||
| ) |
Definition at line 715 of file texture.c.
References BKE_scene_check_color_management_enabled(), copy_v3_fl(), multitex_ext_safe(), blender::compositor::pool, scene, TexResult::tb, TEX_RGB, TexResult::tg, TexResult::tin, and TexResult::tr.
Referenced by BKE_texture_get_value().
| bool BKE_texture_is_image_user | ( | const struct Tex * | tex | ) |
| TexMapping* BKE_texture_mapping_add | ( | int | type | ) |
Definition at line 243 of file texture.c.
References BKE_texture_mapping_default(), MEM_callocN, and type.
Referenced by node_composit_init_map_value().
| void BKE_texture_mapping_default | ( | TexMapping * | texmap, |
| int | type | ||
| ) |
Definition at line 252 of file texture.c.
References TexMapping::mapping, TexMapping::mat, TexMapping::max, MTEX_FLAT, PROJ_X, PROJ_Y, PROJ_Z, TexMapping::projx, TexMapping::projy, TexMapping::projz, TexMapping::size, type, TexMapping::type, and unit_m4().
Referenced by BKE_texture_mapping_add(), node_shader_init_tex_brick(), node_shader_init_tex_checker(), node_shader_init_tex_environment(), node_shader_init_tex_gradient(), node_shader_init_tex_image(), node_shader_init_tex_magic(), node_shader_init_tex_musgrave(), node_shader_init_tex_noise(), node_shader_init_tex_sky(), node_shader_init_tex_voronoi(), and node_shader_init_tex_wave().
| void BKE_texture_mapping_init | ( | TexMapping * | texmap | ) |
Definition at line 267 of file texture.c.
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 405 of file texture.c.
References BKE_texture_mtex_default(), and MEM_callocN.
Referenced by BKE_texture_mtex_add_id(), set_current_linestyle_texture(), and set_current_particle_texture().
Definition at line 417 of file texture.c.
References BKE_texture_mtex_add(), give_active_mtex(), id_us_min(), MAX_MTEX, MEM_freeN, NULL, and tex.
| void BKE_texture_mtex_default | ( | MTex * | mtex | ) |
Definition at line 398 of file texture.c.
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 | ( | LibraryForeachIDData * | data, |
| MTex * | mtex | ||
| ) |
Definition at line 235 of file texture.c.
References BKE_LIB_FOREACHID_PROCESS, 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().
| PointDensity* BKE_texture_pointdensity_add | ( | void | ) |
Definition at line 636 of file texture.c.
References BKE_texture_pointdensity_init_data(), and MEM_callocN.
| PointDensity* BKE_texture_pointdensity_copy | ( | const PointDensity * | pd, |
| const int | UNUSEDflag | ||
| ) |
Definition at line 643 of file texture.c.
References BKE_curvemapping_copy(), PointDensity::coba, PointDensity::falloff_curve, MEM_dupallocN, NULL, PointDensity::point_data, and PointDensity::point_tree.
| void BKE_texture_pointdensity_free | ( | PointDensity * | pd | ) |
Definition at line 675 of file texture.c.
References BKE_texture_pointdensity_free_data(), and MEM_freeN.
| void BKE_texture_pointdensity_free_data | ( | PointDensity * | pd | ) |
Definition at line 657 of file texture.c.
References BKE_curvemapping_free(), BLI_bvhtree_free(), PointDensity::coba, PointDensity::falloff_curve, MEM_freeN, NULL, PointDensity::point_data, and PointDensity::point_tree.
Referenced by BKE_texture_pointdensity_free(), and node_shader_free_tex_pointdensity().
| void BKE_texture_pointdensity_init_data | ( | PointDensity * | pd | ) |
Definition at line 606 of file texture.c.
References BKE_colorband_add(), BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_changed(), CurveMapping::clipr, CurveMapping::cm, PointDensity::coba, CUMA_EXTEND_EXTRAPOLATE, CURVE_PRESET_LINE, CURVEMAP_SLOPE_POSITIVE, PointDensity::falloff_curve, PointDensity::falloff_softness, PointDensity::falloff_type, CurveMapping::flag, PointDensity::flag, PointDensity::noise_depth, PointDensity::noise_fac, PointDensity::noise_influence, PointDensity::noise_size, NULL, PointDensity::object, PointDensity::point_data, PointDensity::point_tree, CurveMapping::preset, PointDensity::psys, PointDensity::psys_cache_space, PointDensity::radius, PointDensity::source, PointDensity::speed_scale, TEX_PD_FALLOFF_STD, TEX_PD_NOISE_STATIC, TEX_PD_PSYS, TEX_PD_WORLDSPACE, and PointDensity::totpoints.
Referenced by BKE_texture_pointdensity_add().
| void BKE_texture_type_set | ( | Tex * | tex, |
| int | type | ||
| ) |
Definition at line 499 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().
Definition at line 546 of file texture.c.
References Brush::mtex, and MTex::tex.
Referenced by texture_get_from_context().
| Tex* give_current_linestyle_texture | ( | FreestyleLineStyle * | linestyle | ) |
Definition at line 461 of file texture.c.
References linestyle, FreestyleLineStyle::mtex, NULL, tex, MTex::tex, and FreestyleLineStyle::texact.
Referenced by texture_get_from_context().
| Tex* give_current_particle_texture | ( | ParticleSettings * | part | ) |
Definition at line 563 of file texture.c.
References ParticleSettings::mtex, NULL, tex, MTex::tex, and ParticleSettings::texact.
| void set_active_mtex | ( | ID * | id, |
| short | act | ||
| ) |
Definition at line 551 of file texture.c.
References 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 476 of file texture.c.
References BKE_texture_mtex_add(), Tex::id, id_us_min(), id_us_plus(), linestyle, MEM_freeN, FreestyleLineStyle::mtex, NULL, MTex::tex, FreestyleLineStyle::texact, MTex::texco, and TEXCO_STROKE.
| void set_current_particle_texture | ( | ParticleSettings * | part, |
| Tex * | newtex | ||
| ) |
Definition at line 580 of file texture.c.
References BKE_texture_mtex_add(), MTex::blendtype, Tex::id, id_us_min(), id_us_plus(), MEM_freeN, ParticleSettings::mtex, MTEX_MUL, NULL, MTex::tex, ParticleSettings::texact, MTex::texco, and TEXCO_ORCO.
|
static |
Definition at line 177 of file texture.c.
References Tex::adt, BKE_animdata_blend_read_data(), BKE_previewimg_blend_read(), BLO_read_data_address, Tex::coba, Tex::iuser, NULL, ImageUser::ok, Tex::preview, ImageUser::scene, and tex.
|
static |
Definition at line 199 of file texture.c.
References BLO_expand, Tex::ima, and tex.
|
static |
|
static |
Definition at line 150 of file texture.c.
References Tex::adt, BKE_animdata_blend_write(), BKE_id_blend_write(), BKE_previewimg_blend_write(), BLO_write_id_struct, BLO_write_is_undo(), BLO_write_struct, Tex::coba, Tex::id, Tex::nodetree, ntreeBlendWrite(), Tex::preview, tex, and ID::us.
|
static |
Definition at line 85 of file texture.c.
References BKE_id_copy_ex(), BKE_previewimg_id_copy(), BKE_texture_is_image_user(), Tex::coba, bNodeTree::execdata, Tex::id, Tex::ima, LIB_ID_COPY_NO_PREVIEW, LIB_ID_CREATE_LOCAL, LIB_ID_CREATE_NO_ALLOCATE, MEM_dupallocN, Tex::nodetree, ntreeLocalize, ntreeTexEndExecTree(), NULL, and Tex::preview.
|
static |
Definition at line 140 of file texture.c.
References BKE_LIB_FOREACHID_PROCESS, BKE_library_foreach_ID_embedded(), data, and IDWALK_CB_USER.
|
static |
Definition at line 123 of file texture.c.
References BKE_icon_id_delete(), BKE_previewimg_free(), MEM_freeN, MEM_SAFE_FREE, ntreeFreeEmbeddedTree(), and NULL.
|
static |
Definition at line 74 of file texture.c.
References BKE_imageuser_default(), BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
Referenced by BKE_texture_default().
|
static |
Definition at line 753 of file texture.c.
References BKE_image_pool_acquire_ibuf(), LISTBASE_FOREACH, node, NODE_GROUP, bNodeTree::nodes, ntree, NULL, blender::compositor::pool, and SH_NODE_TEX_IMAGE.
Referenced by BKE_texture_fetch_images_for_pool().
| IDTypeInfo IDType_ID_TE |