From 368b74315a58f66187b924cbc646abd05ce6a2b7 Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Mon, 3 Apr 2017 10:48:00 +0200 Subject: Collada - add flag to limit precision of exported data, mainly to simplify debugging --- source/blender/editors/io/io_collada.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/editors/io') diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index b8794afbf85..139c9817437 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -99,6 +99,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) int export_transformation_type; int open_sim; + int limit_precision; int keep_bind_info; int export_count; @@ -150,6 +151,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) export_transformation_type = RNA_enum_get(op->ptr, "export_transformation_type_selection"); open_sim = RNA_boolean_get(op->ptr, "open_sim"); + limit_precision = RNA_boolean_get(op->ptr, "limit_precision"); keep_bind_info = RNA_boolean_get(op->ptr, "keep_bind_info"); /* get editmode results */ @@ -178,6 +180,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) export_transformation_type, open_sim, + limit_precision, keep_bind_info ); @@ -276,9 +279,13 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) row = uiLayoutRow(box, false); uiItemR(row, imfptr, "sort_by_name", 0, NULL, ICON_NONE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "keep_bind_info", 0, NULL, ICON_NONE); + row = uiLayoutRow(box, false); + uiItemR(row, imfptr, "limit_precision", 0, NULL, ICON_NONE); + } static void wm_collada_export_draw(bContext *UNUSED(C), wmOperator *op) @@ -396,6 +403,9 @@ void WM_OT_collada_export(wmOperatorType *ot) RNA_def_boolean(func, "open_sim", 0, "Export to SL/OpenSim", "Compatibility mode for SL, OpenSim and other compatible online worlds"); + RNA_def_boolean(func, "limit_precision", 0, + "Limit Precision", "Reduce the precision of the exported data to 6 digits"); + RNA_def_boolean(func, "keep_bind_info", 0, "Keep Bind Info", "Store Bindpose information in custom bone properties for later use during Collada export"); -- cgit v1.2.3