[Bf-blender-cvs] [ebb23c4fb50] usd-importer-T81257: Fixed capitalization in USD importer class names.

Michael A. Kowalski noreply at git.blender.org
Fri Oct 23 17:49:45 CEST 2020


Commit: ebb23c4fb506f884b83c3aee72d951d3d4342b73
Author: Michael A. Kowalski
Date:   Fri Oct 23 11:27:14 2020 -0400
Branches: usd-importer-T81257
https://developer.blender.org/rBebb23c4fb506f884b83c3aee72d951d3d4342b73

Fixed capitalization in USD importer class names.

Changed abbreviation Usd to USD in the reader classes.

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

M	source/blender/io/usd/import/usd_import_util.cc
M	source/blender/io/usd/import/usd_import_util.h
M	source/blender/io/usd/import/usd_reader_mesh.cc
M	source/blender/io/usd/import/usd_reader_mesh.h
M	source/blender/io/usd/import/usd_reader_object.cc
M	source/blender/io/usd/import/usd_reader_object.h
M	source/blender/io/usd/import/usd_reader_transform.cc
M	source/blender/io/usd/import/usd_reader_transform.h
M	source/blender/io/usd/intern/usd_capi.cc

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

diff --git a/source/blender/io/usd/import/usd_import_util.cc b/source/blender/io/usd/import/usd_import_util.cc
index d5f7ed90af2..182b6b8e7ac 100644
--- a/source/blender/io/usd/import/usd_import_util.cc
+++ b/source/blender/io/usd/import/usd_import_util.cc
@@ -89,15 +89,15 @@ inline void copy_zup_from_yup(float zup[3], const float yup[3])
 
 namespace blender::io::usd {
 
-static UsdObjectReader *get_reader(const pxr::UsdPrim &prim, const USDImporterContext &context)
+static USDObjectReader *get_reader(const pxr::UsdPrim &prim, const USDImporterContext &context)
 {
-  UsdObjectReader *result = nullptr;
+  USDObjectReader *result = nullptr;
 
   if (prim.IsA<pxr::UsdGeomMesh>()) {
-    result = new UsdMeshReader(prim, context);
+    result = new USDMeshReader(prim, context);
   }
   else if (prim.IsA<pxr::UsdGeomXform>()) {
-    result = new UsdTransformReader(prim, context);
+    result = new USDTransformReader(prim, context);
   }
 
   return result;
@@ -232,8 +232,8 @@ void copy_m44_axis_swap(float dst_mat[4][4], float src_mat[4][4], UsdAxisSwapMod
 
 void create_readers(const pxr::UsdPrim &prim,
                     const USDImporterContext &context,
-                    std::vector<UsdObjectReader *> &r_readers,
-                    std::vector<UsdObjectReader *> &r_child_readers)
+                    std::vector<USDObjectReader *> &r_readers,
+                    std::vector<USDObjectReader *> &r_child_readers)
 {
   if (!prim) {
     return;
@@ -241,7 +241,7 @@ void create_readers(const pxr::UsdPrim &prim,
 
   bool is_root = prim.IsPseudoRoot();
 
-  std::vector<UsdObjectReader *> child_readers;
+  std::vector<USDObjectReader *> child_readers;
 
   /* Recursively create readers for the child prims. */
   pxr::UsdPrimSiblingRange child_prims = prim.GetFilteredChildren(
@@ -279,10 +279,10 @@ void create_readers(const pxr::UsdPrim &prim,
     return;
   }
 
-  UsdObjectReader *reader = get_reader(prim, context);
+  USDObjectReader *reader = get_reader(prim, context);
 
   if (reader) {
-    for (UsdObjectReader *child_reader : child_readers) {
+    for (USDObjectReader *child_reader : child_readers) {
       child_reader->set_parent(reader);
     }
     r_child_readers.push_back(reader);
diff --git a/source/blender/io/usd/import/usd_import_util.h b/source/blender/io/usd/import/usd_import_util.h
index a925f2f41eb..40fd6fc2719 100644
--- a/source/blender/io/usd/import/usd_import_util.h
+++ b/source/blender/io/usd/import/usd_import_util.h
@@ -27,7 +27,7 @@
 namespace blender::io::usd {
 
 struct USDImporterContext;
-class UsdObjectReader;
+class USDObjectReader;
 
 void debug_traverse_stage(const pxr::UsdStageRefPtr &usd_stage);
 
@@ -59,7 +59,7 @@ BLI_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
 
 void create_readers(const pxr::UsdPrim &root,
                     const USDImporterContext &context,
-                    std::vector<UsdObjectReader *> &r_readers,
-                    std::vector<UsdObjectReader *> &r_child_readers);
+                    std::vector<USDObjectReader *> &r_readers,
+                    std::vector<USDObjectReader *> &r_child_readers);
 
 } /* namespace blender::io::usd */
diff --git a/source/blender/io/usd/import/usd_reader_mesh.cc b/source/blender/io/usd/import/usd_reader_mesh.cc
index 6c961e50727..4bfb9bc4f39 100644
--- a/source/blender/io/usd/import/usd_reader_mesh.cc
+++ b/source/blender/io/usd/import/usd_reader_mesh.cc
@@ -330,21 +330,21 @@ static void build_mtl_map(const Main *bmain, std::map<std::string, Material *> &
 
 namespace blender::io::usd {
 
-UsdMeshReader::UsdMeshReader(const pxr::UsdPrim &prim, const USDImporterContext &context)
-    : UsdObjectReader(prim, context), mesh_(prim)
+USDMeshReader::USDMeshReader(const pxr::UsdPrim &prim, const USDImporterContext &context)
+    : USDObjectReader(prim, context), mesh_(prim)
 {
 }
 
-UsdMeshReader::~UsdMeshReader()
+USDMeshReader::~USDMeshReader()
 {
 }
 
-bool UsdMeshReader::valid() const
+bool USDMeshReader::valid() const
 {
   return static_cast<bool>(mesh_);
 }
 
-Mesh *UsdMeshReader::read_mesh(Mesh *existing_mesh,
+Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
                                double time,
                                int read_flag,
                                const char **err_str)
@@ -410,7 +410,7 @@ Mesh *UsdMeshReader::read_mesh(Mesh *existing_mesh,
   return new_mesh;
 }
 
-void UsdMeshReader::readObjectData(Main *bmain, double time)
+void USDMeshReader::readObjectData(Main *bmain, double time)
 {
   if (!this->valid()) {
     return;
@@ -448,7 +448,7 @@ void UsdMeshReader::readObjectData(Main *bmain, double time)
   /* TODO(makowalski):  Add modifier. */
 }
 
-void UsdMeshReader::assign_materials(Main *bmain, Mesh *mesh, double time)
+void USDMeshReader::assign_materials(Main *bmain, Mesh *mesh, double time)
 {
   if (!bmain || !mesh || !object_ || !mesh_) {
     return;
diff --git a/source/blender/io/usd/import/usd_reader_mesh.h b/source/blender/io/usd/import/usd_reader_mesh.h
index 3421e49eee7..381213df2c0 100644
--- a/source/blender/io/usd/import/usd_reader_mesh.h
+++ b/source/blender/io/usd/import/usd_reader_mesh.h
@@ -24,14 +24,14 @@
 
 namespace blender::io::usd {
 
-class UsdMeshReader : public UsdObjectReader {
+class USDMeshReader : public USDObjectReader {
  protected:
   pxr::UsdGeomMesh mesh_;
 
  public:
-  UsdMeshReader(const pxr::UsdPrim &prim, const USDImporterContext &context);
+  USDMeshReader(const pxr::UsdPrim &prim, const USDImporterContext &context);
 
-  virtual ~UsdMeshReader();
+  virtual ~USDMeshReader();
 
   bool valid() const override;
 
diff --git a/source/blender/io/usd/import/usd_reader_object.cc b/source/blender/io/usd/import/usd_reader_object.cc
index 1ffa698f567..0e89bfd641f 100644
--- a/source/blender/io/usd/import/usd_reader_object.cc
+++ b/source/blender/io/usd/import/usd_reader_object.cc
@@ -42,7 +42,7 @@
 
 namespace blender::io::usd {
 
-UsdObjectReader::UsdObjectReader(const pxr::UsdPrim &prim, const USDImporterContext &context)
+USDObjectReader::USDObjectReader(const pxr::UsdPrim &prim, const USDImporterContext &context)
     : prim_path_(""),
       prim_parent_name_(""),
       prim_name_(""),
@@ -62,26 +62,26 @@ UsdObjectReader::UsdObjectReader(const pxr::UsdPrim &prim, const USDImporterCont
   prim_parent_name_ = parent ? parent.GetName().GetString() : prim_name_;
 }
 
-UsdObjectReader::~UsdObjectReader()
+USDObjectReader::~USDObjectReader()
 {
 }
 
-const pxr::UsdPrim &UsdObjectReader::prim() const
+const pxr::UsdPrim &USDObjectReader::prim() const
 {
   return prim_;
 }
 
-Object *UsdObjectReader::object() const
+Object *USDObjectReader::object() const
 {
   return object_;
 }
 
-void UsdObjectReader::setObject(Object *ob)
+void USDObjectReader::setObject(Object *ob)
 {
   object_ = ob;
 }
 
-struct Mesh *UsdObjectReader::read_mesh(struct Mesh *existing_mesh,
+struct Mesh *USDObjectReader::read_mesh(struct Mesh *existing_mesh,
                                         double UNUSED(time),
                                         int UNUSED(read_flag),
                                         const char **UNUSED(err_str))
@@ -89,14 +89,14 @@ struct Mesh *UsdObjectReader::read_mesh(struct Mesh *existing_mesh,
   return existing_mesh;
 }
 
-bool UsdObjectReader::topology_changed(Mesh * /*existing_mesh*/, double /*time*/)
+bool USDObjectReader::topology_changed(Mesh * /*existing_mesh*/, double /*time*/)
 {
   /* The default implementation of read_mesh() just returns the original mesh, so never changes the
    * topology. */
   return false;
 }
 
-void UsdObjectReader::setupObjectTransform(const double time)
+void USDObjectReader::setupObjectTransform(const double time)
 {
   if (!this->object_) {
     return;
@@ -114,7 +114,7 @@ void UsdObjectReader::setupObjectTransform(const double time)
   /* TODO(makowalski):  Set up transform constraint if not constant. */
 }
 
-void UsdObjectReader::read_matrix(float r_mat[4][4] /* local matrix */,
+void USDObjectReader::read_matrix(float r_mat[4][4] /* local matrix */,
                                   const double time,
                                   const float scale,
                                   bool &is_constant)
@@ -167,27 +167,27 @@ void UsdObjectReader::read_matrix(float r_mat[4][4] /* local matrix */,
   }
 }
 
-double UsdObjectReader::minTime() const
+double USDObjectReader::minTime() const
 {
   return min_time_;
 }
 
-double UsdObjectReader::maxTime() const
+double USDObjectReader::maxTime() const
 {
   return max_time_;
 }
 
-int UsdObjectReader::refcount() const
+int USDObjectReader::refcount() const
 {
   return refcount_;
 }
 
-void UsdObjectReader::incref()
+void USDObjectReader::incref()
 {
   refcount_++;
 }
 
-void UsdObjectReader::decref()
+void USDObjectReader::decref()
 {
   refcount_--;
   BLI_assert(refcount_ >= 0);
diff --git a/source/blender/io/usd/import/usd_reader_object.h b/source/blender/io/usd/import/usd_reader_object.h
index cfac26ca7d3..0c44516495e 100644
--- a/source/blender/io/usd/import/usd_reader_object.h
+++ b/source/blender/io/usd/import/usd_reader_object.h
@@ -32,9 +32,9 @@ struct Object;
 
 namespace blender::io::usd {
 
-class UsdObjectReader {
+class USDObjectReader {
  public:
-  typedef std::vector<UsdObjectReader *> ptr_vector;
+  typedef std::vector<USDObjectReader *> ptr_vector;
 
  protected:
   /* The USD prim path. */
@@ -59,14 +59,14 @@ class UsdObjectReader {
    * modifiers and/or constraints. */
   int refcount_;
 
-  UsdObjectReader *parent_;
+  USDObjectReader *parent_;
 
   bool merged_with_parent_;
 
  public:
-  explicit UsdObjectReader(const pxr::UsdPrim &prim, const USDImporterContext &context);
+  explicit USDObjectReader(const pxr::UsdPrim &prim, const USDImporterContext &context);
 
-  virtual ~UsdObjectReader();
+  virtual ~USDObjectReader();
 
   const pxr::UsdPrim &prim() const;
 
@@ -74,12 +74,12 @@ class UsdObjectReader {
 
   void setObject(Object *ob);
 
-  UsdObjectReader *parent() const
+  USDObjectReader *parent() const
   {
     return parent_;
   }
 
-  void set_parent(UsdObjectReader *par)
+  void set_parent(USDObjectReader *par)
   {
     parent_ = par;
   }
diff --git a/source/blender/io/usd/import/usd_reader_transform.cc b

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list