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

Sybren A. Stüvel noreply at git.blender.org
Thu Nov 28 17:55:24 CET 2019


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

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