[Bf-blender-cvs] [07bacb423b1] temp-legacy-mesh-format-option: Merge branch 'master' into temp-legacy-mesh-format-option

Hans Goudey noreply at git.blender.org
Wed Jun 29 01:48:55 CEST 2022


Commit: 07bacb423b10b796aca7527bce514a501270af51
Author: Hans Goudey
Date:   Tue Jun 28 18:48:38 2022 -0500
Branches: temp-legacy-mesh-format-option
https://developer.blender.org/rB07bacb423b10b796aca7527bce514a501270af51

Merge branch 'master' into temp-legacy-mesh-format-option

===================================================================



===================================================================

diff --cc source/blender/windowmanager/intern/wm_files.c
index 011ad44853e,5f4c39e33f7..9bee5841d0a
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@@ -3065,11 -3063,7 +3065,8 @@@ static int wm_save_as_mainfile_exec(bCo
    Main *bmain = CTX_data_main(C);
    char path[FILE_MAX];
    const bool is_save_as = (op->type->invoke == wm_save_as_mainfile_invoke);
-   const bool use_save_as_copy = (RNA_struct_property_is_set(op->ptr, "copy") &&
-                                  RNA_boolean_get(op->ptr, "copy"));
-   const bool use_legacy_mesh_format = (RNA_struct_property_is_set(op->ptr,
-                                                                   "use_legacy_mesh_format") &&
-                                        RNA_boolean_get(op->ptr, "use_legacy_mesh_format"));
+   const bool use_save_as_copy = RNA_boolean_get(op->ptr, "copy");
++  const bool use_legacy_mesh_format = RNA_boolean_get(op->ptr, "use_legacy_mesh_format");
  
    /* We could expose all options to the users however in most cases remapping
     * existing relative paths is a good default.
@@@ -3205,12 -3198,6 +3202,13 @@@ void WM_OT_save_as_mainfile(wmOperatorT
        "Save Copy",
        "Save a copy of the actual working state but does not make saved file active");
    RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 +  prop = RNA_def_boolean(
 +      ot->srna,
 +      "use_legacy_mesh_format",
 +      false,
 +      "Legacy Mesh Format",
 +      "Save mesh data with a legacy format that can be read by earlier versions");
++  RNA_def_property_flag(prop, PROP_SKIP_SAVE);
  }
  
  static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))



More information about the Bf-blender-cvs mailing list