Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-02-05 13:23:58 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-02-05 17:56:50 +0300
commit1bc2a98a9d609e54c928672f148edfba9d5f8c5a (patch)
tree0884042019d5c886348e643d30744b4bdcf5a60f /source/blender/editors/object
parent06c560864607562acdc1e61b13369f24b22c102c (diff)
T73589: Code Quality: Renaming on BKE_material.h
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c2
-rw-r--r--source/blender/editors/object/object_relations.c14
-rw-r--r--source/blender/editors/object/object_select.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index f55a4c7f5f9..04323972666 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2443,7 +2443,7 @@ static int convert_exec(bContext *C, wmOperator *op)
/* Ensure new object has consistent material data with its new obdata. */
if (newob) {
- test_object_materials(bmain, newob, newob->data);
+ BKE_object_materials_test(bmain, newob, newob->data);
}
/* tag obdata if it was been changed */
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index acecbc47c28..5d7a0efb7bf 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -481,7 +481,7 @@ static bool bake_object_check(ViewLayer *view_layer, Object *ob, ReportList *rep
}
}
else {
- Material *mat = give_current_material(ob, i);
+ Material *mat = BKE_object_material_get(ob, i);
if (mat != NULL) {
BKE_reportf(reports,
RPT_INFO,
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f9e2a2b8a1a..e00b7fd2dc5 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1534,16 +1534,16 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
ob_dst->data = obdata_id;
/* if amount of material indices changed: */
- test_object_materials(bmain, ob_dst, ob_dst->data);
+ BKE_object_materials_test(bmain, ob_dst, ob_dst->data);
DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
break;
case MAKE_LINKS_MATERIALS:
/* new approach, using functions from kernel */
for (a = 0; a < ob_src->totcol; a++) {
- Material *ma = give_current_material(ob_src, a + 1);
+ Material *ma = BKE_object_material_get(ob_src, a + 1);
/* also works with `ma == NULL` */
- assign_material(bmain, ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF);
+ BKE_object_material_assign(bmain, ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF);
}
DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
break;
@@ -1950,7 +1950,7 @@ static void single_mat_users(
FOREACH_OBJECT_FLAG_BEGIN (scene, view_layer, v3d, flag, ob) {
if (!ID_IS_LINKED(ob)) {
for (a = 1; a <= ob->totcol; a++) {
- ma = give_current_material(ob, a);
+ ma = BKE_object_material_get(ob, a);
if (ma) {
/* do not test for LIB_TAG_NEW or use newid:
* this functions guaranteed delivers single_users! */
@@ -1960,7 +1960,7 @@ static void single_mat_users(
BKE_animdata_copy_id_action(bmain, &man->id, false);
man->id.us = 0;
- assign_material(bmain, ob, man, a, BKE_MAT_ASSIGN_USERPREF);
+ BKE_object_material_assign(bmain, ob, man, a, BKE_MAT_ASSIGN_USERPREF);
}
}
}
@@ -2262,7 +2262,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
}
- matarar = (Material ***)give_matarar(ob);
+ matarar = (Material ***)BKE_object_material_array(ob);
if (matarar) {
for (a = 0; a < ob->totcol; a++) {
ma = (*matarar)[a];
@@ -2676,7 +2676,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent
return OPERATOR_CANCELLED;
}
- assign_material(CTX_data_main(C), base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF);
+ BKE_object_material_assign(CTX_data_main(C), base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF);
DEG_id_tag_update(&base->object->id, ID_RECALC_TRANSFORM);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 40fa11994f4..63362f7a86d 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -523,7 +523,7 @@ static bool object_select_all_by_material(bContext *C, Material *mat)
int a;
for (a = 1; a <= ob->totcol; a++) {
- mat1 = give_current_material(ob, a);
+ mat1 = BKE_object_material_get(ob, a);
if (mat1 == mat) {
ED_object_base_select(base, BA_SELECT);
@@ -681,7 +681,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
else if (nr == OBJECT_SELECT_LINKED_MATERIAL) {
Material *mat = NULL;
- mat = give_current_material(ob, ob->actcol);
+ mat = BKE_object_material_get(ob, ob->actcol);
if (mat == NULL) {
return OPERATOR_CANCELLED;
}