Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-05-24 18:56:09 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-05-24 18:56:09 +0400
commitda67c969b38d748049ddd118a21fa046241739fe (patch)
treed866705bb0ecde30c6cd2f5f647d15b283e113fd /source/blender/windowmanager
parent09344fb1027a03158cf151ec45891ab339c478fc (diff)
Patch #31570: Implementation of 'Include bone children' Option
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 4c396d2d6d3..05af3c04573 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2155,7 +2155,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
static int wm_collada_export_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
- int selected, second_life, apply_modifiers;
+ int selected, second_life, apply_modifiers, include_bone_children;
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
@@ -2165,14 +2165,22 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", filename);
/* Options panel */
- selected = RNA_boolean_get(op->ptr, "selected");
- second_life = RNA_boolean_get(op->ptr, "second_life");
- apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
+ selected = RNA_boolean_get(op->ptr, "selected");
+ apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
+ include_bone_children = RNA_boolean_get(op->ptr, "include_bone_children");
+
+ second_life = RNA_boolean_get(op->ptr, "second_life");
/* get editmode results */
ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
- if (collada_export(CTX_data_scene(C), filename, selected, apply_modifiers, second_life)) {
+ if (collada_export(
+ CTX_data_scene(C),
+ filename,
+ selected,
+ apply_modifiers,
+ include_bone_children,
+ second_life)) {
return OPERATOR_FINISHED;
}
else {
@@ -2193,10 +2201,16 @@ static void WM_OT_collada_export(wmOperatorType *ot)
ot->flag |= OPTYPE_PRESET;
WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+
RNA_def_boolean(ot->srna, "selected", 0, "Selection Only",
"Export only selected elements");
+
RNA_def_boolean(ot->srna, "apply_modifiers", 0, "Apply Modifiers",
"Apply modifiers (Preview Resolution)");
+
+ RNA_def_boolean(ot->srna, "include_bone_children", 0, "Include Bone Children",
+ "Include all objects attached to bones of selected Armature(s)");
+
RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
"Compatibility mode for Second Life");
}