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:
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_writer_hair.cc')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index 072feb2a90a..f8d610a3659 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -163,16 +163,17 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
if (num < mesh->totface) {
/* TODO(Sybren): check whether the NULL check here and if(mface) are actually required */
- MFace *face = mface == NULL ? NULL : &mface[num];
+ MFace *face = mface == nullptr ? nullptr : &mface[num];
MTFace *tface = mtface + num;
if (mface) {
float r_uv[2], mapfw[4], vec[3];
psys_interpolate_uvs(tface, face->v4, pa->fuv, r_uv);
- uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
+ uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL);
+ psys_interpolate_face(
+ mverts, face, tface, nullptr, mapfw, vec, normal, nullptr, nullptr, nullptr);
copy_yup_from_zup(tmp_nor.getValue(), normal);
norm_values.push_back(tmp_nor);
@@ -203,7 +204,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
}
if (vtx[o] == num) {
- uv_values.push_back(Imath::V2f(tface->uv[o][0], tface->uv[o][1]));
+ uv_values.emplace_back(tface->uv[o][0], tface->uv[o][1]);
MVert *mv = mverts + vtx[o];
@@ -230,7 +231,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
mul_m4_v3(inv_mat, vert);
/* Convert Z-up to Y-up. */
- verts.push_back(Imath::V3f(vert[0], vert[2], -vert[1]));
+ verts.emplace_back(vert[0], vert[2], -vert[1]);
}
}
}
@@ -277,12 +278,13 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
float r_uv[2], tmpnor[3], mapfw[4], vec[3];
psys_interpolate_uvs(tface, face->v4, pc->fuv, r_uv);
- uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
+ uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL);
+ psys_interpolate_face(
+ mverts, face, tface, nullptr, mapfw, vec, tmpnor, nullptr, nullptr, nullptr);
/* Convert Z-up to Y-up. */
- norm_values.push_back(Imath::V3f(tmpnor[0], tmpnor[2], -tmpnor[1]));
+ norm_values.emplace_back(tmpnor[0], tmpnor[2], -tmpnor[1]);
}
else {
if (!uv_values.empty()) {
@@ -302,7 +304,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
mul_m4_v3(inv_mat, vert);
/* Convert Z-up to Y-up. */
- verts.push_back(Imath::V3f(vert[0], vert[2], -vert[1]));
+ verts.emplace_back(vert[0], vert[2], -vert[1]);
path++;
}