svn merge ^/trunk/blender -r46300:46330
[blender.git] / source / blender / windowmanager / intern / wm_operators.c
index 36bacd34dfe8f58118b9e95113f857a5fe246359..8f12ffc955cad3614b7ec323c0dc4a7fb81ba3b5 100644 (file)
@@ -84,7 +84,6 @@
 
 #include "ED_screen.h"
 #include "ED_util.h"
-#include "ED_object.h"
 
 #include "RNA_access.h"
 #include "RNA_define.h"
@@ -2134,12 +2133,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
 {      
        if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
                char filepath[FILE_MAX];
-
-               if (G.main->name[0] == 0)
-                       BLI_strncpy(filepath, "untitled", sizeof(filepath));
-               else
-                       BLI_strncpy(filepath, G.main->name, sizeof(filepath));
-
+               BLI_strncpy(filepath, G.main->name, sizeof(filepath));
                BLI_replace_extension(filepath, sizeof(filepath), ".dae");
                RNA_string_set(op->ptr, "filepath", filepath);
        }
@@ -2163,10 +2157,6 @@ 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");
-
-       /* 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)) {
                return OPERATOR_FINISHED;
        }