[Bf-blender-cvs] [b875cf7da93] usd-importer-T81257-merge: USD Import: warning fixes.

makowalski noreply at git.blender.org
Mon Apr 19 18:17:13 CEST 2021


Commit: b875cf7da93adc1181b655b79914678f8fb38916
Author: makowalski
Date:   Mon Apr 19 11:52:18 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rBb875cf7da93adc1181b655b79914678f8fb38916

USD Import: warning fixes.

Fixed warnings due to unused parameters and function.

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

M	source/blender/io/usd/intern/usd_capi_import.cc
M	source/blender/io/usd/intern/usd_reader_curve.cc
M	source/blender/io/usd/intern/usd_reader_prim.h
M	source/blender/io/usd/intern/usd_reader_volume.cc

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

diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index d59ce81a791..c789839c763 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -110,23 +110,6 @@ static bool gather_objects_paths(const pxr::UsdPrim &object, ListBase *object_pa
   return true;
 }
 
-/* Create a collection with the given parent and name. */
-static Collection *create_collection(Main *bmain, Collection *parent, const char *name)
-{
-  if (!bmain) {
-    return nullptr;
-  }
-
-  Collection *coll = BKE_collection_add(bmain, parent, name);
-
-  if (coll) {
-    id_fake_user_set(&coll->id);
-    DEG_id_tag_update(&coll->id, ID_RECALC_COPY_ON_WRITE);
-  }
-
-  return coll;
-}
-
 // Update the given import settings with the global rotation matrix to orient
 // imported objects with Z-up, if necessary
 static void set_global_rotation(pxr::UsdStageRefPtr stage, ImportSettings &r_settings)
@@ -451,7 +434,7 @@ bool USD_import(struct bContext *C,
   return import_ok;
 }
 
-static USDPrimReader *get_usd_reader(CacheReader *reader, Object *ob, const char **err_str)
+static USDPrimReader *get_usd_reader(CacheReader *reader, Object * /* ob */, const char **err_str)
 {
   USDPrimReader *usd_reader = reinterpret_cast<USDPrimReader *>(reader);
   pxr::UsdPrim iobject = usd_reader->prim();
diff --git a/source/blender/io/usd/intern/usd_reader_curve.cc b/source/blender/io/usd/intern/usd_reader_curve.cc
index a3519699bdd..177ac97eb5d 100644
--- a/source/blender/io/usd/intern/usd_reader_curve.cc
+++ b/source/blender/io/usd/intern/usd_reader_curve.cc
@@ -199,9 +199,9 @@ void USDCurvesReader::read_curve_sample(Curve *cu, const double motionSampleTime
 
 Mesh *USDCurvesReader::read_mesh(struct Mesh *existing_mesh,
                                  const double motionSampleTime,
-                                 const int read_flag,
-                                 const float vel_scale,
-                                 const char **err_str)
+                                 const int /* read_flag */,
+                                 const float /* vel_scale */,
+                                 const char ** /* err_str */)
 {
   if (!curve_prim_) {
     return existing_mesh;
diff --git a/source/blender/io/usd/intern/usd_reader_prim.h b/source/blender/io/usd/intern/usd_reader_prim.h
index 74feaa575ee..c5c2be9432f 100644
--- a/source/blender/io/usd/intern/usd_reader_prim.h
+++ b/source/blender/io/usd/intern/usd_reader_prim.h
@@ -101,7 +101,7 @@ class USDPrimReader {
   virtual bool valid() const;
 
   virtual void create_object(Main *bmain, double motionSampleTime) = 0;
-  virtual void read_object_data(Main *bmain, double motionSampleTime){};
+  virtual void read_object_data(Main * /* bmain */, double /* motionSampleTime */){};
 
   Object *object() const;
   void object(Object *ob);
diff --git a/source/blender/io/usd/intern/usd_reader_volume.cc b/source/blender/io/usd/intern/usd_reader_volume.cc
index f1626e9d4a1..175e541927d 100644
--- a/source/blender/io/usd/intern/usd_reader_volume.cc
+++ b/source/blender/io/usd/intern/usd_reader_volume.cc
@@ -54,7 +54,7 @@
 
 namespace blender::io::usd {
 
-void USDVolumeReader::create_object(Main *bmain, const double motionSampleTime)
+void USDVolumeReader::create_object(Main *bmain, const double /* motionSampleTime */)
 {
   Volume *volume = (Volume *)BKE_volume_add(bmain, name_.c_str());
   id_us_min(&volume->id);



More information about the Bf-blender-cvs mailing list