From a8d1c893e8cea727d24f0bd8c64732fadcbcbcf2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Aug 2013 10:21:11 +0000 Subject: make materials.pop() and more like pythons list.pop - allow negative index values. - error when invalid index value are passed in. - remove last item if no index argument is given. also change behavior to remove the material slot, it was only clearning by default but the list length remained the same. --- source/blender/blenkernel/BKE_material.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_material.h') diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 7c47380f838..5d8406ba76f 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -88,7 +88,7 @@ int object_remove_material_slot(struct Object *ob); /* rna api */ void material_append_id(struct ID *id, struct Material *ma); -struct Material *material_pop_id(struct ID *id, int index, int remove_material_slot); /* index is an int because of RNA */ +struct Material *material_pop_id(struct ID *id, int index, bool remove_material_slot); /* index is an int because of RNA */ /* rendering */ -- cgit v1.2.3