From 00ce0c9aae04a461d96dc626bc6651a3ba0211cf Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 5 Oct 2012 12:59:09 +0000 Subject: 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, ...). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ). --- source/blender/editors/object/object_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/object/object_ops.c') 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); -- cgit v1.2.3 From b2a5f28421b73949b3267f2779bdcc72cd39d639 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 5 Oct 2012 14:51:35 +0000 Subject: Follow Path Constraint - "Animate Path" Operator Added a convenience operator to the Follow Path constraint which adds a F-Curve for the path (or the operator's "fixed position" value if no path is assigned), with options for setting the start frame and length of motion. This makes it easier for common users to just set up a quick follow-path animation where the camera (e.g. flying around a set over certain number of frames). A key advantage of this is that it takes care of the underlying math required for setting up the generator curve accordingly (I've got some plans for making this a bit friendlier to use later). Now, animating the paths is a one-click operation, with the start and length properties able to be controlled using the operator properties. --- source/blender/editors/object/object_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/object/object_ops.c') diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 181a98a8896..fa40d579e2b 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -169,6 +169,7 @@ void ED_operatortypes_object(void) WM_operatortype_append(CONSTRAINT_OT_childof_clear_inverse); WM_operatortype_append(CONSTRAINT_OT_objectsolver_set_inverse); WM_operatortype_append(CONSTRAINT_OT_objectsolver_clear_inverse); + WM_operatortype_append(CONSTRAINT_OT_followpath_path_animate); WM_operatortype_append(OBJECT_OT_vertex_group_add); WM_operatortype_append(OBJECT_OT_vertex_group_remove); -- cgit v1.2.3