[Bf-blender-cvs] [116795d9a44] collada: Collada: Added Option "All actions" for exporting animation libs

Gaia Clary noreply at git.blender.org
Wed Mar 28 21:30:18 CEST 2018


Commit: 116795d9a44daffd7e2403c727b2be2cfddc2e11
Author: Gaia Clary
Date:   Sun Mar 4 16:18:08 2018 +0100
Branches: collada
https://developer.blender.org/rB116795d9a44daffd7e2403c727b2be2cfddc2e11

Collada: Added Option "All actions" for exporting animation libs

This is work in progress. The follow up changes in
the exporter will eventually make use of the new options.
Currently the new option does nothing.

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

M	source/blender/collada/ExportSettings.h
M	source/blender/editors/io/io_collada.c

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

diff --git a/source/blender/collada/ExportSettings.h b/source/blender/collada/ExportSettings.h
index fa6751bef60..66fce31b805 100644
--- a/source/blender/collada/ExportSettings.h
+++ b/source/blender/collada/ExportSettings.h
@@ -58,6 +58,7 @@ typedef struct ExportSettings {
 	bool include_shapekeys;
 	bool deform_bones_only;
 	bool include_animations;
+	bool include_all_actions;
 	int sampling_rate;
 
 	bool active_uv_only;
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index e6c9b924c7f..78a8d28cfdd 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_animations;
 	int sample_animations;
+	int include_all_actions;
 	int sampling_rate;
 
 	int export_texture_type;
@@ -145,6 +146,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
 
 	include_animations       = RNA_boolean_get(op->ptr, "include_animations");
 	sample_animations        = RNA_boolean_get(op->ptr, "sample_animations");
+	include_all_actions      = RNA_boolean_get(op->ptr, "include_all_actions");
 	sampling_rate            = (sample_animations)? RNA_int_get(op->ptr, "sampling_rate") : 0;
 
 	deform_bones_only        = RNA_boolean_get(op->ptr, "deform_bones_only");
@@ -179,7 +181,8 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
 	export_settings.include_armatures = include_armatures != 0;
 	export_settings.include_shapekeys = include_shapekeys != 0;
 	export_settings.deform_bones_only = deform_bones_only != 0;
-	export_settings.include_animations = include_animations;
+	export_settings.include_animations = include_animations != 0;
+	export_settings.include_all_actions = include_all_actions != 0;
 	export_settings.sampling_rate = sampling_rate;
 
 	export_settings.active_uv_only = active_uv_only != 0;
@@ -258,6 +261,8 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
 	uiItemR(row, imfptr, "include_animations", 0, NULL, ICON_NONE);
 	row = uiLayoutRow(box, false);
 	if (include_animations) {
+		uiItemR(row, imfptr, "include_all_actions", 0, NULL, ICON_NONE);
+		row = uiLayoutColumn(box, false);
 		uiItemR(row, imfptr, "sample_animations", 0, NULL, ICON_NONE);
 		row = uiLayoutColumn(box, false);
 		uiItemR(row, imfptr, "sampling_rate", 0, NULL, ICON_NONE);
@@ -406,6 +411,9 @@ void WM_OT_collada_export(wmOperatorType *ot)
 	RNA_def_boolean(func, "include_animations", true,
 		"Include Animations", "Export Animations if available.\nExporting Animations will enforce the decomposition of node transforms\ninto  <translation> <rotation> and <scale> components");
 
+	RNA_def_boolean(func, "include_all_actions", true,
+		"Include all Actions", "Export also unassigned actions.\nThis allows you to export entire animation libraries for your charater(s)");
+
 	RNA_def_boolean(func, "sample_animations", 0,
 		"Sample Animations", "Auto-generate keyframes with a frame distance set by 'Sampling Rate'.\nWhen disabled, export only the keyframes defined in the animation f-curves (may be less accurate)");



More information about the Bf-blender-cvs mailing list