Fix: Set Mesh Normal "Tangent" mode fails with free normals
If free normals already exist, the `custom_normal` attribute already exists with a different type, so the attribute writer is not created properly in `mesh_set_custom_normals` and the process fails. Instead, setting tangent space custom normals should clear existing free normals. Pull Request: https://projects.blender.org/blender/blender/pulls/142961
This commit is contained in:
@@ -151,6 +151,7 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
Array<float3> corner_normals(mesh->corners_num);
|
||||
evaluator.add_with_destination<float3>(custom_normal, corner_normals);
|
||||
evaluator.evaluate();
|
||||
mesh->attributes_for_write().remove("custom_normal");
|
||||
bke::mesh_set_custom_normals(*mesh, corner_normals);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user