Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-10-05 16:59:09 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-10-05 16:59:09 +0400
commit00ce0c9aae04a461d96dc626bc6651a3ba0211cf (patch)
treed328c4b59f348770cdaf16c2c3fe093b44a2eeba /source/blender/editors/object/object_ops.c
parenteb46c080a2d3b71beb626517e30ae2b5f2e60425 (diff)
Clean up in "add object" code:
* Get rid of ED_object_add_generic_invoke() and all invoke callbacks using it, it was doing nothing exec() callbacks would not do. In fact, its only action (setting part of common add ops properties, like loc, layers, etc.) was needed too by direct exec call, so it was done twice in case of using invoke()! * Replace custom invoke code for metaballs by WM_menu_invoke helper (as already used by lamps). * Add a new OBJECT_OT_empty_add op, to allow direct addition of empties of a given drawtype. * And some general code cleanup (like trailing spaces, empty lines, ...). Did quite a bunch of tests/verifications, but obviously could not tackle all possible scenarios... Anyway, if any, bugs should arize quite quickly (but I don’t expect any! :p ).
Diffstat (limited to 'source/blender/editors/object/object_ops.c')
-rw-r--r--source/blender/editors/object/object_ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index cec849efca7..181a98a8896 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -113,6 +113,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_delete);
WM_operatortype_append(OBJECT_OT_text_add);
WM_operatortype_append(OBJECT_OT_armature_add);
+ WM_operatortype_append(OBJECT_OT_empty_add);
WM_operatortype_append(OBJECT_OT_lamp_add);
WM_operatortype_append(OBJECT_OT_camera_add);
WM_operatortype_append(OBJECT_OT_speaker_add);