Changeset View
Changeset View
Standalone View
Standalone View
source/blender/geometry/intern/add_curves_on_mesh.cc
| Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | interpolate_position_without_interpolation(curves, | ||||
| old_curves_num, | old_curves_num, | ||||
| root_positions_cu, | root_positions_cu, | ||||
| new_lengths_cu, | new_lengths_cu, | ||||
| new_normals_su, | new_normals_su, | ||||
| inputs.transforms->surface_to_curves_normal); | inputs.transforms->surface_to_curves_normal); | ||||
| } | } | ||||
| curves.fill_curve_types(new_curves_range, CURVE_TYPE_CATMULL_ROM); | curves.fill_curve_types(new_curves_range, CURVE_TYPE_CATMULL_ROM); | ||||
| curves.normal_mode_for_write().fill(NORMAL_MODE_CURVATURE_VECTOR); | |||||
| bke::MutableAttributeAccessor attributes = curves.attributes_for_write(); | bke::MutableAttributeAccessor attributes = curves.attributes_for_write(); | ||||
| /* Explicitly set all other attributes besides those processed above to default values. */ | /* Explicitly set all other attributes besides those processed above to default values. */ | ||||
| Set<std::string> attributes_to_skip{{"position", "curve_type", "surface_uv_coordinate"}}; | Set<std::string> attributes_to_skip{{"position", "curve_type", "surface_uv_coordinate"}}; | ||||
| attributes.for_all( | attributes.for_all( | ||||
| [&](const bke::AttributeIDRef &id, const bke::AttributeMetaData /*meta_data*/) { | [&](const bke::AttributeIDRef &id, const bke::AttributeMetaData /*meta_data*/) { | ||||
| if (attributes_to_skip.contains(id.name())) { | if (attributes_to_skip.contains(id.name())) { | ||||
| Show All 16 Lines | |||||