From 216dec7eb1ae22ed5c2ab11ce559e7862566026f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Fri, 28 Oct 2016 18:21:43 +0200 Subject: Alembic Export: set start and end frame to that of the scene for convenience. Users will most likely export an entire animation rather than a single frame, so it can save a few clicks. --- source/blender/editors/io/io_alembic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/io/io_alembic.c') diff --git a/source/blender/editors/io/io_alembic.c b/source/blender/editors/io/io_alembic.c index 2256bd7f8c5..65af052dc5e 100644 --- a/source/blender/editors/io/io_alembic.c +++ b/source/blender/editors/io/io_alembic.c @@ -231,11 +231,20 @@ static void ui_alembic_export_settings(uiLayout *layout, PointerRNA *imfptr) uiItemR(row, imfptr, "ngon_method", 0, NULL, ICON_NONE); } -static void wm_alembic_export_draw(bContext *UNUSED(C), wmOperator *op) +static void wm_alembic_export_draw(bContext *C, wmOperator *op) { PointerRNA ptr; RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); + + /* Conveniently set start and end frame to match the scene's frame range. */ + Scene *scene = CTX_data_scene(C); + + if (scene != NULL) { + RNA_int_set(&ptr, "start", SFRA); + RNA_int_set(&ptr, "end", EFRA); + } + ui_alembic_export_settings(op->layout, &ptr); } -- cgit v1.2.3