[Bf-blender-cvs] [a3481d1c23c] sybren-usd-experiments: Beaaaautiful
Sybren A. Stüvel
noreply at git.blender.org
Fri Jun 14 18:06:45 CEST 2019
Commit: a3481d1c23c6fb344606af0fc5a9020925cc3001
Author: Sybren A. Stüvel
Date: Fri Jun 14 17:35:15 2019 +0200
Branches: sybren-usd-experiments
https://developer.blender.org/rBa3481d1c23c6fb344606af0fc5a9020925cc3001
Beaaaautiful
===================================================================
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 513d31960cc..61d43a86b60 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.cc
@@ -6,7 +6,6 @@ extern "C" {
#include "BKE_anim.h"
#include "BLI_assert.h"
-#include "BLI_utildefines.h"
#include "DEG_depsgraph_query.h"
@@ -24,7 +23,7 @@ AbstractHierarchyIterator::~AbstractHierarchyIterator()
{
}
-void AbstractHierarchyIterator::release()
+void AbstractHierarchyIterator::release_writers()
{
for (WriterMap::value_type it : writers) {
delete_object_writer(it.second);
@@ -85,8 +84,8 @@ std::string AbstractHierarchyIterator::get_object_dag_path_name(
return name;
}
-bool AbstractHierarchyIterator::should_visit_object(const Base *const UNUSED(base),
- bool UNUSED(is_duplicated)) const
+bool AbstractHierarchyIterator::should_visit_object(const Base * /*base*/,
+ bool /*is_duplicated*/) const
{
return true;
}
@@ -141,12 +140,7 @@ TEMP_WRITER_TYPE *AbstractHierarchyIterator::export_object_and_parents(Object *o
BLI_assert(ob != dupliObParent);
std::string name;
- // if (m_settings.flatten_hierarchy) {
- // name = get_id_name(ob);
- // }
- // else {
name = get_object_dag_path_name(ob, dupliObParent);
- // }
/* check if we have already created a transform writer for this object */
TEMP_WRITER_TYPE *xform_writer = get_writer(name);
@@ -154,11 +148,8 @@ TEMP_WRITER_TYPE *AbstractHierarchyIterator::export_object_and_parents(Object *o
return xform_writer;
}
- TEMP_WRITER_TYPE *parent_writer = NULL;
-
- if (/* m_settings.flatten_hierarchy || */ parent == NULL) {
- }
- else {
+ TEMP_WRITER_TYPE *parent_writer = nullptr;
+ if (parent != nullptr) {
/* Since there are so many different ways to find parents (as evident
* in the number of conditions below), we can't really look up the
* parent by name. We'll just call export_object_and_parents(), which will
@@ -188,10 +179,6 @@ TEMP_WRITER_TYPE *AbstractHierarchyIterator::export_object_and_parents(Object *o
}
xform_writer = create_xform_writer(name, ob, parent_writer);
- // /* When flattening, the matrix of the dupliobject has to be added. */
- // if (m_settings.flatten_hierarchy && dupliObParent) {
- // xform_writer->m_proxy_from = dupliObParent;
- // }
if (xform_writer != NULL) {
writers[name] = xform_writer;
}
diff --git a/source/blender/usd/intern/abstract_hierarchy_iterator.h b/source/blender/usd/intern/abstract_hierarchy_iterator.h
index a4756d2222f..0b305af4f9c 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.h
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.h
@@ -25,10 +25,10 @@ class AbstractHierarchyIterator {
virtual ~AbstractHierarchyIterator();
void iterate();
+ const WriterMap &writer_map() const;
+ void release_writers();
private:
- void release();
-
void visit_object(Base *base, Object *object, Object *parent, Object *dupliObParent);
std::string get_object_name(const Object *const object) const;
More information about the Bf-blender-cvs
mailing list