Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/io/usd/import/usd_reader_prim.cc19
-rw-r--r--source/blender/io/usd/import/usd_reader_prim.h8
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc7
3 files changed, 2 insertions, 32 deletions
diff --git a/source/blender/io/usd/import/usd_reader_prim.cc b/source/blender/io/usd/import/usd_reader_prim.cc
index 587e2bf07a8..bfa1630fa11 100644
--- a/source/blender/io/usd/import/usd_reader_prim.cc
+++ b/source/blender/io/usd/import/usd_reader_prim.cc
@@ -27,8 +27,7 @@ USDPrimReader::USDPrimReader(const pxr::UsdPrim &prim, const USDImporterContext
prim_path_(""),
context_(context),
min_time_(std::numeric_limits<double>::max()),
- max_time_(std::numeric_limits<double>::min()),
- refcount_(0)
+ max_time_(std::numeric_limits<double>::min())
{
if (prim) {
prim_path_ = prim.GetPath().GetString();
@@ -54,20 +53,4 @@ double USDPrimReader::max_time() const
return max_time_;
}
-int USDPrimReader::refcount() const
-{
- return refcount_;
-}
-
-void USDPrimReader::incref()
-{
- refcount_++;
-}
-
-void USDPrimReader::decref()
-{
- refcount_--;
- BLI_assert(refcount_ >= 0);
-}
-
} /* namespace blender::io::usd */
diff --git a/source/blender/io/usd/import/usd_reader_prim.h b/source/blender/io/usd/import/usd_reader_prim.h
index a1fa1a9057d..0f46452895e 100644
--- a/source/blender/io/usd/import/usd_reader_prim.h
+++ b/source/blender/io/usd/import/usd_reader_prim.h
@@ -42,10 +42,6 @@ class USDPrimReader {
double min_time_;
double max_time_;
- /* Use reference counting since the same reader may be used by multiple
- * modifiers and/or constraints. */
- int refcount_;
-
public:
explicit USDPrimReader(const pxr::UsdPrim &prim, const USDImporterContext &context);
@@ -80,10 +76,6 @@ class USDPrimReader {
double min_time() const;
double max_time() const;
-
- int refcount() const;
- void incref();
- void decref();
};
} /* namespace blender::io::usd */
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index aabe02bce04..4e64ae1e8c5 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -395,12 +395,7 @@ static void import_endjob(void *user_data)
}
for (iter = data->readers.begin(); iter != data->readers.end(); ++iter) {
- USDXformableReader *reader = *iter;
- reader->decref();
-
- if (reader->refcount() == 0) {
- delete reader;
- }
+ delete *iter;
}
data->readers.clear();