[Bf-blender-cvs] [059cc1950bc] usd-importer-T81257-merge: USD Import: rename global_read_flag parameter.

makowalski noreply at git.blender.org
Thu Jul 22 22:09:11 CEST 2021


Commit: 059cc1950bc4cc3b2ebc4cfecb965a15402d46b7
Author: makowalski
Date:   Thu Jul 22 13:22:51 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB059cc1950bc4cc3b2ebc4cfecb965a15402d46b7

USD Import: rename global_read_flag parameter.

Renamed the global_read_flag import option and
parameter to mesh_read_flag.

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

M	source/blender/editors/io/io_usd.c
M	source/blender/io/usd/intern/usd_reader_geom.cc
M	source/blender/io/usd/intern/usd_reader_mesh.cc
M	source/blender/io/usd/usd.h

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

diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index 1d5d3510ef9..063bdde3c86 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -287,7 +287,7 @@ static int wm_usd_import_exec(bContext *C, wmOperator *op)
   const float scale = RNA_float_get(op->ptr, "scale");
 
   const bool set_frame_range = RNA_boolean_get(op->ptr, "set_frame_range");
-  const char global_read_flag = RNA_enum_get(op->ptr, "global_read_flag");
+  const char mesh_read_flag = RNA_enum_get(op->ptr, "mesh_read_flag");
   const bool import_cameras = RNA_boolean_get(op->ptr, "import_cameras");
   const bool import_curves = RNA_boolean_get(op->ptr, "import_curves");
   const bool import_lights = RNA_boolean_get(op->ptr, "import_lights");
@@ -335,7 +335,7 @@ static int wm_usd_import_exec(bContext *C, wmOperator *op)
                                    .sequence_len = sequence_len,
                                    .offset = offset,
                                    .validate_meshes = validate_meshes,
-                                   .global_read_flag = global_read_flag,
+                                   .mesh_read_flag = mesh_read_flag,
                                    .import_cameras = import_cameras,
                                    .import_curves = import_curves,
                                    .import_lights = import_lights,
@@ -380,7 +380,7 @@ static void wm_usd_import_draw(bContext *UNUSED(C), wmOperator *op)
   uiItemR(box, ptr, "scale", 0, NULL, ICON_NONE);
 
   box = uiLayoutBox(layout);
-  uiItemR(box, ptr, "global_read_flag", 0, NULL, ICON_NONE);
+  uiItemR(box, ptr, "mesh_read_flag", 0, NULL, ICON_NONE);
   col = uiLayoutColumnWithHeading(box, true, IFACE_("Include"));
   uiItemR(col, ptr, "import_subdiv", 0, IFACE_("Subdivision"), ICON_NONE);
   uiItemR(col, ptr, "import_instance_proxies", 0, NULL, ICON_NONE);
@@ -479,7 +479,7 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
                   "Add all imported objects to a new collection");
 
   prop = RNA_def_enum(ot->srna,
-                      "global_read_flag",
+                      "mesh_read_flag",
                       rna_enum_usd_import_read_flags,
                       0,
                       "Mesh Data",
diff --git a/source/blender/io/usd/intern/usd_reader_geom.cc b/source/blender/io/usd/intern/usd_reader_geom.cc
index c06bab4b758..c7477177372 100644
--- a/source/blender/io/usd/intern/usd_reader_geom.cc
+++ b/source/blender/io/usd/intern/usd_reader_geom.cc
@@ -42,7 +42,7 @@ void USDGeomReader::add_cache_modifier()
 
   mcmd->cache_file = settings_->cache_file;
   id_us_plus(&mcmd->cache_file->id);
-  mcmd->read_flag = import_params_.global_read_flag;
+  mcmd->read_flag = import_params_.mesh_read_flag;
 
   BLI_strncpy(mcmd->object_path, prim_.GetPath().GetString().c_str(), FILE_MAX);
 }
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc
index fd89e9e1699..4ac9a01f5d5 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -200,7 +200,7 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime)
 
   is_initial_load_ = true;
   Mesh *read_mesh = this->read_mesh(
-      mesh, motionSampleTime, import_params_.global_read_flag, nullptr);
+      mesh, motionSampleTime, import_params_.mesh_read_flag, nullptr);
 
   is_initial_load_ = false;
   if (read_mesh != mesh) {
diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h
index 133123af916..fd19af5f505 100644
--- a/source/blender/io/usd/usd.h
+++ b/source/blender/io/usd/usd.h
@@ -50,7 +50,7 @@ struct USDImportParams {
   int sequence_len;
   int offset;
   bool validate_meshes;
-  char global_read_flag;
+  char mesh_read_flag;
   bool import_cameras;
   bool import_curves;
   bool import_lights;



More information about the Bf-blender-cvs mailing list