[Bf-blender-cvs] [b47fc535f12] microfacet_hair: Merge branch 'master' into microfacet_hair
Weizhen Huang
noreply at git.blender.org
Fri Jan 6 12:04:11 CET 2023
Commit: b47fc535f12b8724fcb5b3ed0eced4d9a815f423
Author: Weizhen Huang
Date: Fri Jan 6 11:44:26 2023 +0100
Branches: microfacet_hair
https://developer.blender.org/rBb47fc535f12b8724fcb5b3ed0eced4d9a815f423
Merge branch 'master' into microfacet_hair
===================================================================
===================================================================
diff --cc source/blender/geometry/intern/add_curves_on_mesh.cc
index b1eaf43da5a,55f0398fd3c..7e034a4640e
--- a/source/blender/geometry/intern/add_curves_on_mesh.cc
+++ b/source/blender/geometry/intern/add_curves_on_mesh.cc
@@@ -373,18 -365,14 +365,15 @@@ AddCurvesOnMeshOutputs add_curves_on_me
}
curves.fill_curve_types(new_curves_range, CURVE_TYPE_CATMULL_ROM);
+ curves.normal_mode_for_write().fill(NORMAL_MODE_CURVATURE_VECTOR);
- /* Explicitly set all other attributes besides those processed above to default values. */
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
- Set<std::string> attributes_to_skip{{"position",
- "curve_type",
- "surface_uv_coordinate",
- ".selection_point_float",
- ".selection_curve_float"}};
+
+ /* Explicitly set all other attributes besides those processed above to default values. */
+ Set<std::string> attributes_to_skip{{"position", "curve_type", "surface_uv_coordinate"}};
attributes.for_all(
[&](const bke::AttributeIDRef &id, const bke::AttributeMetaData /*meta_data*/) {
- if (id.is_named() && attributes_to_skip.contains(id.name())) {
+ if (attributes_to_skip.contains(id.name())) {
return true;
}
bke::GSpanAttributeWriter attribute = attributes.lookup_for_write_span(id);
diff --cc source/blender/makesdna/DNA_curves_types.h
index f5afb4eb498,5ecc816f4ea..8849d137701
--- a/source/blender/makesdna/DNA_curves_types.h
+++ b/source/blender/makesdna/DNA_curves_types.h
@@@ -78,9 -78,13 +78,14 @@@ typedef enum KnotsMode
/** Method used to calculate the normals of a curve's evaluated points. */
typedef enum NormalMode {
+ /** Calculate normals with the smallest twist around the curve tangent across the whole curve. */
NORMAL_MODE_MINIMUM_TWIST = 0,
+ /**
+ * Calculate normals perpendicular to the Z axis and the curve tangent. If a series of points
+ * is vertical, the X axis is used.
+ */
NORMAL_MODE_Z_UP = 1,
+ NORMAL_MODE_CURVATURE_VECTOR = 2,
} NormalMode;
/**
More information about the Bf-blender-cvs
mailing list