From fdc5f9c0a81bba0be6bab5120cdfc955d63265d5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 May 2015 12:25:33 +1000 Subject: Add name argument to data creation API calls Was adding then renaming, unnecessarily. --- source/blender/blenkernel/BKE_object.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/BKE_object.h') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 0ddc9b0b256..0e0c779c033 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -33,6 +33,8 @@ extern "C" { #endif +#include "BLI_compiler_attrs.h" + struct Base; struct EvaluationContext; struct Scene; @@ -82,9 +84,18 @@ bool BKE_object_is_in_editmode(struct Object *ob); bool BKE_object_is_in_editmode_vgroup(struct Object *ob); bool BKE_object_is_in_wpaint_select_vert(struct Object *ob); -struct Object *BKE_object_add_only_object(struct Main *bmain, int type, const char *name); -struct Object *BKE_object_add(struct Main *bmain, struct Scene *scene, int type); -void *BKE_object_obdata_add_from_type(struct Main *bmain, int type); +struct Object *BKE_object_add_only_object( + struct Main *bmain, + int type, const char *name) + ATTR_NONNULL(1) ATTR_RETURNS_NONNULL; +struct Object *BKE_object_add( + struct Main *bmain, struct Scene *scene, + int type, const char *name) + ATTR_NONNULL(1, 2) ATTR_RETURNS_NONNULL; +void *BKE_object_obdata_add_from_type( + struct Main *bmain, + int type, const char *name) + ATTR_NONNULL(1); void BKE_object_lod_add(struct Object *ob); void BKE_object_lod_sort(struct Object *ob); -- cgit v1.2.3