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:
authorSybren A. Stüvel <sybren@blender.org>2019-09-19 17:53:53 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-09-19 17:59:10 +0300
commitb5702d9bc028d4b53a9d85f5f9fb60feacbd3a00 (patch)
tree3fcef0458a4a60c80e10184443c0e88e2f1cddbe /source/blender/alembic
parent931d280af78877d5d86a6473e4963d4f9edb8aeb (diff)
Fix T55403: Alembic: export of animated child hairs
The parent hairs were written to Alembic even when the 'Parent Particles' checkbox (`use_parent_particles`) was disabled. In this case the parent hairs were not correct in Blender's memory, and thus also not correct in the exported Alembic file. The Alembic exporter now respects this setting and doesn't write the parent hairs when 'Parent Particles' is off.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_hair.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_hair.cc b/source/blender/alembic/intern/abc_hair.cc
index 38042bc7286..98387be2e61 100644
--- a/source/blender/alembic/intern/abc_hair.cc
+++ b/source/blender/alembic/intern/abc_hair.cc
@@ -79,10 +79,14 @@ void AbcHairWriter::do_write()
if (m_psys->pathcache) {
ParticleSettings *part = m_psys->part;
+ bool export_children = m_settings.export_child_hairs && m_psys->childcache &&
+ part->childtype != 0;
- write_hair_sample(mesh, part, verts, norm_values, uv_values, hvertices);
+ if (!export_children || part->draw & PART_DRAW_PARENT) {
+ write_hair_sample(mesh, part, verts, norm_values, uv_values, hvertices);
+ }
- if (m_settings.export_child_hairs && m_psys->childcache) {
+ if (export_children) {
write_hair_child_sample(mesh, part, verts, norm_values, uv_values, hvertices);
}
}