|
Blender V5.0
|
#include <algorithm>#include <cmath>#include <cstring>#include <optional>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_ID.h"#include "DNA_curve_types.h"#include "DNA_curves_types.h"#include "DNA_customdata_types.h"#include "DNA_defaults.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_grease_pencil_types.h"#include "DNA_material_types.h"#include "DNA_meta_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_particle_types.h"#include "DNA_pointcloud_types.h"#include "DNA_scene_types.h"#include "DNA_userdef_types.h"#include "DNA_volume_types.h"#include "BLI_array_utils.h"#include "BLI_listbase.h"#include "BLI_math_color.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_anim_data.hh"#include "BKE_brush.hh"#include "BKE_curve.hh"#include "BKE_curves.hh"#include "BKE_displist.h"#include "BKE_editmesh.hh"#include "BKE_grease_pencil.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_main.hh"#include "BKE_material.hh"#include "BKE_mesh.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "BKE_node_runtime.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "BKE_preview_image.hh"#include "BKE_scene.hh"#include "BKE_vfont.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "DEG_depsgraph_query.hh"#include "GPU_material.hh"#include "NOD_shader.h"#include "BLO_read_write.hh"Go to the source code of this file.
Classes | |
| struct | FillTexPaintSlotsData |
| struct | FindTexPaintNodeData |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
Typedefs | |
| using | ForEachTexNodeCallback = bool (*)(bNode *node, void *userdata) |
Enumerations | |
| enum | ePaintSlotFilter { PAINT_SLOT_IMAGE = 1 << 0 , PAINT_SLOT_COLOR_ATTRIBUTE = 1 << 1 } |
Variables | |
| static CLG_LogRef | LOG = {"material"} |
| IDTypeInfo | IDType_ID_MA |
| static Material * | default_material_empty = nullptr |
| static Material * | default_material_holdout = nullptr |
| static Material * | default_material_surface = nullptr |
| static Material * | default_material_volume = nullptr |
| static Material * | default_material_gpencil = nullptr |
| static Material ** | default_materials [] |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 19 of file blenkernel/intern/material.cc.
| using ForEachTexNodeCallback = bool (*)(bNode *node, void *userdata) |
Definition at line 1530 of file blenkernel/intern/material.cc.
| enum ePaintSlotFilter |
Bitwise filter for updating paint slots.
| Enumerator | |
|---|---|
| PAINT_SLOT_IMAGE | |
| PAINT_SLOT_COLOR_ATTRIBUTE | |
Definition at line 1524 of file blenkernel/intern/material.cc.
Definition at line 945 of file blenkernel/intern/material.cc.
References BKE_material_default_gpencil(), and BKE_object_material_get().
Referenced by blender::ed::greasepencil::grease_pencil_material_reveal_exec(), and blender::ed::greasepencil::material_isolate_exec().
Definition at line 326 of file blenkernel/intern/material.cc.
References BKE_gpencil_material_attr_init(), BKE_material_add(), and name.
Referenced by BKE_grease_pencil_object_material_new(), BLO_update_defaults_startup_blend(), and new_material_exec().
| void BKE_gpencil_material_attr_init | ( | Material * | ma | ) |
Definition at line 277 of file blenkernel/intern/material.cc.
References ARRAY_SET_ITEMS, MaterialGPencilStyle::fill_rgba, MaterialGPencilStyle::flag, GP_MATERIAL_STROKE_SHOW, Material::gp_style, MEM_callocN(), MaterialGPencilStyle::mix_factor, MaterialGPencilStyle::mix_rgba, MaterialGPencilStyle::stroke_rgba, MaterialGPencilStyle::texture_offset, MaterialGPencilStyle::texture_pixsize, and MaterialGPencilStyle::texture_scale.
Referenced by BKE_gpencil_material_add(), BKE_gpencil_material_settings(), and material_default_gpencil_init().
| MaterialGPencilStyle * BKE_gpencil_material_settings | ( | Object * | ob, |
| short | act ) |
Definition at line 957 of file blenkernel/intern/material.cc.
References BKE_gpencil_material_attr_init(), BKE_material_default_gpencil(), BKE_object_material_get(), and Material::gp_style.
Referenced by blender::draw::overlay::GreasePencil::draw_grease_pencil(), blender::draw::gpencil::gpencil_material_pool_create(), blender::draw::gpencil::gpencil_object_cache_add(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::ed::greasepencil::material_isolate_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::skip_strokes_with_locked_material(), and blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser().
Definition at line 599 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_sync_length_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_SYNC_TO_EVAL, id_us_plus(), MEM_calloc_arrayN(), and MEM_freeN().
Definition at line 405 of file blenkernel/intern/material.cc.
References BLI_assert, GS, ID_CU_LEGACY, ID_CV, ID_GD_LEGACY, ID_GP, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, and OB_DATA_SUPPORT_ID.
Referenced by blender::ed::object::add_grease_pencil_materials_for_conversion(), blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_eval_assign(), BKE_id_material_pop(), BKE_id_material_resize(), BKE_id_materials_copy(), BKE_object_material_from_eval_data(), BKE_object_material_get_eval(), blender::ed::object::copy_materials_to_new_geometry_object(), and mesh_separate_material_assign_mat_nr().
Definition at line 1077 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_sync_length_all(), DEG_id_tag_update(), DEG_relations_tag_update(), Material::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, id_us_min(), id_us_plus(), MAXMAT, MEM_calloc_arrayN(), and MEM_freeN().
Definition at line 661 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_sync_length_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_SYNC_TO_EVAL, id_us_min(), material_data_index_clear_id(), and MEM_freeN().
Referenced by mesh_separate_material_assign_mat_nr().
Definition at line 869 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BLI_assert, BLI_assert_unreachable, ELEM, i, and MEM_reallocN.
Referenced by blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), BKE_id_material_eval_ensure_default_slot(), blender::geometry::execute_realize_mesh_tasks(), and blender::nodes::node_geo_set_material_cc::node_geo_exec().
| void BKE_id_material_eval_ensure_default_slot | ( | ID * | id | ) |
Add an empty material slot if the id has no material slots. This material slot allows the material to be overwritten by object-linked materials.
Definition at line 896 of file blenkernel/intern/material.cc.
References BKE_id_material_eval_assign(), and BKE_id_material_len_p().
Referenced by blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::nodes::node_geo_grid_to_mesh_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_cone_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_cube_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_cylinder_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_grid_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_line_cc::node_geo_exec(), and blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_geo_exec().
| std::optional< int > BKE_id_material_index_max_eval | ( | const ID & | id | ) |
Returns the maximum material index used by the geometry. This returns zero if the geometry is empty or if all material indices are negative.
Definition at line 822 of file blenkernel/intern/material.cc.
References BLI_assert_unreachable, GS, ID_CU_LEGACY, ID_CV, ID_GD_LEGACY, ID_GP, ID_MB, ID_ME, ID_PT, ID_VO, and name.
Referenced by BKE_id_material_used_eval(), and BKE_id_material_used_with_fallback_eval().
| short * BKE_id_material_len_p | ( | ID * | id | ) |
Definition at line 433 of file blenkernel/intern/material.cc.
References BLI_assert, GS, ID_CU_LEGACY, ID_CV, ID_GD_LEGACY, ID_GP, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, and OB_DATA_SUPPORT_ID.
Referenced by blender::ed::object::add_grease_pencil_materials_for_conversion(), blender::ed::object::add_type_with_obdata(), blender::nodes::node_geo_set_material_cc::assign_material_to_id_geometry(), BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_eval_assign(), BKE_id_material_eval_ensure_default_slot(), BKE_id_material_pop(), BKE_id_material_resize(), BKE_id_materials_copy(), BKE_object_material_count_eval(), BKE_object_material_count_eval(), BKE_object_material_from_eval_data(), BKE_object_material_get_eval(), BKE_object_materials_sync_length(), BKE_objects_materials_sync_length_all(), blender::ed::object::copy_materials_to_new_geometry_object(), and mesh_separate_material_assign_mat_nr().
Definition at line 623 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_sync_length_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_SYNC_TO_EVAL, id_us_min(), material_data_index_remove_id(), MEM_freeN(), MEM_reallocN, and ret.
Definition at line 564 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), DEG_id_tag_update(), DEG_relations_tag_update(), i, ID_RECALC_SYNC_TO_EVAL, id_us_min(), MEM_freeN(), and MEM_recallocN.
Referenced by BKE_object_materials_sync_length(), and mesh_separate_material_assign_mat_nr().
| int BKE_id_material_used_eval | ( | const ID & | id | ) |
Returns how many material slots the geometry may use (based on the maximum material index).
Definition at line 849 of file blenkernel/intern/material.cc.
References BKE_id_material_index_max_eval().
Referenced by blender::ed::object::copy_materials_to_new_geometry_object().
| int BKE_id_material_used_with_fallback_eval | ( | const ID & | id | ) |
Gets the number of material slots used by the geometry. The corresponding material for each slot can be retrieved with BKE_object_material_get_eval.
These two functions give the same result when the mesh is provided itself, or an object that uses the mesh.
NOTE: This may be higher or lower than the number of material slots on the object or object-data. However, it is always at least 1 (the fallback).
Definition at line 857 of file blenkernel/intern/material.cc.
References BKE_id_material_index_max_eval().
Referenced by BKE_object_material_used_with_fallback_eval(), blender::draw::mesh_batch_cache_init(), blender::draw::mesh_batch_cache_valid(), blender::draw::pointcloud_batch_cache_init(), and blender::draw::pointcloud_batch_cache_valid().
Definition at line 543 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_SYNC_TO_EVAL, id_us_plus(), and MEM_dupallocN().
Referenced by BKE_mesh_to_pointcloud(), BKE_pointcloud_to_mesh(), and blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil().
Definition at line 317 of file blenkernel/intern/material.cc.
References BKE_id_new(), and name.
Referenced by blender::io::usd::USDMaterialReader::add_material(), blender::io::alembic::utils::assign_materials(), BKE_gpencil_material_add(), get_or_create_current_material(), blender::io::obj::get_or_create_material(), Freestyle::BlenderStrokeRenderer::GetStrokeShader(), blender::bke::tests::IDSubDataTestData::IDSubDataTestData(), blender::io::fbx::import_material(), blender::bke::tests::MaterialTestData::MaterialTestData(), new_material_exec(), blender::animrig::tests::KeyframingTest::SetUp(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
| Material * BKE_material_default_empty | ( | ) |
Definition at line 2147 of file blenkernel/intern/material.cc.
References default_material_empty.
Referenced by blender::workbench::Instance::get_material().
| Material * BKE_material_default_gpencil | ( | ) |
Definition at line 2167 of file blenkernel/intern/material.cc.
References default_material_gpencil.
Referenced by BKE_gpencil_material(), BKE_gpencil_material_settings(), BKE_grease_pencil_object_material_ensure_from_brush(), and blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer().
| Material * BKE_material_default_holdout | ( | ) |
Definition at line 2152 of file blenkernel/intern/material.cc.
References default_material_holdout.
| Material * BKE_material_default_surface | ( | ) |
Definition at line 2157 of file blenkernel/intern/material.cc.
References default_material_surface.
Referenced by ED_node_shader_default(), and blender::eevee::MaterialModule::MaterialModule().
| Material * BKE_material_default_volume | ( | ) |
Definition at line 2162 of file blenkernel/intern/material.cc.
References default_material_volume.
Referenced by ED_node_shader_default(), and blender::eevee::MaterialModule::MaterialModule().
| void BKE_material_defaults_free_gpu | ( | void | ) |
Definition at line 2172 of file blenkernel/intern/material.cc.
| void BKE_material_eval | ( | Depsgraph * | depsgraph, |
| Material * | material ) |
Definition at line 2033 of file blenkernel/intern/material.cc.
References DEG_debug_print_eval(), depsgraph, GPU_material_free(), Material::gpumaterial, Material::id, and ID::name.
| void BKE_material_make_node_previews_dirty | ( | Material * | ma | ) |
Definition at line 310 of file blenkernel/intern/material.cc.
References Material::nodetree, and nodetree_mark_previews_dirty_reccursive().
Referenced by ED_render_engine_changed().
| void BKE_materials_exit | ( | ) |
Definition at line 2199 of file blenkernel/intern/material.cc.
References BKE_id_free(), default_materials, i, and Material::id.
Referenced by blender::bke::tests::LibQueryTest::TearDownTestSuite(), blender::bke::tests::LibRemapTest::TearDownTestSuite(), blender::nodes::tests::BundleTest::TearDownTestSuite(), blender::nodes::tests::NodeTest::TearDownTestSuite(), and WM_exit_ex().
| void BKE_materials_init | ( | ) |
Definition at line 2184 of file blenkernel/intern/material.cc.
References BLI_assert_msg, default_material_empty, default_material_gpencil, default_material_holdout, default_material_surface, default_material_volume, default_materials, i, material_default_create(), material_default_gpencil_init(), material_default_holdout_init(), material_default_surface_init(), and material_default_volume_init().
Referenced by main(), blender::bke::tests::LibQueryTest::SetUpTestSuite(), blender::bke::tests::LibRemapTest::SetUpTestSuite(), blender::nodes::tests::BundleTest::SetUpTestSuite(), and blender::nodes::tests::NodeTest::SetUpTestSuite().
| void BKE_object_material_array_assign | ( | Main * | bmain, |
| Object * | ob, | ||
| Material *** | matar, | ||
| int | totcol, | ||
| bool | to_object_only ) |
Definition at line 1345 of file blenkernel/intern/material.cc.
References Object::actcol, BKE_MAT_ASSIGN_OBJECT, BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_slot_remove(), i, Object::matbits, and Object::totcol.
Referenced by ED_grease_pencil_join_objects_exec(), blender::ed::greasepencil::grease_pencil_separate_layer(), blender::ed::greasepencil::grease_pencil_separate_material(), blender::ed::greasepencil::grease_pencil_separate_selected(), material_slot_copy_exec(), mesh_separate_arrays(), and mesh_separate_tagged().
Definition at line 339 of file blenkernel/intern/material.cc.
References Object::data, ELEM, Curve::mat, Curves::mat, Mesh::mat, MetaBall::mat, PointCloud::mat, Volume::mat, GreasePencil::material_array, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_duplicate(), BKE_object_material_get_p(), BKE_object_material_remap(), BKE_object_material_slot_find_index(), BKE_object_material_slot_remove(), blender::deg::DepsgraphNodeBuilder::build_object_data(), blender::deg::DepsgraphRelationBuilder::build_object_data(), blender::ed::greasepencil::grease_pencil_separate_layer(), blender::ed::greasepencil::grease_pencil_separate_material(), blender::ed::greasepencil::grease_pencil_separate_selected(), blender::ed::object::make_local_exec(), material_slot_copy_exec(), mesh_separate_arrays(), mesh_separate_tagged(), object_material_assign(), blender::ed::space_node::preview_prepare_scene(), preview_prepare_scene(), and similar_face_select_exec().
| void BKE_object_material_assign | ( | Main * | bmain, |
| Object * | ob, | ||
| Material * | ma, | ||
| short | act, | ||
| int | assign_type ) |
Definition at line 1222 of file blenkernel/intern/material.cc.
References object_material_assign().
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_object_material_new(), BKE_object_material_array_assign(), BKE_object_material_ensure(), BKE_object_material_slot_add(), blender::ed::object::drop_named_material_invoke(), get_or_create_current_material(), grease_pencil_object_material_ensure_from_brush_pinned(), blender::bke::tests::IDSubDataTestData::IDSubDataTestData(), blender::ed::object::make_links_data_exec(), blender::ed::outliner::material_drop_invoke(), blender::animrig::tests::KeyframingTest::SetUp(), blender::ed::object::single_mat_users(), and ui_drop_material_exec().
| void BKE_object_material_assign_single_obdata | ( | Main * | bmain, |
| Object * | ob, | ||
| Material * | ma, | ||
| short | act ) |
Similar to BKE_object_material_assign with BKE_MAT_ASSIGN_OBDATA type, but does not scan whole Main for other usages of the same obdata. Only use in cases where you know that the object's obdata is only used by this one object.
Definition at line 1227 of file blenkernel/intern/material.cc.
References BKE_MAT_ASSIGN_OBDATA, and object_material_assign().
Referenced by blender::io::alembic::utils::assign_materials(), and blender::io::usd::utils::assign_materials().
Same as above but allows using a custom ID as data instead of Object.data.
Definition at line 811 of file blenkernel/intern/material.cc.
References BKE_id_material_len_p(), BLI_assert, data, Object::data, DEG_is_evaluated(), OB_EMPTY, Object::totcol, and Object::type.
| int BKE_object_material_count_eval | ( | const Object * | ob | ) |
Gets the number of material slots on the evaluated object. This is the maximum of the number of material slots on the object and geometry.
Definition at line 799 of file blenkernel/intern/material.cc.
References BKE_id_material_len_p(), BLI_assert, Object::data, DEG_is_evaluated(), get_evaluated_object_data_with_materials(), OB_EMPTY, Object::totcol, and Object::type.
Referenced by BKE_object_material_get_eval(), blender::draw::sculpt_batches_get_ex(), blender::io::hydra::CurvesData::write_materials(), and blender::io::hydra::VolumeData::write_materials().
Definition at line 931 of file blenkernel/intern/material.cc.
References BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_index_get(), BKE_object_material_slot_add(), and Object::totcol.
Referenced by blender::ed::greasepencil::clipboard_materials_remap(), and blender::ed::greasepencil::grease_pencil_material_copy_to_object_exec().
Copy materials from evaluated geometry to the original geometry of an object.
Definition at line 1310 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_object_materials_sync_length(), Object::data, DEG_get_original(), ELEM, i, Material::id, id_us_min(), id_us_plus(), MEM_calloc_arrayN(), and MEM_SAFE_FREE.
Referenced by blender::ed::object::apply_grease_pencil_for_modifier(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::object::convert_curves_component_to_curves(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_curves_to_mesh(), blender::ed::object::convert_grease_pencil_component_to_curves(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::ed::object::convert_mesh_to_mesh(), blender::ed::object::modifier_apply_obdata(), and blender::ed::geometry::store_result_geometry().
Definition at line 725 of file blenkernel/intern/material.cc.
References BKE_object_material_get_p(), Material::gp_style, OB_GREASE_PENCIL, and Object::type.
Referenced by blender::ed::greasepencil::add_materials_to_map(), animdata_filter_ds_materials(), blender::io::usd::USDCurvesWriter::assign_materials(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::ed::object::bake_object_check(), BKE_gpencil_material(), BKE_gpencil_material_settings(), BKE_grease_pencil_object_material_ensure_by_name(), BKE_grease_pencil_object_material_ensure_from_brush(), BKE_grease_pencil_object_material_from_brush_get(), BKE_grease_pencil_object_material_index_get_by_name(), BKE_object_material_index_get(), BKE_object_material_index_get_with_hint(), BKE_object_material_remap_calc(), BKE_texpaint_slots_refresh_object(), buttons_context_path_material(), blender::ed::greasepencil::GreasePencilPenToolOperation::can_create_new_curve(), blender::ed::greasepencil::image_render::draw_grease_pencil_strokes(), blender::ed::object::drop_named_material_tooltip(), ED_object_assign_active_image(), ED_object_get_active_image(), ED_object_texture_paint_mode_enter_ex(), ED_paint_proj_mesh_data_check(), blender::ui::greasepencil::eyedropper_add_material(), eyedropper_cryptomatte_sample_view3d_fl(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::bke::paint::canvas::get_active_slot(), blender::ed::sculpt_paint::canvas::get_active_slot(), blender::ed::greasepencil::get_boundary_bounds(), blender::ed::space_node::get_context_path_node_shader(), get_default_texture_layer_name_for_object(), blender::ed::greasepencil::get_fill_material_indices(), blender::modifier::greasepencil::get_grease_pencil_material_passes(), blender::ed::greasepencil::get_hidden_material_indices(), blender::ed::greasepencil::get_locked_material_indices(), get_or_create_current_material(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::sculpt_paint::grease_pencil_fill_invoke(), blender::ed::greasepencil::grease_pencil_material_copy_to_object_exec(), blender::ed::greasepencil::grease_pencil_material_hide_exec(), blender::ed::greasepencil::grease_pencil_material_lock_all_exec(), blender::ed::greasepencil::grease_pencil_material_lock_unselected_exec(), blender::ed::greasepencil::grease_pencil_material_lock_unused_exec(), blender::ed::greasepencil::grease_pencil_material_unlock_all_exec(), imapaint_pick_uv(), CryptomatteSession::init(), Freestyle::BlenderFileLoader::insertShapeNode(), blender::ed::mesh::join_materials(), lineart_load_tri_task(), blender::ed::object::make_links_data_exec(), blender::ed::greasepencil::material_enum_itemf(), material_slot_assign_exec(), material_slot_de_select(), blender::ed::object::mesh_to_grease_pencil_get_material_list(), blender::modify_fill_color(), blender::modify_fill_color(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::ed::object::object_grease_pencil_add_exec(), blender::ed::object::object_select_all_by_material(), blender::ed::object::object_select_linked_exec(), paint_sample_color(), proj_paint_state_mesh_eval_init(), psys_cache_paths(), psys_get_particle_on_path(), psys_thread_context_init(), shader_get_from_context(), blender::ed::object::single_mat_users(), texture_paint_add_texture_paint_slot_invoke(), and versioning_eevee_shadow_settings().
Same as above, but uses the given geometry data instead of ob.data. This is useful for instances. The alternative is to use BKE_object_replace_data_on_shallow_copy which is more hacky.
Definition at line 759 of file blenkernel/intern/material.cc.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_object_material_count_eval(), BLI_assert, clamp_i(), data, DEG_is_evaluated(), Object::mat, Object::matbits, and Object::totcol.
On evaluated objects the number of materials on an object and its data might go out of sync. This is because during evaluation materials can be added/removed on the object data.
For rendering or exporting we generally use the materials on the object data. However, some material indices might be overwritten by the object.
Definition at line 753 of file blenkernel/intern/material.cc.
References BKE_object_material_get_eval(), data, and get_evaluated_object_data_with_materials().
Referenced by BKE_object_material_get_eval(), blender::ed::object::copy_materials_to_new_geometry_object(), ED_object_get_active_image(), blender::workbench::Instance::get_material(), lineart_identify_corner_tri_feature_edges(), blender::draw::overlay::Particles::object_sync(), blender::io::obj::OBJMesh::OBJMesh(), blender::io::hydra::CurvesData::write_materials(), blender::io::hydra::MeshData::write_materials(), and blender::io::hydra::VolumeData::write_materials().
Definition at line 684 of file blenkernel/intern/material.cc.
References BKE_object_material_array_p(), BKE_object_material_len_p(), clamp_i(), Object::mat, Object::matbits, and Object::totcol.
Referenced by BKE_object_material_get(), and new_material_exec().
Definition at line 907 of file blenkernel/intern/material.cc.
References BKE_object_material_get(), BKE_object_material_len_p(), and i.
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), bake_strokes(), BKE_object_material_ensure(), BKE_object_material_index_get_with_hint(), blender::generate_strokes(), blender::modifier::greasepencil::get_filtered_stroke_mask(), blender::ed::sculpt_paint::grease_pencil_fill_init(), grease_pencil_object_material_ensure_from_brush_pinned(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::greasepencil::grease_pencil_stroke_material_set_exec(), blender::modify_drawing(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin(), and blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done().
A version of BKE_object_material_index_get that takes an index to test first.
| hint_index | When this index is in a valid range, test it first. Useful when an active-index is preferred but may not match the material. |
Definition at line 920 of file blenkernel/intern/material.cc.
References BKE_object_material_get(), BKE_object_material_index_get(), and BKE_object_material_len_p().
Referenced by material_slot_de_select().
| short * BKE_object_material_len_p | ( | Object * | ob | ) |
Definition at line 372 of file blenkernel/intern/material.cc.
References Object::data, ELEM, GreasePencil::material_array_num, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, Curve::totcol, Curves::totcol, Mesh::totcol, MetaBall::totcol, PointCloud::totcol, Volume::totcol, and Object::type.
Referenced by blender::ed::greasepencil::active_grease_pencil_material_poll(), blender::ed::greasepencil::add_materials_to_map(), BKE_grease_pencil_object_material_index_get_by_name(), BKE_object_material_get_p(), BKE_object_material_index_get(), BKE_object_material_index_get_with_hint(), BKE_object_material_remap(), BKE_object_material_slot_find_index(), BKE_object_material_slot_remove(), blender::deg::DepsgraphNodeBuilder::build_object_data(), blender::deg::DepsgraphRelationBuilder::build_object_data(), blender::ui::greasepencil::eyedropper_add_material(), blender::modifier::greasepencil::get_grease_pencil_material_passes(), blender::ed::greasepencil::grease_pencil_separate_layer(), blender::ed::greasepencil::grease_pencil_separate_material(), blender::ed::greasepencil::grease_pencil_separate_selected(), blender::ed::greasepencil::material_isolate_exec(), material_slot_copy_exec(), mesh_separate_arrays(), mesh_separate_tagged(), blender::modify_stroke_by_material(), object_material_assign(), and versioning_eevee_shadow_settings().
Definition at line 1232 of file blenkernel/intern/material.cc.
References BKE_curve_material_remap(), BKE_grease_pencil_material_remap(), BKE_mesh_material_remap(), BKE_object_material_array_p(), BKE_object_material_len_p(), BLI_array_permute, BLI_assert, Object::data, ELEM, Object::mat, Object::matbits, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MESH, OB_SURF, Object::totcol, and Object::type.
Referenced by material_slot_move_exec().
Calculate a material remapping from ob_src to ob_dst.
| remap_src_to_dst | An array the size of ob_src->totcol where index values are filled in which map to ob_dst materials. |
Definition at line 1262 of file blenkernel/intern/material.cc.
References BKE_object_material_get(), BLI_ghash_free(), BLI_ghash_lookup_p(), BLI_ghash_ptr_new_ex(), BLI_ghash_reinsert(), i, POINTER_AS_INT, POINTER_FROM_INT, and Object::totcol.
Referenced by BMD_mesh_intersection().
Definition at line 984 of file blenkernel/intern/material.cc.
References DEG_id_tag_update(), DEG_relations_tag_update(), i, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, id_us_min(), Object::mat, Object::matbits, MEM_calloc_arrayN(), MEM_freeN(), and Object::totcol.
Referenced by BKE_object_materials_sync_length(), BKE_objects_materials_sync_length_all(), and blender::ed::object::convert_mesh_to_grease_pencil().
| set_active | Set the newly added slot as active material slot of the object. Usually that is wanted when adding a material slot, so it's the default. |
Definition at line 1399 of file blenkernel/intern/material.cc.
References Object::actcol, BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), MAXMAT, and Object::totcol.
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_object_material_new(), BKE_object_material_ensure(), grease_pencil_object_material_ensure_from_brush_pinned(), material_slot_add_exec(), and new_material_exec().
Definition at line 1372 of file blenkernel/intern/material.cc.
References BKE_object_material_array_p(), and BKE_object_material_len_p().
Referenced by BKE_grease_pencil_object_material_alt_ensure_from_brush().
Definition at line 1417 of file blenkernel/intern/material.cc.
References Object::actcol, BKE_displist_free(), BKE_object_material_array_p(), BKE_object_material_len_p(), CLOG_ERROR, Object::data, ELEM, ListBase::first, Material::id, id_us_min(), LOG, material_data_index_remove_id(), MEM_freeN(), OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MESH, OB_SURF, object_material_active_index_sanitize(), Main::objects, Object::runtime, Object::totcol, and Object::type.
Referenced by BKE_object_material_array_assign(), material_slot_remove_all_exec(), material_slot_remove_exec(), material_slot_remove_unused_exec(), and blender::ed::greasepencil::remove_unused_materials().
| bool BKE_object_material_slot_used | ( | Object * | object, |
| short | actcol ) |
Definition at line 487 of file blenkernel/intern/material.cc.
References BKE_curve_material_index_used(), BKE_grease_pencil_material_index_used(), BKE_mesh_material_index_used(), BKE_object_supports_material_slots(), GS, ID_CU_LEGACY, ID_GP, ID_MB, ID_ME, LISTBASE_FOREACH, ID::name, OB_DATA_SUPPORT_ID, and Object::particlesystem.
Referenced by blender::ed::greasepencil::grease_pencil_material_lock_unused_exec(), blender::ed::greasepencil::grease_pencil_separate_material(), material_slot_remove_unused_exec(), and blender::ed::greasepencil::remove_unused_materials().
| int BKE_object_material_used_with_fallback_eval | ( | const Object & | ob | ) |
Definition at line 863 of file blenkernel/intern/material.cc.
References BKE_id_material_used_with_fallback_eval(), data, and get_evaluated_object_data_with_materials().
Referenced by blender::draw::gpencil::gpencil_material_pool_create(), blender::draw::gpencil::gpencil_object_cache_add(), blender::eevee::MaterialModule::material_array_get(), blender::draw::mesh_render_data_create(), blender::workbench::Instance::mesh_sync(), and blender::draw::overlay::Prepass::object_sync().
Make the object's material array the same size as its data ID's material array.
Definition at line 1028 of file blenkernel/intern/material.cc.
References BKE_id_material_len_p(), BKE_id_material_resize(), BKE_object_material_resize(), Object::id, ID_TAG_MISSING, object_material_active_index_sanitize(), ID::tag, and Object::totcol.
Referenced by blender::ed::object::add_type_with_obdata(), BKE_mesh_assign_object(), BKE_object_material_from_eval_data(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), libblock_remap_data_postprocess_obdata_relink(), loose_data_instantiate_obdata_process(), blender::ed::object::make_links_data_exec(), object_blend_read_after_liblink(), blender::ed::object::object_convert_exec(), object_material_assign(), and placeholders_ensure_valid().
Ensure that every object using this data has a material array of the correct size.
Definition at line 1050 of file blenkernel/intern/material.cc.
References BKE_id_material_len_p(), BKE_main_lock(), BKE_main_unlock(), BKE_object_material_resize(), BLI_assert, Object::data, ListBase::first, Object::id, ID::next, object_material_active_index_sanitize(), Main::objects, and ID::us.
Referenced by BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_pop(), blender::ed::mesh::join_objects_exec(), mesh_separate_material_assign_mat_nr(), and object_material_assign().
Definition at line 1762 of file blenkernel/intern/material.cc.
References Material::nodetree, ntree_foreach_texnode_recursive(), PAINT_SLOT_COLOR_ATTRIBUTE, PAINT_SLOT_IMAGE, FindTexPaintNodeData::r_node, texpaint_slot_node_find_cb(), Material::texpaintslot, and Material::tot_slots.
Definition at line 1663 of file blenkernel/intern/material.cc.
References count, count_texture_nodes_recursive(), DEG_id_tag_update(), fill_texpaint_slots_recursive(), Material::id, ID_RECALC_SHADING, ID_RECALC_SYNC_TO_EVAL, IMAGEPAINT_MODE_IMAGE, ToolSettings::imapaint, material_paint_slot_filter(), MEM_calloc_arrayN(), MEM_SAFE_FREE, ImagePaintSettings::mode, blender::bke::node_get_active_paint_canvas(), Material::nodetree, Material::paint_active_slot, Material::paint_clone_slot, Material::texpaintslot, Scene::toolsettings, and Material::tot_slots.
Referenced by BKE_texpaint_slots_refresh_object(), ED_paint_proj_mesh_data_check(), paint_sample_color(), and proj_paint_add_slot().
Definition at line 1727 of file blenkernel/intern/material.cc.
References BKE_object_material_get(), BKE_texpaint_slot_refresh_cache(), i, and Object::totcol.
Referenced by ED_editors_init_for_undo(), ED_object_texture_paint_mode_enter_ex(), scene_changed(), and sculpt_update_object().
|
static |
Definition at line 1562 of file blenkernel/intern/material.cc.
Referenced by count_texture_nodes_recursive().
|
static |
Definition at line 1568 of file blenkernel/intern/material.cc.
References count_texture_nodes_cb(), and ntree_foreach_texnode_recursive().
Referenced by BKE_texpaint_slot_refresh_cache().
|
static |
Definition at line 1584 of file blenkernel/intern/material.cc.
References FillTexPaintSlotsData::active_node, TexPaintSlot::attribute_name, BKE_id_attributes_color_find(), Object::data, bNode::id, Mesh::id, TexPaintSlot::ima, TexPaintSlot::image_user, FillTexPaintSlotsData::index, TexPaintSlot::interp, NodeTexImage::interpolation, NodeTexImage::iuser, FillTexPaintSlotsData::ma, NodeShaderAttribute::name, nodetree_uv_node_recursive(), FillTexPaintSlotsData::ob, Material::paint_active_slot, SH_NODE_ATTRIBUTE, SH_NODE_TEX_IMAGE, SHD_ATTRIBUTE_GEOMETRY, FillTexPaintSlotsData::slot_len, bNode::storage, Material::texpaintslot, NodeShaderAttribute::type, bNode::type_legacy, NodeShaderUVMap::uv_map, TexPaintSlot::uvname, and TexPaintSlot::valid.
Referenced by fill_texpaint_slots_recursive().
|
static |
Definition at line 1642 of file blenkernel/intern/material.cc.
References fill_texpaint_slots_cb(), and ntree_foreach_texnode_recursive().
Referenced by BKE_texpaint_slot_refresh_cache().
Definition at line 739 of file blenkernel/intern/material.cc.
References BKE_object_get_editmesh_eval_final(), data, Object::data, Mesh::id, Object::mode, OB_MESH, OB_MODE_EDIT, Mesh::runtime, and Object::type.
Referenced by BKE_object_material_count_eval(), BKE_object_material_get_eval(), and BKE_object_material_used_with_fallback_eval().
|
static |
Definition at line 232 of file blenkernel/intern/material.cc.
References BKE_previewimg_blend_read(), BLI_listbase_clear(), BLO_read_struct, Material::gp_style, Material::gpumaterial, Material::preview, and Material::texpaintslot.
|
static |
Definition at line 201 of file blenkernel/intern/material.cc.
References BKE_id_blend_write(), BKE_previewimg_blend_write(), BLI_listbase_clear(), BLO_write_id_struct, BLO_write_struct, BLO_write_struct_at_address, BLO_Write_IDBuffer::get(), Material::gp_style, Material::gpumaterial, bNodeTree::id, Material::id, blender::bke::node_tree_blend_write(), Material::nodetree, Material::preview, and Material::texpaintslot.
|
static |
Definition at line 92 of file blenkernel/intern/material.cc.
References BKE_id_copy_in_lib(), BKE_previewimg_id_copy(), BLI_listbase_clear(), flag, Material::gp_style, Material::gpumaterial, bNodeTree::id, Material::id, 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(), Material::nodetree, nullptr, Material::preview, and Material::texpaintslot.
|
static |
Definition at line 520 of file blenkernel/intern/material.cc.
References BKE_curve_material_index_clear(), BKE_mesh_material_index_clear(), BLI_assert, GS, ID_CU_LEGACY, ID_CV, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, and OB_DATA_SUPPORT_ID.
Referenced by BKE_id_material_clear().
|
static |
Definition at line 461 of file blenkernel/intern/material.cc.
References BKE_curve_material_index_remove(), BKE_grease_pencil_material_index_remove(), BKE_mesh_material_index_remove(), BLI_assert, GS, ID_CU_LEGACY, ID_CV, ID_GP, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, and OB_DATA_SUPPORT_ID.
Referenced by BKE_id_material_pop(), and BKE_object_material_slot_remove().
Definition at line 2057 of file blenkernel/intern/material.cc.
References BKE_id_new_nomain(), and name.
Referenced by BKE_materials_init(), material_default_gpencil_init(), material_default_holdout_init(), material_default_surface_init(), and material_default_volume_init().
|
static |
Definition at line 2063 of file blenkernel/intern/material.cc.
References add_v3_fl(), BKE_gpencil_material_attr_init(), Material::gp_style, material_default_create(), and MaterialGPencilStyle::stroke_rgba.
Referenced by BKE_materials_init().
|
static |
Definition at line 2123 of file blenkernel/intern/material.cc.
References Material::id, bNode::location, material_default_create(), blender::bke::node_add_link(), blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::bke::node_set_active(), blender::bke::node_tree_add_tree_embedded(), ntreeType_Shader, output, SH_NODE_HOLDOUT, SH_NODE_OUTPUT_MATERIAL, SOCK_IN, and SOCK_OUT.
Referenced by BKE_materials_init().
|
static |
Definition at line 2071 of file blenkernel/intern/material.cc.
References copy_v3_v3(), bNodeSocket::default_value, Material::id, bNode::location, material_default_create(), blender::bke::node_add_link(), blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::bke::node_set_active(), blender::bke::node_tree_add_tree_embedded(), ntreeType_Shader, output, Material::r, SH_NODE_BSDF_PRINCIPLED, SH_NODE_OUTPUT_MATERIAL, SOCK_IN, and SOCK_OUT.
Referenced by BKE_materials_init().
|
static |
Definition at line 2098 of file blenkernel/intern/material.cc.
References Material::id, bNode::location, material_default_create(), blender::bke::node_add_link(), blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::bke::node_set_active(), blender::bke::node_tree_add_tree_embedded(), ntreeType_Shader, output, SH_NODE_OUTPUT_MATERIAL, SH_NODE_VOLUME_PRINCIPLED, SOCK_IN, and SOCK_OUT.
Referenced by BKE_materials_init().
|
static |
Definition at line 169 of file blenkernel/intern/material.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_library_foreach_ID_embedded(), data, Material::gp_style, IDWALK_CB_NOP, IDWALK_CB_USER, MaterialGPencilStyle::ima, TexPaintSlot::ima, Material::nodetree, MaterialGPencilStyle::sima, and Material::texpaintslot.
|
static |
Definition at line 185 of file blenkernel/intern/material.cc.
References MaterialGPencilStyle::fill_rgba, Material::gp_style, Material::line_col, MaterialGPencilStyle::mix_rgba, Material::r, IDTypeForeachColorFunctionCallback::single, Material::specr, and MaterialGPencilStyle::stroke_rgba.
|
static |
Definition at line 146 of file blenkernel/intern/material.cc.
References BKE_icon_id_delete(), BKE_previewimg_free(), Material::gp_style, GPU_material_free(), Material::gpumaterial, MEM_freeN(), MEM_SAFE_FREE, blender::bke::node_tree_free_embedded_tree(), Material::nodetree, Material::preview, and Material::texpaintslot.
|
static |
Definition at line 83 of file blenkernel/intern/material.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Check which type of paint slots should be filled for the given object.
Definition at line 1654 of file blenkernel/intern/material.cc.
References Object::mode, OB_MODE_SCULPT, PAINT_SLOT_COLOR_ATTRIBUTE, PAINT_SLOT_IMAGE, U, and USER_EXPERIMENTAL_TEST.
Referenced by BKE_texpaint_slot_refresh_cache().
|
static |
Definition at line 296 of file blenkernel/intern/material.cc.
References nodetree_mark_previews_dirty_reccursive(), and tree.
Referenced by BKE_material_make_node_previews_dirty(), and nodetree_mark_previews_dirty_reccursive().
Definition at line 1505 of file blenkernel/intern/material.cc.
References bNode::inputs, LISTBASE_FOREACH, NODE_CLASS_INPUT, nodetree_uv_node_recursive(), SH_NODE_UVMAP, and bNode::typeinfo.
Referenced by fill_texpaint_slots_cb(), and nodetree_uv_node_recursive().
|
static |
Definition at line 1531 of file blenkernel/intern/material.cc.
References if(), ntree_foreach_texnode_recursive(), PAINT_SLOT_COLOR_ATTRIBUTE, PAINT_SLOT_IMAGE, and SH_NODE_ATTRIBUTE.
Referenced by BKE_texpaint_slot_material_find_node(), count_texture_nodes_recursive(), fill_texpaint_slots_recursive(), and ntree_foreach_texnode_recursive().
|
static |
Ensure a valid active index. When materials are assigned, the active material must be in the range of 1..totcol. see #139182 for details.
Definition at line 976 of file blenkernel/intern/material.cc.
References Object::actcol, and Object::totcol.
Referenced by BKE_object_material_slot_remove(), BKE_object_materials_sync_length(), and BKE_objects_materials_sync_length_all().
|
static |
Definition at line 1124 of file blenkernel/intern/material.cc.
References Object::actcol, BKE_MAT_ASSIGN_EXISTING, BKE_MAT_ASSIGN_OBDATA, BKE_MAT_ASSIGN_OBJECT, BKE_MAT_ASSIGN_USERPREF, BKE_object_material_array_p(), BKE_object_material_len_p(), BKE_object_materials_sync_length(), BKE_objects_materials_sync_length_all(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), Material::id, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, id_us_min(), id_us_plus(), Object::mat, Object::matbits, MAXMAT, MEM_calloc_arrayN(), MEM_freeN(), MEM_recallocN_id, Object::totcol, U, and USER_MAT_ON_OB.
Referenced by BKE_object_material_assign(), and BKE_object_material_assign_single_obdata().
| r_col | current value. |
| col | new value. |
| fac | Zero for is no change. |
Definition at line 1782 of file blenkernel/intern/material.cc.
References col, fabsf, hsv_to_rgb(), MA_RAMP_ADD, MA_RAMP_BLEND, MA_RAMP_BURN, MA_RAMP_COLOR, MA_RAMP_DARK, MA_RAMP_DIFF, MA_RAMP_DIV, MA_RAMP_DODGE, MA_RAMP_EXCLUSION, MA_RAMP_HUE, MA_RAMP_LIGHT, MA_RAMP_LINEAR, MA_RAMP_MULT, MA_RAMP_OVERLAY, MA_RAMP_SAT, MA_RAMP_SCREEN, MA_RAMP_SOFT, MA_RAMP_SUB, MA_RAMP_VAL, max_ff(), min_ff(), and rgb_to_hsv().
Referenced by blender::nodes::node_sh_mix_cc::MixColorFunction::call(), blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction::call(), colorfn(), colorfn(), colorfn(), do_proc(), and Freestyle_blendRamp().
|
static |
Definition at line 1740 of file blenkernel/intern/material.cc.
References TexPaintSlot::attribute_name, bNode::id, TexPaintSlot::ima, NodeShaderAttribute::name, FindTexPaintNodeData::r_node, SH_NODE_ATTRIBUTE, SH_NODE_TEX_IMAGE, FindTexPaintNodeData::slot, bNode::storage, STREQLEN, and bNode::type_legacy.
Referenced by BKE_texpaint_slot_material_find_node().
Definition at line 2044 of file blenkernel/intern/material.cc.
Referenced by BKE_material_default_empty(), and BKE_materials_init().
Definition at line 2048 of file blenkernel/intern/material.cc.
Referenced by BKE_material_default_gpencil(), and BKE_materials_init().
Definition at line 2045 of file blenkernel/intern/material.cc.
Referenced by BKE_material_default_holdout(), and BKE_materials_init().
Definition at line 2046 of file blenkernel/intern/material.cc.
Referenced by BKE_material_default_surface(), and BKE_materials_init().
Definition at line 2047 of file blenkernel/intern/material.cc.
Referenced by BKE_material_default_volume(), and BKE_materials_init().
|
static |
Definition at line 2050 of file blenkernel/intern/material.cc.
Referenced by BKE_material_defaults_free_gpu(), BKE_materials_exit(), and BKE_materials_init().
| IDTypeInfo IDType_ID_MA |
Definition at line 246 of file blenkernel/intern/material.cc.
|
static |
Definition at line 81 of file blenkernel/intern/material.cc.