diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-25 02:06:41 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-25 02:06:41 +0300 |
commit | 2b158861a3a516dd8f4dac73f8984230f02bc9de (patch) | |
tree | 9f53ceec22962a730b3ca50c1f252ec71c5a26e6 /source/blender/editors | |
parent | 94eb1897523d4cf464ea0cdf90ccbd7db90f997d (diff) | |
parent | d91f2ac37aa02d96a00d116fa55cdc9f55afd32c (diff) |
merged collada rework from master into blender 2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/io/io_collada.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 1b7fd319da0..98c88ba5fc9 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -91,6 +91,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) int include_armatures; int include_shapekeys; int deform_bones_only; + int sampling_rate; int include_material_textures; int use_texture_copies; @@ -143,6 +144,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) include_children = RNA_boolean_get(op->ptr, "include_children"); include_armatures = RNA_boolean_get(op->ptr, "include_armatures"); include_shapekeys = RNA_boolean_get(op->ptr, "include_shapekeys"); + sampling_rate = RNA_int_get(op->ptr, "sampling_rate"); deform_bones_only = RNA_boolean_get(op->ptr, "deform_bones_only"); include_material_textures = RNA_boolean_get(op->ptr, "include_material_textures"); @@ -162,10 +164,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) /* get editmode results */ ED_object_editmode_load(CTX_data_edit_object(C)); - - export_count = collada_export(&eval_ctx, - CTX_data_scene(C), - CTX_data_view_layer(C), + export_count = collada_export(C, filepath, apply_modifiers, export_mesh_type, @@ -174,6 +173,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) include_armatures, include_shapekeys, deform_bones_only, + sampling_rate, active_uv_only, include_material_textures, @@ -238,6 +238,10 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) uiItemR(row, imfptr, "include_shapekeys", 0, NULL, ICON_NONE); uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); + row = uiLayoutRow(box, false); + uiItemR(row, imfptr, "sampling_rate", 0, NULL, ICON_NONE); + + /* Texture options */ box = uiLayoutBox(layout); row = uiLayoutRow(box, false); @@ -260,6 +264,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) row = uiLayoutRow(box, false); uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE); @@ -369,7 +374,10 @@ void WM_OT_collada_export(wmOperatorType *ot) "Export all Shape Keys from Mesh Objects"); RNA_def_boolean(func, "deform_bones_only", 0, "Deform Bones only", - "Only export deforming bones with armatures"); + "Only export deforming bones with armatures"); + + RNA_def_int(func, "sampling_rate", 0, -1, INT_MAX, + "Samplintg Rate", "The maximum distance of frames between 2 keyframes. Disabled when value is -1", -1, INT_MAX); RNA_def_boolean(func, "active_uv_only", 0, "Only Selected UV Map", |