diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-28 19:21:43 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-28 19:21:43 +0300 |
commit | 216dec7eb1ae22ed5c2ab11ce559e7862566026f (patch) | |
tree | 2de5b8734041e8914992a330d3bb407095f24034 /source | |
parent | 65c481e1457b7daf1ef3d1c41346070d345c1dcd (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/io/io_alembic.c | 11 |
1 files changed, 10 insertions, 1 deletions
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); } |