Commit: 216dec7eb1ae22ed5c2ab11ce559e7862566026f
Author: Kévin Dietrich
Date:   Fri Oct 28 18:21:43 2016 +0200
Branches: master
https://developer.blender.org/rB216dec7eb1ae22ed5c2ab11ce559e7862566026f

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.

===================================================================

M       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 2256bd7..65af052 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);
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to