[Bf-blender-cvs] [8bad526d517] microfacet_hair: Fix normal attribute was defined per curve instead of per key
Weizhen Huang
noreply at git.blender.org
Tue Dec 27 15:22:12 CET 2022
Commit: 8bad526d517404d491d824eff9e678c344ac2d44
Author: Weizhen Huang
Date: Tue Dec 27 13:51:58 2022 +0100
Branches: microfacet_hair
https://developer.blender.org/rB8bad526d517404d491d824eff9e678c344ac2d44
Fix normal attribute was defined per curve instead of per key
===================================================================
M intern/cycles/blender/curves.cpp
===================================================================
diff --git a/intern/cycles/blender/curves.cpp b/intern/cycles/blender/curves.cpp
index eb064361cc8..ce8a35fb61b 100644
--- a/intern/cycles/blender/curves.cpp
+++ b/intern/cycles/blender/curves.cpp
@@ -326,12 +326,12 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa
if (attr_intercept)
attr_intercept->add(time);
- num_curve_keys++;
- }
+ if (attr_normal) {
+ /* TODO: compute geometry normals. */
+ attr_normal->add(make_float3(1.0f, 0.0f, 0.0f));
+ }
- if (attr_normal != NULL) {
- /* TODO: compute geometry normals. */
- attr_normal->add(make_float3(1.0f, 0.0f, 0.0f));
+ num_curve_keys++;
}
if (attr_length != NULL) {
More information about the Bf-blender-cvs
mailing list