[Bf-blender-cvs] [dfab4cab50a] temp-sybren-usd-patch-01: USD: separate typedef `DupliAndDuplicator`

Sybren A. Stüvel noreply at git.blender.org
Tue Nov 26 18:22:07 CET 2019


Commit: dfab4cab50aafcca06582ef1105eceec3ec21202
Author: Sybren A. Stüvel
Date:   Tue Nov 26 12:31:38 2019 +0100
Branches: temp-sybren-usd-patch-01
https://developer.blender.org/rBdfab4cab50aafcca06582ef1105eceec3ec21202

USD: separate typedef `DupliAndDuplicator`

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

M	source/blender/usd/intern/abstract_hierarchy_iterator.cc
M	source/blender/usd/intern/abstract_hierarchy_iterator.h

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

diff --git a/source/blender/usd/intern/abstract_hierarchy_iterator.cc b/source/blender/usd/intern/abstract_hierarchy_iterator.cc
index df12bc994ec..d61df885ecc 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.cc
@@ -126,7 +126,7 @@ void AbstractHierarchyIterator::debug_print_export_graph() const
 {
   size_t total_graph_size = 0;
   for (const ExportGraph::value_type &map_iter : export_graph) {
-    const std::pair<Object *, Object *> &parent_info = map_iter.first;
+    const DupliAndDuplicator &parent_info = map_iter.first;
     Object *const export_parent = parent_info.first;
     Object *const duplicator = parent_info.second;
 
diff --git a/source/blender/usd/intern/abstract_hierarchy_iterator.h b/source/blender/usd/intern/abstract_hierarchy_iterator.h
index 96c236bcf52..8dde8c90439 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.h
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.h
@@ -126,8 +126,11 @@ class AbstractHierarchyIterator {
  public:
   // Mapping from export path to writer.
   typedef std::map<std::string, AbstractHierarchyWriter *> WriterMap;
-  // Mapping from <object, duplicator> to the object's export-children.
-  typedef std::map<std::pair<Object *, Object *>, std::set<HierarchyContext *>> ExportGraph;
+  // Pair of a duplicated object and its duplicator, typically a pair of HierarchyContext::object
+  // and HierarchyContext::duplicator.
+  typedef std::pair<Object *, Object *> DupliAndDuplicator;
+  // Mapping from an object and its duplicator to the object's export-children.
+  typedef std::map<DupliAndDuplicator, std::set<HierarchyContext *>> ExportGraph;
   // Mapping from duplicator ID to export path.
   typedef std::map<ID *, std::string> ExportPathMap;



More information about the Bf-blender-cvs mailing list