Blender V2.61 - r43446
|
Go to the source code of this file.
Definition in file BKE_texture.h.
#define MAXCOLORBAND 32 |
Definition at line 59 of file BKE_texture.h.
Referenced by colorband_element_add(), colorband_flip_cb(), and init_colorband().
struct ColorMapping* add_color_mapping | ( | void | ) | [read] |
Definition at line 270 of file texture.c.
References default_color_mapping(), and MEM_callocN().
struct ColorBand* add_colorband | ( | int | rangetype | ) | [read] |
Definition at line 340 of file texture.c.
References init_colorband(), and MEM_callocN().
Referenced by BKE_add_pointdensity(), dynamicPaint_createType(), node_composit_init_valtorgb(), node_shader_init_valtorgb(), and valtorgb_init().
struct MTex* add_mtex | ( | void | ) | [read] |
Definition at line 762 of file texture.c.
References default_mtex(), and MEM_callocN().
Referenced by add_mtex_id(), DocumentImporter::create_texture(), set_current_lamp_texture(), set_current_material_texture(), set_current_particle_texture(), and set_current_world_texture().
Definition at line 774 of file texture.c.
References add_mtex(), give_active_mtex(), i, id_us_min(), MAX_MTEX, MEM_freeN(), and NULL.
struct PluginTex* add_plugin_tex | ( | char * | str | ) | [read] |
Definition at line 163 of file texture.c.
References BLI_strncpy(), PluginTex::data, VarStruct::def, PluginTex::doit, FLO, PluginTex::handle, PluginTex::instance_init, INT, MEM_callocN(), MEM_freeN(), PluginTex::name, NULL, open_plugin_tex(), VarStruct::type, PluginTex::vars, and PluginTex::varstr.
struct TexMapping* add_tex_mapping | ( | void | ) | [read] |
Definition at line 207 of file texture.c.
References default_tex_mapping(), and MEM_callocN().
Referenced by node_composit_init_map_value(), and node_shader_init_mapping().
struct Tex* add_texture | ( | const char * | name | ) | [read] |
Definition at line 682 of file texture.c.
References alloc_libblock(), default_tex(), G, ID_TE, and Main::tex.
Referenced by brush_texture_set_nr(), DocumentImporter::create_texture(), and new_texture_exec().
void autotexname | ( | struct Tex * | tex | ) |
Definition at line 1047 of file texture.c.
References BLI_splitdirstring(), BLI_strncpy(), FILE_MAXDIR, FILE_MAXFILE, G, Tex::ima, Image::name, new_id(), Tex::plugin, Main::tex, TEX_IMAGE, TEX_PLUGIN, Tex::type, and Tex::use_nodes.
struct EnvMap* BKE_add_envmap | ( | void | ) | [read] |
Definition at line 1358 of file texture.c.
References EnvMap::clipend, EnvMap::clipsta, EnvMap::cuberes, ENV_ANIM, ENV_CUBE, MEM_callocN(), EnvMap::stype, EnvMap::type, and EnvMap::viewscale.
Referenced by tex_set_type().
struct OceanTex* BKE_add_oceantex | ( | void | ) | [read] |
Definition at line 1529 of file texture.c.
References MEM_callocN(), NULL, OceanTex::object, OceanTex::output, and TEX_OCN_DISPLACEMENT.
Referenced by tex_set_type().
struct PointDensity* BKE_add_pointdensity | ( | void | ) | [read] |
Definition at line 1414 of file texture.c.
References add_colorband(), CurveMapping::clipr, CurveMapping::cm, PointDensity::coba, CUMA_EXTEND_EXTRAPOLATE, CURVE_PRESET_LINE, curvemap_reset(), CURVEMAP_SLOPE_POSITIVE, curvemapping_add(), curvemapping_changed(), PointDensity::falloff_curve, PointDensity::falloff_softness, PointDensity::falloff_type, CurveMap::flag, PointDensity::flag, MEM_callocN(), 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 tex_set_type().
struct VoxelData* BKE_add_voxeldata | ( | void | ) | [read] |
Definition at line 1499 of file texture.c.
References VoxelData::cachedframe, VoxelData::dataset, VoxelData::extend, VoxelData::file_format, VoxelData::int_multiplier, VoxelData::interp_type, MEM_callocN(), NULL, VoxelData::object, VoxelData::ok, VoxelData::resol, TEX_CLIP, TEX_VD_LINEAR, and TEX_VD_SMOKE.
Referenced by tex_set_type().
Definition at line 1375 of file texture.c.
References EnvMap::cube, id_us_plus(), EnvMap::ima, MEM_dupallocN(), NULL, and EnvMap::ok.
Referenced by copy_texture(), and localize_texture().
Definition at line 1540 of file texture.c.
References MEM_dupallocN().
Referenced by copy_texture(), and localize_texture().
struct PointDensity* BKE_copy_pointdensity | ( | struct PointDensity * | pd | ) | [read] |
Definition at line 1446 of file texture.c.
References PointDensity::coba, curvemapping_copy(), PointDensity::falloff_curve, MEM_dupallocN(), NULL, PointDensity::point_data, and PointDensity::point_tree.
Referenced by copy_texture(), and localize_texture().
Definition at line 1517 of file texture.c.
References VoxelData::dataset, MEM_dupallocN(), and NULL.
void BKE_free_envmap | ( | struct EnvMap * | env | ) |
Definition at line 1404 of file texture.c.
References BKE_free_envmapdata(), and MEM_freeN().
Referenced by free_texture().
void BKE_free_envmapdata | ( | struct EnvMap * | env | ) |
Definition at line 1390 of file texture.c.
References EnvMap::cube, IMB_freeImBuf(), NULL, and EnvMap::ok.
Referenced by BKE_free_envmap(), envmap_clear_all_exec(), envmap_clear_exec(), envmap_split_ima(), init_render_texture(), make_envmaps(), and render_envmap().
void BKE_free_oceantex | ( | struct OceanTex * | ot | ) |
void BKE_free_pointdensity | ( | struct PointDensity * | pd | ) |
Definition at line 1476 of file texture.c.
References BKE_free_pointdensitydata(), and MEM_freeN().
Referenced by free_texture().
void BKE_free_pointdensitydata | ( | struct PointDensity * | pd | ) |
Definition at line 1458 of file texture.c.
References BLI_bvhtree_free(), PointDensity::coba, curvemapping_free(), PointDensity::falloff_curve, MEM_freeN(), NULL, PointDensity::point_data, and PointDensity::point_tree.
Referenced by BKE_free_pointdensity().
void BKE_free_voxeldata | ( | struct VoxelData * | vd | ) |
Definition at line 1493 of file texture.c.
References BKE_free_voxeldatadata(), and MEM_freeN().
Referenced by free_texture().
void BKE_free_voxeldatadata | ( | struct VoxelData * | vd | ) |
Definition at line 1484 of file texture.c.
References VoxelData::dataset, MEM_freeN(), and NULL.
Referenced by BKE_free_voxeldata().
int BKE_texture_dependsOnTime | ( | const struct Tex * | texture | ) |
Definition at line 1554 of file texture.c.
References Tex::adt, ELEM, Tex::ima, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, Tex::plugin, Image::source, TEX_NOISE, and Tex::type.
Referenced by dependsOnTime().
Definition at line 481 of file texture.c.
References CBData::a, CBData::b, CBData::cur, ColorBand::cur, ColorBand::data, do_colorband(), CBData::g, MAXCOLORBAND, NULL, CBData::pos, CBData::r, ColorBand::tot, and vergcband().
Referenced by colorband_add_cb(), and ui_do_but_COLORBAND().
int colorband_element_remove | ( | struct ColorBand * | coba, |
int | index | ||
) |
Definition at line 521 of file texture.c.
References ColorBand::cur, ColorBand::data, and ColorBand::tot.
Referenced by colorband_del_cb().
void colorband_table_RGBA | ( | struct ColorBand * | coba, |
float ** | array, | ||
int * | size | ||
) |
Definition at line 461 of file texture.c.
References CM_TABLE, do_colorband(), MEM_callocN(), and size().
Referenced by do_colorband_blend(), and gpu_shader_valtorgb().
Definition at line 818 of file texture.c.
References BKE_copy_envmap(), BKE_copy_oceantex(), BKE_copy_pointdensity(), BKE_previewimg_copy(), Tex::coba, copy_libblock(), Tex::env, bNodeTree::execdata, Tex::id, id_us_plus(), Tex::ima, MEM_dupallocN(), Tex::nodetree, ntreeCopyTree(), ntreeTexEndExecTree(), NULL, open_plugin_tex(), Tex::ot, Tex::pd, Tex::plugin, Tex::preview, TEX_IMAGE, Tex::type, and Tex::vd.
Referenced by brush_texture_set_nr(), copy_object_set_idnew(), do_single_tex_user(), id_copy(), make_local_texture(), new_texture_exec(), and single_mat_users().
void default_color_mapping | ( | struct ColorMapping * | colormap | ) |
Definition at line 279 of file texture.c.
References ColorMapping::blend_color, ColorMapping::blend_factor, ColorMapping::blend_type, ColorMapping::bright, ColorMapping::coba, ColorMapping::contrast, init_colorband(), MA_RAMP_BLEND, and ColorMapping::saturation.
Referenced by add_color_mapping(), 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 default_mtex | ( | struct MTex * | mtex | ) |
Definition at line 696 of file texture.c.
References MTex::alphafac, MTex::ambfac, MTex::b, MTex::blendfac, MTex::blendtype, MTex::clumpfac, MTex::colemitfac, MTex::colfac, MTex::colormodel, MTex::colreflfac, MTex::colspecfac, MTex::coltransfac, MTex::dampfac, MTex::def_var, MTex::densfac, MTex::difffac, MTex::dispfac, MTex::emitfac, MTex::fieldfac, MTex::g, MTex::gravityfac, MTex::hardfac, MTex::ivelfac, MTex::k, MTex::kinkfac, MTex::lengthfac, MTex::lifefac, MAP_COL, MTex::mapping, MTex::mapto, MTex::mirrfac, MTEX_3TAP_BUMP, MTEX_BLEND, MTEX_BUMP_OBJECTSPACE, MTEX_FLAT, MTEX_NSPACE_TANGENT, MTex::norfac, MTex::normapspace, NULL, MTex::object, MTex::ofs, MTex::padensfac, PROJ_X, PROJ_Y, PROJ_Z, MTex::projx, MTex::projy, MTex::projz, MTex::r, MTex::raymirrfac, MTex::reflfac, MTex::roughfac, MTex::scatterfac, MTex::shadowfac, MTex::size, MTex::sizefac, MTex::specfac, MTex::tex, MTex::texco, TEXCO_ORCO, MTex::texflag, MTex::timefac, MTex::translfac, MTex::varfac, MTex::zendownfac, and MTex::zenupfac.
Referenced by add_mtex(), brush_set_defaults(), and do_versions().
void default_tex | ( | struct Tex * | tex | ) |
Definition at line 564 of file texture.c.
References Tex::afmax, Tex::bfac, Tex::bright, EnvMap::clipend, EnvMap::clipsta, Tex::contrast, Tex::cropxmax, Tex::cropxmin, Tex::cropymax, Tex::cropymin, EnvMap::cuberes, PluginTex::data, VarStruct::def, EnvMap::depth, Tex::dist_amount, Tex::env, ENV_ANIM, Tex::extend, PointDensity::falloff_type, ImageUser::fie_ima, Tex::fie_ima, VoxelData::file_format, Tex::filtersize, Tex::flag, ImageUser::frames, Tex::frames, Tex::gfac, Tex::imaflag, VoxelData::interp_type, Tex::iuser, Tex::mg_gain, Tex::mg_H, Tex::mg_lacunarity, Tex::mg_octaves, Tex::mg_offset, Tex::nabla, Tex::noisebasis, Tex::noisebasis2, Tex::noisedepth, Tex::noisesize, Tex::ns_outscale, NULL, OceanTex::object, Tex::offset, ImageUser::ok, Tex::ot, OceanTex::output, Tex::pd, Tex::plugin, Tex::preview, PointDensity::radius, VoxelData::resol, Tex::rfac, Tex::saturation, ImageUser::sfra, Tex::sfra, EnvMap::stype, Tex::stype, TEX_CHECKER_ODD, TEX_CLOUDS, TEX_INTERPOL, TEX_MIPMAP, TEX_OCN_DISPLACEMENT, TEX_PD_FALLOFF_STD, TEX_REPEAT, TEX_USEALPHA, TEX_VD_LINEAR, TEX_VD_SMOKE, Tex::texfilter, Tex::turbul, TXF_EWA, Tex::type, PluginTex::vars, PluginTex::varstr, Tex::vd, Tex::vn_coltype, Tex::vn_distm, Tex::vn_mexp, Tex::vn_w1, Tex::vn_w2, Tex::vn_w3, Tex::vn_w4, Tex::xrepeat, and Tex::yrepeat.
Referenced by add_texture(), ProcDef(), and render_realtime_texture().
void default_tex_mapping | ( | struct TexMapping * | texmap | ) |
Definition at line 216 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, and unit_m4().
Referenced by add_tex_mapping(), 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().
int do_colorband | ( | const struct ColorBand * | coba, |
float | in, | ||
float | out[4] | ||
) |
Referenced by add_to_diffuse(), colorband_element_add(), colorband_table_RGBA(), do_colorband_composit(), do_specular_ramp(), dynamicPaint_paintMesh(), dynamicPaint_paintSinglePoint(), dynamicPaint_updatePointData(), multitex(), node_composit_exec_valtorgb(), node_shader_exec_valtorgb(), pointdensitytex(), ramp_diffuse_result(), ramp_spec_result(), tex_normal_derivate(), ui_draw_but_COLORBAND(), valtorgb_colorfn(), and weightpaint_color().
void free_plugin_tex | ( | struct PluginTex * | pit | ) |
Definition at line 197 of file texture.c.
References MEM_freeN(), and NULL.
Referenced by free_texture().
void free_texture | ( | struct Tex * | t | ) |
Definition at line 541 of file texture.c.
References BKE_free_animdata(), BKE_free_envmap(), BKE_free_oceantex(), BKE_free_pointdensity(), BKE_free_voxeldata(), BKE_icon_delete(), BKE_previewimg_free(), Tex::coba, Tex::env, free_plugin_tex(), ID::icon_id, MEM_freeN(), ntreeFreeTree(), Tex::ot, Tex::pd, Tex::plugin, and Tex::vd.
Referenced by free_libblock(), RE_free_sample_material(), and shader_preview_free().
Definition at line 1304 of file texture.c.
References Brush::mtex, and MTex::tex.
Referenced by buttons_context_path_texture(), and snode_set_context().
Definition at line 1101 of file texture.c.
References Lamp::mtex, NULL, MTex::tex, and Lamp::texact.
Referenced by buttons_context_path_texture(), and give_current_object_texture().
Definition at line 1144 of file texture.c.
References bNode::id, ID_TE, Material::mtex, nodeGetActiveID(), Material::nodetree, NULL, MTex::tex, Material::texact, and Material::use_nodes.
Referenced by buttons_context_path_texture(), get_driver_path_hack(), give_current_object_texture(), and mesh_noise_exec().
Definition at line 1136 of file texture.c.
References ID_TE, nodeGetActiveID(), Material::nodetree, NULL, and Material::use_nodes.
Referenced by buttons_context(), and buttons_context_path_material().
Definition at line 1079 of file texture.c.
References Object::actcol, Object::data, give_current_lamp_texture(), give_current_material(), give_current_material_texture(), give_node_material(), NULL, OB_LAMP, Object::totcol, and Object::type.
Referenced by snode_set_context().
struct Tex* give_current_particle_texture | ( | struct ParticleSettings * | part | ) | [read] |
Definition at line 1320 of file texture.c.
References ParticleSettings::mtex, NULL, MTex::tex, and ParticleSettings::texact.
Referenced by buttons_context_path_texture().
Definition at line 1269 of file texture.c.
References World::mtex, NULL, MTex::tex, and World::texact.
Referenced by buttons_context_path_texture(), and snode_set_context().
int has_current_material_texture | ( | struct Material * | ma | ) |
Definition at line 1255 of file texture.c.
References ID_TE, nodeGetActiveID(), Material::nodetree, NULL, and Material::use_nodes.
void init_colorband | ( | struct ColorBand * | coba, |
int | rangetype | ||
) |
Definition at line 298 of file texture.c.
References CBData::a, CBData::b, ColorBand::data, CBData::g, MAXCOLORBAND, CBData::pos, CBData::r, and ColorBand::tot.
Referenced by add_colorband(), default_color_mapping(), and init_userdef_do_versions().
void init_tex_mapping | ( | struct TexMapping * | texmap | ) |
Definition at line 230 of file texture.c.
References copy_m4_m3(), copy_v3_v3(), eul_to_mat3(), TexMapping::flag, is_one_v3(), is_zero_v3(), TexMapping::loc, TexMapping::mat, mul_m3_m3m3(), PROJ_N, PROJ_X, PROJ_Y, PROJ_Z, TexMapping::projx, TexMapping::projy, TexMapping::projz, TexMapping::rot, TexMapping::size, size_to_mat3(), TEXMAP_UNIT_MATRIX, unit_m4(), and zero_m3().
Definition at line 849 of file texture.c.
References BKE_copy_envmap(), BKE_copy_oceantex(), BKE_copy_pointdensity(), BLI_remlink(), Tex::coba, copy_libblock(), VoxelData::dataset, Tex::env, G, Image::id, Tex::id, id_us_min(), EnvMap::ima, MEM_dupallocN(), Tex::nodetree, ntreeLocalize(), NULL, open_plugin_tex(), Tex::ot, Tex::pd, Tex::plugin, Tex::preview, and Tex::vd.
Referenced by preview_prepare_scene(), and RE_init_sample_material().
void make_local_texture | ( | struct Tex * | tex | ) |
Definition at line 895 of file texture.c.
References BKE_id_lib_local_paths(), Main::brush, copy_texture(), extern_local_texture(), FALSE, ListBase::first, G, ParticleSettings::id, Brush::id, World::id, Lamp::id, Material::id, Tex::id, id_clear_lib_data(), Main::lamp, ID::lib, Main::mat, MAX_MTEX, ParticleSettings::mtex, Brush::mtex, World::mtex, Lamp::mtex, Material::mtex, ID::next, NULL, Main::particle, MTex::tex, TRUE, ID::us, and Main::world.
Referenced by id_make_local().
void open_plugin_tex | ( | struct PluginTex * | pit | ) |
Definition at line 94 of file texture.c.
References BLI_dynlib_find_symbol(), BLI_dynlib_get_error_as_string(), BLI_dynlib_open(), _PluginInfo::callback, PluginTex::callback, _PluginInfo::cfra, PluginTex::cfra, PluginTex::doit, PluginTex::handle, _PluginInfo::init, _PluginInfo::instance_init, PluginTex::instance_init, MEM_freeN(), MEM_mallocN(), _PluginInfo::name, PluginTex::name, NULL, _PluginInfo::nvars, PluginTex::pname, _PluginInfo::result, PluginTex::result, _PluginInfo::snames, PluginTex::stnames, _PluginInfo::stypes, PluginTex::stypes, test_dlerr(), _PluginInfo::tex_doit, PluginTex::vars, _PluginInfo::varstr, PluginTex::varstr, and PluginTex::version.
Referenced by add_plugin_tex(), copy_texture(), direct_link_texture(), and localize_texture().
void set_active_mtex | ( | struct ID * | id, |
short | act | ||
) |
Definition at line 1309 of file texture.c.
References Tex::id, id_us_min(), id_us_plus(), Brush::mtex, and MTex::tex.
Definition at line 1114 of file texture.c.
References add_mtex(), Tex::id, id_us_min(), id_us_plus(), MEM_freeN(), Lamp::mtex, NULL, MTex::tex, Lamp::texact, MTex::texco, and TEXCO_GLOB.
Definition at line 1219 of file texture.c.
References add_mtex(), Tex::id, bNode::id, ID_TE, id_us_min(), id_us_plus(), MEM_freeN(), Material::mtex, nodeGetActiveID(), Material::nodetree, NULL, MTex::tex, Material::texact, and Material::use_nodes.
void set_current_particle_texture | ( | struct ParticleSettings * | part, |
struct Tex * | tex | ||
) |
Definition at line 1333 of file texture.c.
References add_mtex(), 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.
Definition at line 1282 of file texture.c.
References add_mtex(), Tex::id, id_us_min(), id_us_plus(), MEM_freeN(), World::mtex, NULL, MTex::tex, World::texact, MTex::texco, and TEXCO_VIEW.
int test_dlerr | ( | const char * | name, |
const char * | symbol | ||
) |
Definition at line 79 of file texture.c.
References BLI_dynlib_get_error_as_string(), err, and NULL.
Referenced by open_plugin_seq(), and open_plugin_tex().
void tex_set_type | ( | struct Tex * | tex, |
int | type | ||
) |
Definition at line 655 of file texture.c.
References BKE_add_envmap(), BKE_add_oceantex(), BKE_add_pointdensity(), BKE_add_voxeldata(), Tex::env, NULL, Tex::ot, Tex::pd, TEX_ENVMAP, TEX_OCEAN, TEX_POINTDENSITY, TEX_VOXELDATA, Tex::type, and Tex::vd.
int vergcband | ( | const void * | a1, |
const void * | a2 | ||
) |
Definition at line 472 of file texture.c.
References CBData::pos.
Referenced by colorband_element_add().