From 2fb4de1f8c1b3117da47aff39972d92cc078dd29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Mar 2020 08:08:23 +1100 Subject: Cleanup: material API naming - Use 'BKE_object_material_*', 'BKE_id_material_*' prefix for functions that operate on Object and ID types. - Use '_len' suffix for length (matching BLI naming). - Use '_p' suffix for functions that return a pointer to values where the value would typically be returned. Functions renamed: - BKE_object_material_resize was BKE_material_resize_object - BKE_object_material_remap was BKE_material_remap_object - BKE_object_material_remap_calc was BKE_material_remap_object_calc - BKE_object_material_array_p was BKE_object_material_array - BKE_object_material_len_p was BKE_object_material_num - BKE_id_material_array_p was BKE_id_material_array - BKE_id_material_len_p was BKE_id_material_num - BKE_id_material_resize was BKE_material_resize_id - BKE_id_material_append was BKE_material_append_id - BKE_id_material_pop was BKE_material_pop_id - BKE_id_material_clear was BKE_material_clear_id --- source/blender/blenloader/intern/readfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c1f61db27c3..3107de38ff7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5086,11 +5086,11 @@ static void lib_link_object(FileData *fd, Main *bmain, Object *ob) /* When the object is local and the data is library its possible * the material list size gets out of sync. [#22663] */ if (ob->data && ob->id.lib != ((ID *)ob->data)->lib) { - const short *totcol_data = BKE_object_material_num(ob); + const short *totcol_data = BKE_object_material_len_p(ob); /* Only expand so as not to loose any object materials that might be set. */ if (totcol_data && (*totcol_data > ob->totcol)) { /* printf("'%s' %d -> %d\n", ob->id.name, ob->totcol, *totcol_data); */ - BKE_material_resize_object(bmain, ob, *totcol_data, false); + BKE_object_material_resize(bmain, ob, *totcol_data, false); } } -- cgit v1.2.3