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)