[Bf-blender-cvs] [f132a7d] temp-material-remap: use range function
Campbell Barton
noreply at git.blender.org
Mon Apr 27 22:58:42 CEST 2015
Commit: f132a7d9260a8d25f53c4c44aff609af2a090640
Author: Campbell Barton
Date: Tue Apr 28 06:58:24 2015 +1000
Branches: temp-material-remap
https://developer.blender.org/rBf132a7d9260a8d25f53c4c44aff609af2a090640
use range function
===================================================================
M source/blender/editors/render/render_shading.c
===================================================================
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 2ea49e3..73a75c1 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -41,8 +41,9 @@
#include "DNA_space_types.h"
#include "DNA_world_types.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_listbase.h"
+#include "BLI_math_vector.h"
#include "BLF_translation.h"
@@ -413,9 +414,7 @@ static int material_slot_move_exec(bContext *C, wmOperator *op)
slot_remap = MEM_mallocN(sizeof(unsigned int) * ob->totcol, __func__);
- for (int index = 0; index < ob->totcol; index++) {
- slot_remap[index] = index;
- }
+ range_vn_u(slot_remap, ob->totcol, 0);
slot_remap[index_a] = index_b;
slot_remap[index_b] = index_a;
More information about the Bf-blender-cvs
mailing list