Mesh: Replace auto smooth with node group #108014

Merged
Hans Goudey merged 149 commits from HooglyBoogly/blender:refactor-mesh-corner-normals-lazy into main 2023-10-20 16:54:20 +02:00
1 changed files with 10 additions and 2 deletions
Showing only changes of commit b6241154e2 - Show all commits

View File

@ -871,6 +871,14 @@ static void tag_component_positions_changed(void *owner)
} }
} }
static void tag_component_corner_normals_dirty(void *owner)
{
Mesh *mesh = static_cast<Mesh *>(owner);
if (mesh != nullptr) {
mesh->runtime->corner_normals_dirty = true;
}
}
class VArrayImpl_For_VertexWeights final : public VMutableArrayImpl<float> { class VArrayImpl_For_VertexWeights final : public VMutableArrayImpl<float> {
private: private:
MDeformVert *dverts_; MDeformVert *dverts_;
@ -1195,7 +1203,7 @@ static ComponentAttributeProviders create_attribute_providers_for_mesh()
BuiltinAttributeProvider::Creatable, BuiltinAttributeProvider::Creatable,
BuiltinAttributeProvider::Deletable, BuiltinAttributeProvider::Deletable,
face_access, face_access,
nullptr); tag_component_corner_normals_dirty);
static BuiltinCustomDataLayerProvider sharp_edge("sharp_edge", static BuiltinCustomDataLayerProvider sharp_edge("sharp_edge",
ATTR_DOMAIN_EDGE, ATTR_DOMAIN_EDGE,
@ -1204,7 +1212,7 @@ static ComponentAttributeProviders create_attribute_providers_for_mesh()
BuiltinAttributeProvider::Creatable, BuiltinAttributeProvider::Creatable,
BuiltinAttributeProvider::Deletable, BuiltinAttributeProvider::Deletable,
edge_access, edge_access,
nullptr); tag_component_corner_normals_dirty);
static const auto crease_clamp = mf::build::SI1_SO<float, float>( static const auto crease_clamp = mf::build::SI1_SO<float, float>(
"Crease Clamp", "Crease Clamp",