diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-02-18 02:22:43 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-02-18 02:22:50 +0400 |
commit | 3d7e0aae52c9d30739a001826c3f6b3331270f36 (patch) | |
tree | 7cec2afa2deb2084118b8c301df6bfed080b4807 | |
parent | 787623e4a36cdabbf4cb0897fb3fd8446d7ce993 (diff) |
bpy.ops.object.add_named() doesnt provide error when failed (related to T38689)
-rw-r--r-- | source/blender/editors/object/object_add.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 315b18a3837..a2101716dbf 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2170,8 +2170,11 @@ static int add_named_exec(bContext *C, wmOperator *op) /* find object, create fake base */ RNA_string_get(op->ptr, "name", name); ob = (Object *)BKE_libblock_find_name(ID_OB, name); - if (ob == NULL) + + if (ob == NULL) { + BKE_report(op->reports, RPT_ERROR, "Object not found"); return OPERATOR_CANCELLED; + } base = MEM_callocN(sizeof(Base), "duplibase"); base->object = ob; @@ -2185,6 +2188,7 @@ static int add_named_exec(bContext *C, wmOperator *op) if (basen == NULL) { MEM_freeN(base); + BKE_report(op->reports, RPT_ERROR, "Object could not be duplicated"); return OPERATOR_CANCELLED; } |