|
Blender
V2.93
|
General operations, lookup, etc. for materials. More...
Go to the source code of this file.
Enumerations | |
| enum | { BKE_MAT_ASSIGN_EXISTING , BKE_MAT_ASSIGN_USERPREF , BKE_MAT_ASSIGN_OBDATA , BKE_MAT_ASSIGN_OBJECT } |
Functions | |
| void | BKE_materials_init (void) |
| void | BKE_materials_exit (void) |
| void | BKE_object_materials_test (struct Main *bmain, struct Object *ob, struct ID *id) |
| void | BKE_objects_materials_test_all (struct Main *bmain, struct ID *id) |
| void | BKE_object_material_resize (struct Main *bmain, struct Object *ob, const short totcol, bool do_id_user) |
| void | BKE_object_material_remap (struct Object *ob, const unsigned int *remap) |
| void | BKE_object_material_remap_calc (struct Object *ob_dst, struct Object *ob_src, short *remap_src_to_dst) |
| struct Material * | BKE_material_add (struct Main *bmain, const char *name) |
| struct Material * | BKE_gpencil_material_add (struct Main *bmain, const char *name) |
| void | BKE_gpencil_material_attr_init (struct Material *ma) |
| struct Material *** | BKE_object_material_array_p (struct Object *ob) |
| short * | BKE_object_material_len_p (struct Object *ob) |
| struct Material *** | BKE_id_material_array_p (struct ID *id) |
| short * | BKE_id_material_len_p (struct ID *id) |
| struct Material ** | BKE_object_material_get_p (struct Object *ob, short act) |
| struct Material * | BKE_object_material_get (struct Object *ob, short act) |
| void | BKE_id_material_assign (struct Main *bmain, struct ID *id, struct Material *ma, short act) |
| void | BKE_object_material_assign (struct Main *bmain, struct Object *ob, struct Material *ma, short act, int assign_type) |
| void | BKE_object_material_array_assign (struct Main *bmain, struct Object *ob, struct Material ***matar, int totcol, const bool to_object_only) |
| short | BKE_object_material_slot_find_index (struct Object *ob, struct Material *ma) |
| bool | BKE_object_material_slot_add (struct Main *bmain, struct Object *ob) |
| bool | BKE_object_material_slot_remove (struct Main *bmain, struct Object *ob) |
| bool | BKE_object_material_slot_used (struct ID *id, short actcol) |
| struct Material * | BKE_gpencil_material (struct Object *ob, short act) |
| struct MaterialGPencilStyle * | BKE_gpencil_material_settings (struct Object *ob, short act) |
| void | BKE_texpaint_slot_refresh_cache (struct Scene *scene, struct Material *ma) |
| void | BKE_texpaint_slots_refresh_object (struct Scene *scene, struct Object *ob) |
| struct bNode * | BKE_texpaint_slot_material_find_node (struct Material *ma, short texpaint_slot) |
| void | BKE_id_materials_copy (struct Main *bmain, struct ID *id_src, struct ID *id_dst) |
| void | BKE_id_material_resize (struct Main *bmain, struct ID *id, short totcol, bool do_id_user) |
| void | BKE_id_material_append (struct Main *bmain, struct ID *id, struct Material *ma) |
| struct Material * | BKE_id_material_pop (struct Main *bmain, struct ID *id, int index) |
| void | BKE_id_material_clear (struct Main *bmain, struct ID *id) |
| void | ramp_blend (int type, float r_col[3], const float fac, const float col[3]) |
| void | BKE_material_copybuf_clear (void) |
| void | BKE_material_copybuf_free (void) |
| void | BKE_material_copybuf_copy (struct Main *bmain, struct Material *ma) |
| void | BKE_material_copybuf_paste (struct Main *bmain, struct Material *ma) |
| struct Material * | BKE_material_default_empty (void) |
| struct Material * | BKE_material_default_holdout (void) |
| struct Material * | BKE_material_default_surface (void) |
| struct Material * | BKE_material_default_volume (void) |
| struct Material * | BKE_material_default_gpencil (void) |
| void | BKE_material_defaults_free_gpu (void) |
| void | BKE_material_eval (struct Depsgraph *depsgraph, struct Material *material) |
General operations, lookup, etc. for materials.
Definition in file BKE_material.h.
| anonymous enum |
| Enumerator | |
|---|---|
| BKE_MAT_ASSIGN_EXISTING | |
| BKE_MAT_ASSIGN_USERPREF | |
| BKE_MAT_ASSIGN_OBDATA | |
| BKE_MAT_ASSIGN_OBJECT | |
Definition at line 68 of file BKE_material.h.
Definition at line 703 of file material.c.
References BKE_material_default_gpencil(), BKE_object_material_get(), and NULL.
Referenced by BKE_gpencil_merge_materials_table_get(), ED_gpencil_join_objects_exec(), ED_gpencil_update_color_uv(), gpencil_lock_layer_exec(), gpencil_material_hide_exec(), gpencil_material_isolate_exec(), gpencil_material_lock_all_exec(), gpencil_material_reveal_exec(), gpencil_material_unlock_all_exec(), gpencil_stroke_change_color_exec(), gpencil_stroke_separate_exec(), gpencil_strokes_merge_poll(), is_stroke_affected_by_modifier(), and object_gpencil_add_exec().
Definition at line 310 of file material.c.
References BKE_gpencil_material_attr_init(), BKE_material_add(), and NULL.
Referenced by BKE_gpencil_brush_preset_set(), BKE_gpencil_object_material_new(), BLO_update_defaults_startup_blend(), gpencil_material_to_vertex_exec(), and new_material_exec().
| void BKE_gpencil_material_attr_init | ( | struct Material * | ma | ) |
Definition at line 282 of file material.c.
References ARRAY_SET_ITEMS, MaterialGPencilStyle::fill_rgba, MaterialGPencilStyle::flag, GP_MATERIAL_STROKE_SHOW, Material::gp_style, MEM_callocN, MaterialGPencilStyle::mix_factor, MaterialGPencilStyle::mix_rgba, NULL, MaterialGPencilStyle::stroke_rgba, MaterialGPencilStyle::texture_offset, MaterialGPencilStyle::texture_pixsize, and MaterialGPencilStyle::texture_scale.
Referenced by BKE_gpencil_material_add(), BKE_gpencil_material_settings(), BKE_gpencil_object_material_ensure_active(), and material_default_gpencil_init().
| struct MaterialGPencilStyle* BKE_gpencil_material_settings | ( | struct Object * | ob, |
| short | act | ||
| ) |
Definition at line 713 of file material.c.
References BKE_gpencil_material_attr_init(), BKE_material_default_gpencil(), BKE_object_material_get(), Material::gp_style, and NULL.
Referenced by BKE_gpencil_merge_materials(), deformStroke(), ED_gpencil_stroke_material_editable(), ED_gpencil_stroke_material_visible(), gpencil_create_extensions(), gpencil_draw_datablock(), gpencil_extract_palette_from_vertex(), gpencil_generic_curve_select(), gpencil_generic_stroke_select(), gpencil_material_hide_exec(), gpencil_material_isolate_exec(), gpencil_material_pool_create(), gpencil_material_select_exec(), gpencil_material_to_vertex_exec(), gpencil_object_cache_add(), gpencil_sculpt_brush_do_frame(), gpencil_stroke_cache_populate(), gpencil_stroke_caps_set_exec(), gpencil_stroke_cyclical_set_exec(), gpencil_vertexpaint_select_stroke(), gpencil_zoom_level_set(), and blender::io::gpencil::GpencilIO::prepare_stroke_export_colors().
Definition at line 560 of file material.c.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_test_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_COPY_ON_WRITE, id_us_plus(), MEM_callocN, and MEM_freeN.
Definition at line 390 of file material.c.
References BLI_assert, GS, id, ID_CU, ID_GD, ID_HA, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, NULL, and OB_DATA_SUPPORT_ID.
Referenced by BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_pop(), BKE_id_material_resize(), BKE_id_materials_copy(), and mesh_separate_material_assign_mat_nr().
| void BKE_id_material_assign | ( | struct Main * | bmain, |
| struct ID * | id, | ||
| struct Material * | ma, | ||
| short | act | ||
| ) |
Definition at line 803 of file material.c.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_test_all(), Material::id, id_us_min(), id_us_plus(), MAXMAT, MEM_callocN, MEM_freeN, and NULL.
Definition at line 622 of file material.c.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_test_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_COPY_ON_WRITE, id_us_min(), material_data_index_clear_id(), MEM_freeN, and NULL.
Referenced by mesh_separate_material_assign_mat_nr().
| short* BKE_id_material_len_p | ( | struct ID * | id | ) |
Definition at line 416 of file material.c.
References BLI_assert, GS, id, ID_CU, ID_GD, ID_HA, ID_MB, ID_ME, ID_PT, ID_VO, ID::name, NULL, and OB_DATA_SUPPORT_ID.
Referenced by BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_pop(), BKE_id_material_resize(), BKE_id_materials_copy(), BKE_object_materials_test(), BKE_objects_materials_test_all(), ED_object_add_type_with_obdata(), and mesh_separate_material_assign_mat_nr().
Definition at line 584 of file material.c.
References BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_objects_materials_test_all(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_COPY_ON_WRITE, id_us_min(), material_data_index_remove_id(), MEM_freeN, MEM_reallocN, NULL, and ret.
Definition at line 529 of file material.c.
References BKE_id_material_array_p(), BKE_id_material_len_p(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_COPY_ON_WRITE, id_us_min(), MEM_freeN, MEM_recallocN, and NULL.
Referenced by mesh_separate_material_assign_mat_nr().
Definition at line 508 of file material.c.
References Freestyle::a, BKE_id_material_array_p(), BKE_id_material_len_p(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_COPY_ON_WRITE, id_us_plus(), and MEM_dupallocN.
Referenced by BKE_mesh_to_pointcloud(), and BKE_pointcloud_to_mesh().
Definition at line 301 of file material.c.
References BKE_id_new(), and ID_MA.
Referenced by blender::io::alembic::utils::assign_materials(), BKE_gpencil_material_add(), get_or_create_current_material(), Freestyle::BlenderStrokeRenderer::GetStrokeShader(), new_material_exec(), and DocumentImporter::writeMaterial().
| void BKE_material_copybuf_clear | ( | void | ) |
Definition at line 1655 of file material.c.
References matcopied, and matcopybuf.
Referenced by WM_init().
Definition at line 1673 of file material.c.
References BKE_material_copybuf_free(), BLI_listbase_clear(), Material::gpumaterial, matcopied, matcopybuf, Material::nodetree, ntreeCopyTree_ex(), NULL, and Material::preview.
Referenced by copy_material_exec().
| void BKE_material_copybuf_free | ( | void | ) |
Definition at line 1661 of file material.c.
References BLI_assert, bNodeTree::id, matcopied, matcopybuf, MEM_freeN, Material::nodetree, ntreeFreeLocalTree, NULL, and ID::py_instance.
Referenced by BKE_material_copybuf_copy().
Definition at line 1691 of file material.c.
References GPU_material_free(), Material::gpumaterial, id, Material::id, matcopied, matcopybuf, MEM_freeN, Material::nodetree, ntreeCopyTree_ex(), ntreeFreeEmbeddedTree(), and NULL.
Referenced by paste_material_exec().
| struct Material* BKE_material_default_empty | ( | void | ) |
Definition at line 1819 of file material.c.
References default_material_empty.
Referenced by workbench_object_material_get().
| struct Material* BKE_material_default_gpencil | ( | void | ) |
Definition at line 1839 of file material.c.
References default_material_gpencil.
Referenced by BKE_gpencil_material(), BKE_gpencil_material_settings(), BKE_gpencil_object_material_ensure_from_active_input_material(), and gpencil_draw_strokes().
| struct Material* BKE_material_default_holdout | ( | void | ) |
Definition at line 1824 of file material.c.
References default_material_holdout.
Referenced by eevee_object_material_get().
| struct Material* BKE_material_default_surface | ( | void | ) |
Definition at line 1829 of file material.c.
References default_material_surface.
Referenced by ED_node_shader_default(), EEVEE_material_default_get(), and eevee_object_material_get().
| struct Material* BKE_material_default_volume | ( | void | ) |
Definition at line 1834 of file material.c.
References default_material_volume.
Referenced by ED_node_shader_default(), EEVEE_material_default_get(), eevee_object_material_get(), and EEVEE_volumes_cache_object_add().
| void BKE_material_defaults_free_gpu | ( | void | ) |
Definition at line 1844 of file material.c.
References default_materials, ListBase::first, GPU_material_free(), and Material::gpumaterial.
Referenced by gpu_codegen_exit(), and GPU_materials_free().
Definition at line 1716 of file material.c.
References DEG_debug_print_eval(), depsgraph, GPU_material_free(), Material::gpumaterial, Material::id, material, and ID::name.
| void BKE_materials_exit | ( | void | ) |
Definition at line 1868 of file material.c.
References default_materials, and material_free_data().
Referenced by WM_exit_ex().
| void BKE_materials_init | ( | void | ) |
Definition at line 1856 of file material.c.
References default_material_gpencil, default_material_holdout, default_material_surface, default_material_volume, default_materials, material_default_gpencil_init(), material_default_holdout_init(), material_default_surface_init(), material_default_volume_init(), and material_init_data().
Referenced by main().
| void BKE_object_material_array_assign | ( | struct Main * | bmain, |
| struct Object * | ob, | ||
| struct Material *** | matar, | ||
| int | totcol, | ||
| const bool | to_object_only | ||
| ) |
Definition at line 1032 of file material.c.
References Object::actcol, BKE_MAT_ASSIGN_OBJECT, BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_slot_remove(), Object::matbits, and Object::totcol.
Referenced by material_slot_copy_exec(), mesh_separate_arrays(), and mesh_separate_tagged().
Definition at line 323 of file material.c.
References Object::data, ELEM, Curve::mat, bGPdata::mat, Hair::mat, Mesh::mat, MetaBall::mat, PointCloud::mat, Volume::mat, NULL, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_duplicate(), BKE_object_material_assign(), BKE_object_material_get_p(), BKE_object_material_remap(), BKE_object_material_slot_find_index(), BKE_object_material_slot_remove(), blender::deg::DepsgraphRelationBuilder::build_object_data(), blender::deg::DepsgraphNodeBuilder::build_object_data(), make_local_exec(), material_slot_copy_exec(), mesh_separate_arrays(), mesh_separate_tagged(), preview_prepare_scene(), and similar_face_select_exec().
| void BKE_object_material_assign | ( | struct Main * | bmain, |
| struct Object * | ob, | ||
| struct Material * | ma, | ||
| short | act, | ||
| int | assign_type | ||
| ) |
Definition at line 850 of file material.c.
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_test(), BKE_objects_materials_test_all(), BLI_assert, Object::data, Material::id, ID_IS_LINKED, id_us_min(), id_us_plus(), Object::mat, Object::matbits, MAXMAT, MEM_callocN, MEM_freeN, MEM_recallocN_id, NULL, Object::totcol, and USER_MAT_ON_OB.
Referenced by MeshImporter::assign_material_to_geom(), blender::io::alembic::utils::assign_materials(), BKE_gpencil_object_material_ensure(), BKE_gpencil_object_material_ensure_from_brush(), BKE_gpencil_object_material_new(), BKE_object_material_array_assign(), BKE_object_material_slot_add(), drop_named_material_invoke(), get_or_create_current_material(), gpencil_material_to_vertex_exec(), make_links_data_exec(), material_drop_invoke(), and single_mat_users().
Definition at line 697 of file material.c.
References BKE_object_material_get_p(), and NULL.
Referenced by InstanceWriter::add_material_bindings(), animdata_filter_ds_materials(), bake_object_check(), bc_has_animations(), BKE_gpencil_convert_mesh(), BKE_gpencil_material(), BKE_gpencil_material_find_index_by_name_prefix(), BKE_gpencil_material_settings(), BKE_gpencil_object_material_ensure_by_name(), BKE_gpencil_object_material_ensure_from_active_input_material(), BKE_gpencil_object_material_ensure_from_brush(), BKE_gpencil_object_material_from_brush_get(), BKE_gpencil_object_material_index_get(), BKE_gpencil_object_material_index_get_by_name(), BKE_object_material_remap_calc(), BKE_texpaint_slots_refresh_object(), buttons_context_path_material(), GeometryExporter::create_mesh_primitive_list(), ED_gpencil_material_enum_itemf(), ED_mesh_join_objects_exec(), ED_object_assign_active_image(), ED_object_get_active_image(), ED_object_texture_paint_mode_enter_ex(), ED_paint_proj_mesh_data_check(), EEVEE_cryptomatte_cache_populate(), eevee_object_material_get(), EEVEE_volumes_cache_object_add(), AnimationExporter::export_curve_animation(), eyedropper_add_material(), BCAnimationCurve::get_animation_name(), get_default_texture_layer_name_for_object(), get_or_create_current_material(), gpencil_check_same_material_color(), gpencil_fill_invoke(), gpencil_layer_duplicate_object_exec(), gpencil_material_find_index_by_name(), gpencil_material_lock_unsused_exec(), gpencil_modifier_masking_panel_draw(), gpencil_strokes_copy_exec(), imapaint_face_image(), imapaint_pick_uv(), Freestyle::BlenderFileLoader::insertShapeNode(), join_mesh_single(), lineart_geometry_object_load(), make_links_data_exec(), material_slot_assign_exec(), material_slot_de_select(), mesh_new_from_mball_object(), object_frame_has_keyframe(), object_select_all_by_material(), object_select_linked_exec(), ForEachMaterialFunctor< Functor >::operator()(), overlay_gpencil_draw_stroke_color_name(), OVERLAY_particle_cache_populate(), proj_paint_add_slot(), proj_paint_state_mesh_eval_init(), psys_get_particle_on_path(), psys_thread_context_init(), shader_get_from_context(), single_mat_users(), AnimationImporter::translate_Animations(), workbench_object_material_get(), and workbench_volume_material_color().
Definition at line 645 of file material.c.
References BKE_object_material_array_p(), BKE_object_material_len_p(), CLOG_ERROR, LOG, Object::mat, Object::matbits, NULL, and Object::totcol.
Referenced by BKE_object_material_get(), and new_material_exec().
| short* BKE_object_material_len_p | ( | struct Object * | ob | ) |
Definition at line 356 of file material.c.
References Object::data, ELEM, NULL, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, Curve::totcol, bGPdata::totcol, Hair::totcol, Mesh::totcol, MetaBall::totcol, PointCloud::totcol, Volume::totcol, and Object::type.
Referenced by BKE_gpencil_merge_materials(), BKE_gpencil_merge_materials_table_get(), BKE_gpencil_object_material_index_get(), BKE_gpencil_object_material_index_get_by_name(), BKE_object_material_assign(), BKE_object_material_get_p(), BKE_object_material_remap(), BKE_object_material_slot_find_index(), BKE_object_material_slot_remove(), blender::deg::DepsgraphRelationBuilder::build_object_data(), blender::deg::DepsgraphNodeBuilder::build_object_data(), ED_gpencil_join_objects_exec(), eyedropper_add_material(), gpencil_active_material_poll(), gpencil_lock_layer_exec(), gpencil_material_hide_exec(), gpencil_material_isolate_exec(), gpencil_material_lock_all_exec(), gpencil_material_lock_unsused_exec(), gpencil_material_reveal_exec(), gpencil_material_to_vertex_exec(), gpencil_material_unlock_all_exec(), gpencil_stroke_merge_material_exec(), material_slot_copy_exec(), mesh_separate_arrays(), mesh_separate_tagged(), and object_blend_read_lib().
| void BKE_object_material_remap | ( | struct Object * | ob, |
| const unsigned int * | remap | ||
| ) |
Definition at line 947 of file material.c.
References BKE_curve_material_remap(), BKE_gpencil_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, NULL, OB_CURVE, OB_FONT, OB_GPENCIL, 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 983 of file material.c.
References BKE_object_material_get(), BLI_ghash_free(), BLI_ghash_lookup_p(), BLI_ghash_ptr_new_ex(), BLI_ghash_reinsert(), NULL, POINTER_AS_INT, POINTER_FROM_INT, and Object::totcol.
Referenced by BMD_mesh_intersection().
| void BKE_object_material_resize | ( | struct Main * | bmain, |
| struct Object * | ob, | ||
| const short | totcol, | ||
| bool | do_id_user | ||
| ) |
Definition at line 727 of file material.c.
References Object::actcol, DEG_id_tag_update(), DEG_relations_tag_update(), Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, id_us_min(), Object::mat, Object::matbits, MEM_callocN, MEM_freeN, NULL, and Object::totcol.
Referenced by BKE_object_materials_test(), BKE_objects_materials_test_all(), mesh_separate_material_assign_mat_nr(), and object_blend_read_lib().
Definition at line 1091 of file material.c.
References Object::actcol, BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), MAXMAT, NULL, and Object::totcol.
Referenced by blender::io::alembic::utils::assign_materials(), BKE_gpencil_object_material_ensure(), BKE_gpencil_object_material_ensure_from_brush(), BKE_gpencil_object_material_new(), gpencil_material_to_vertex_exec(), material_slot_add_exec(), and new_material_exec().
Definition at line 1064 of file material.c.
References Freestyle::a, BKE_object_material_array_p(), BKE_object_material_len_p(), and NULL.
Referenced by gpencil_init_colors().
Definition at line 1107 of file material.c.
References Freestyle::a, Object::actcol, BKE_displist_free(), BKE_gpencil_material_index_reassign(), BKE_object_material_array_p(), BKE_object_material_len_p(), BLI_assert, CLOG_ERROR, Object_Runtime::curve_cache, Object::data, CurveCache::disp, ELEM, ListBase::first, Material::id, id_us_min(), LOG, material_data_index_remove_id(), MEM_freeN, NULL, OB_CURVE, OB_FONT, OB_GPENCIL, OB_MESH, OB_SURF, Main::objects, Object::runtime, Object::totcol, and Object::type.
Referenced by BKE_gpencil_convert_curve(), BKE_object_material_array_assign(), gpencil_stroke_separate_exec(), material_slot_remove_exec(), material_slot_remove_unused_exec(), and object_convert_exec().
| bool BKE_object_material_slot_used | ( | struct ID * | id, |
| short | actcol | ||
| ) |
Definition at line 465 of file material.c.
References BKE_curve_material_index_used(), BKE_gpencil_material_index_used(), BKE_mesh_material_index_used(), BLI_assert, GS, id, ID_CU, ID_GD, ID_MB, ID_ME, ID::name, and OB_DATA_SUPPORT_ID.
Referenced by BKE_gpencil_convert_curve(), gpencil_stroke_separate_exec(), material_slot_remove_unused_exec(), and object_convert_exec().
Definition at line 772 of file material.c.
References BKE_id_material_len_p(), BKE_object_material_resize(), and NULL.
Referenced by add_loose_object_data_to_scene(), BKE_mesh_assign_object(), BKE_object_material_assign(), ED_object_add_type_with_obdata(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), libblock_remap_data_postprocess_obdata_relink(), make_links_data_exec(), object_convert_exec(), and placeholders_ensure_valid().
Definition at line 784 of file material.c.
References BKE_id_material_len_p(), BKE_main_lock(), BKE_main_unlock(), BKE_object_material_resize(), Object::data, ListBase::first, Object::id, ID::next, NULL, and Main::objects.
Referenced by BKE_id_material_append(), BKE_id_material_assign(), BKE_id_material_clear(), BKE_id_material_pop(), BKE_object_material_assign(), and ED_mesh_join_objects_exec().
Definition at line 1386 of file material.c.
References TexPaintSlot::ima, Material::nodetree, ntree_foreach_texnode_recursive(), NULL, FindTexPaintNodeData::r_node, texpaint_slot_node_find_cb(), and Material::texpaintslot.
Definition at line 1307 of file material.c.
References FillTexPaintSlotsData::active_node, count, count_texture_nodes_recursive(), DEG_id_tag_update(), fill_texpaint_slots_recursive(), Material::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SHADING, IMAGEPAINT_MODE_IMAGE, ToolSettings::imapaint, FillTexPaintSlotsData::ma, MEM_callocN, MEM_freeN, ImagePaintSettings::mode, nodeGetActiveTexture(), Material::nodetree, NULL, Material::paint_active_slot, Material::paint_clone_slot, scene, Material::texpaintslot, Scene::toolsettings, and Material::tot_slots.
Referenced by BKE_texpaint_slots_refresh_object(), ED_paint_proj_mesh_data_check(), and proj_paint_add_slot().
Definition at line 1361 of file material.c.
References BKE_object_material_get(), BKE_texpaint_slot_refresh_cache(), FillTexPaintSlotsData::ma, scene, and Object::totcol.
Referenced by ED_editors_init_for_undo(), ED_object_texture_paint_mode_enter_ex(), and scene_changed().
Definition at line 1395 of file material.c.
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_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, min_ff(), rgb_to_hsv(), and type.
Referenced by colorfn(), blender::nodes::do_mix_operation_color4f(), blender::nodes::do_mix_operation_float(), blender::nodes::do_mix_operation_float3(), do_proc(), Freestyle_blendRamp(), node_shader_exec_mix_rgb(), and texture_rgb_blend().