diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-23 17:14:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-23 17:14:59 +0400 |
commit | bc5c5bbddc66244ae7f1847f398295ec198fdc80 (patch) | |
tree | d5f24b3ef5851cb380595020a5389da69bcb2bc2 | |
parent | 2673966678cafd364a7c0f19107e025912831fd8 (diff) |
quiet error message when saving (WM_OT_save_as_mainfile.use_mesh_compat not found).
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index eddd3c4f3ab..a7502dd8c22 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2008,8 +2008,14 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) if(RNA_boolean_get(op->ptr, "relative_remap")) fileflags |= G_FILE_RELATIVE_REMAP; else fileflags &= ~G_FILE_RELATIVE_REMAP; #ifdef USE_BMESH_SAVE_AS_COMPAT - if(RNA_boolean_get(op->ptr, "use_mesh_compat")) fileflags |= G_FILE_MESH_COMPAT; - else fileflags &= ~G_FILE_MESH_COMPAT; + /* property only exists for 'Save As' */ + if (RNA_struct_find_property(op->ptr, "use_mesh_compat")) { + if(RNA_boolean_get(op->ptr, "use_mesh_compat")) fileflags |= G_FILE_MESH_COMPAT; + else fileflags &= ~G_FILE_MESH_COMPAT; + } + else { + fileflags &= ~G_FILE_MESH_COMPAT; + } #endif if ( WM_write_file(C, path, fileflags, op->reports, copy) != 0) |