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-07 22:09:59 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-05-07 22:09:59 +0400
commit98ba7dfecf454d8536ef63d8a5bd31c2e687a62e (patch)
tree5593f5f1f663ffd0c91a8c734ebda5d653491c41 /source/blender/windowmanager
parent353ef9541a37faa009e62a2969fc96d160260c6b (diff)
Collada: patch #31331: Implementation of 'Apply Modifiers'
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1a9a5ff2cb6..27c4a38c131 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2154,7 +2154,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;
+ int selected, second_life, apply_modifiers;
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
@@ -2162,13 +2162,16 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
}
RNA_string_get(op->ptr, "filepath", filename);
- selected = RNA_boolean_get(op->ptr, "selected");
- second_life = RNA_boolean_get(op->ptr, "second_life");
+
+ /* 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");
/* get editmode results */
ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */
- if (collada_export(CTX_data_scene(C), filename, selected, second_life)) {
+ if (collada_export(CTX_data_scene(C), filename, selected, apply_modifiers, second_life)) {
return OPERATOR_FINISHED;
}
else {
@@ -2187,8 +2190,10 @@ static void WM_OT_collada_export(wmOperatorType *ot)
ot->poll = WM_operator_winactive;
WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
- RNA_def_boolean(ot->srna, "selected", 0, "Export only selected",
+ 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, "second_life", 0, "Export for Second Life",
"Compatibility mode for Second Life");
}