[Bf-blender-cvs] [dc1d5c75538] temp-alembic-exporter-T73363-ms2: Alembic: Pass correct `export_name` to the writers
Sybren A. Stüvel
noreply at git.blender.org
Tue Apr 28 18:57:33 CEST 2020
Commit: dc1d5c7553800bd3aefa04121abb64b822f5d991
Author: Sybren A. Stüvel
Date: Tue Apr 28 14:56:20 2020 +0200
Branches: temp-alembic-exporter-T73363-ms2
https://developer.blender.org/rBdc1d5c7553800bd3aefa04121abb64b822f5d991
Alembic: Pass correct `export_name` to the writers
The `HierarchyContext::export_name` was set to the object name, and not to
the last component of `HierarchyContext::export_path`. This doesn't matter
for USD, but it does influence the Alembic writers.
===================================================================
M source/blender/io/usd/intern/abstract_hierarchy_iterator.cc
===================================================================
diff --git a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc
index 1fe24dfbf8d..f603bd81c7a 100644
--- a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc
@@ -542,7 +542,8 @@ void AbstractHierarchyIterator::make_writer_object_data(const HierarchyContext *
}
HierarchyContext data_context = *context;
- data_context.export_path = get_object_data_path(context);
+ data_context.export_name = get_object_data_name(data_context.object);
+ data_context.export_path = get_object_data_path(&data_context);
data_context.higher_up_export_path = context->export_path;
/* data_context.original_export_path is just a copy from the context. It points to the object,
@@ -580,8 +581,9 @@ void AbstractHierarchyIterator::make_writers_particle_systems(
}
HierarchyContext hair_context = *transform_context;
+ hair_context.export_name = make_valid_name(psys->name);
hair_context.export_path = path_concatenate(transform_context->export_path,
- get_id_name(&psys->part->id));
+ hair_context.export_name);
hair_context.higher_up_export_path = transform_context->export_path;
hair_context.particle_system = psys;
More information about the Bf-blender-cvs
mailing list