~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/windowmanager/intern/wm_operators.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-05-12 20:02:22 UTC
  • mfrom: (14.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20120512200222-lznjs2cxzaq96wua
Tags: 2.63a-1
* New upstream bugfix release
  + debian/patches/: re-worked since source code changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
#include "ED_screen.h"
86
86
#include "ED_util.h"
 
87
#include "ED_object.h"
87
88
 
88
89
#include "RNA_access.h"
89
90
#include "RNA_define.h"
2129
2130
{       
2130
2131
        if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
2131
2132
                char filepath[FILE_MAX];
2132
 
                BLI_strncpy(filepath, G.main->name, sizeof(filepath));
 
2133
 
 
2134
                if (G.main->name[0] == 0)
 
2135
                        BLI_strncpy(filepath, "untitled", sizeof(filepath));
 
2136
                else
 
2137
                        BLI_strncpy(filepath, G.main->name, sizeof(filepath));
 
2138
 
2133
2139
                BLI_replace_extension(filepath, sizeof(filepath), ".dae");
2134
2140
                RNA_string_set(op->ptr, "filepath", filepath);
2135
2141
        }
2153
2159
        RNA_string_get(op->ptr, "filepath", filename);
2154
2160
        selected = RNA_boolean_get(op->ptr, "selected");
2155
2161
        second_life = RNA_boolean_get(op->ptr, "second_life");
 
2162
 
 
2163
        /* get editmode results */
 
2164
        ED_object_exit_editmode(C, 0);  /* 0 = does not exit editmode */
 
2165
 
2156
2166
        if (collada_export(CTX_data_scene(C), filename, selected, second_life)) {
2157
2167
                return OPERATOR_FINISHED;
2158
2168
        }