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/sculpt_paint
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/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c12
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 6d1a32d1c45..a36da7a17e6 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1170,7 +1170,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
/* entering paint mode also sets image to editors */
if (imapaint->mode == IMAGEPAINT_MODE_MATERIAL) {
/* set the current material active paint slot on image editor */
- Material *ma = give_current_material(ob, ob->actcol);
+ Material *ma = BKE_object_material_get(ob, ob->actcol);
if (ma && ma->texpaintslot) {
ima = ma->texpaintslot[ma->paint_active_slot].ima;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index d649f5017eb..8faf5cba341 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4088,7 +4088,7 @@ static bool proj_paint_state_mesh_eval_init(const bContext *C, ProjPaintState *p
* the materials by using the mf->mat_nr directly and leaving the last
* material as NULL in case no materials exist on mesh, so indexing will not fail. */
for (int i = 0; i < totmat - 1; i++) {
- ps->mat_array[i] = give_current_material(ob, i + 1);
+ ps->mat_array[i] = BKE_object_material_get(ob, i + 1);
}
ps->mat_array[totmat - 1] = NULL;
@@ -6381,7 +6381,7 @@ bool BKE_paint_proj_mesh_data_check(
hastex = false;
for (i = 1; i < ob->totcol + 1; i++) {
- Material *ma = give_current_material(ob, i);
+ Material *ma = BKE_object_material_get(ob, i);
if (ma) {
hasmat = true;
@@ -6573,7 +6573,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
return false;
}
- ma = give_current_material(ob, ob->actcol);
+ ma = BKE_object_material_get(ob, ob->actcol);
if (ma) {
Main *bmain = CTX_data_main(C);
@@ -6686,11 +6686,11 @@ static int get_texture_layer_type(wmOperator *op, const char *prop_name)
static Material *get_or_create_current_material(bContext *C, Object *ob)
{
- Material *ma = give_current_material(ob, ob->actcol);
+ Material *ma = BKE_object_material_get(ob, ob->actcol);
if (!ma) {
Main *bmain = CTX_data_main(C);
ma = BKE_material_add(bmain, "Material");
- assign_material(bmain, ob, ma, ob->actcol, BKE_MAT_ASSIGN_USERPREF);
+ BKE_object_material_assign(bmain, ob, ma, ob->actcol, BKE_MAT_ASSIGN_USERPREF);
}
return ma;
}
@@ -6716,7 +6716,7 @@ static void get_default_texture_layer_name_for_object(Object *ob,
char *dst,
int dst_length)
{
- Material *ma = give_current_material(ob, ob->actcol);
+ Material *ma = BKE_object_material_get(ob, ob->actcol);
const char *base_name = ma ? &ma->id.name[2] : &ob->id.name[2];
BLI_snprintf(dst, dst_length, "%s %s", base_name, layer_type_items[texture_type].name);
}
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index db22729e8b0..e799e54188d 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -348,7 +348,7 @@ static void imapaint_pick_uv(Mesh *me_eval,
const Material *ma;
const TexPaintSlot *slot;
- ma = give_current_material(ob_eval, mp->mat_nr + 1);
+ ma = BKE_object_material_get(ob_eval, mp->mat_nr + 1);
slot = &ma->texpaintslot[ma->paint_active_slot];
if (!(slot && slot->uvname &&
@@ -405,7 +405,7 @@ static Image *imapaint_face_image(Object *ob, Mesh *me, int face_index)
{
Image *ima;
MPoly *mp = me->mpoly + face_index;
- Material *ma = give_current_material(ob, mp->mat_nr + 1);
+ Material *ma = BKE_object_material_get(ob, mp->mat_nr + 1);
ima = ma && ma->texpaintslot ? ma->texpaintslot[ma->paint_active_slot].ima : NULL;
return ima;