Commit: 0357dbf148dcbfcf6c35a5e9e34cdfa272dc7a98
Author: Brecht Van Lommel
Date: Fri Jun 24 19:03:05 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rB0357dbf148dcbfcf6c35a5e9e34cdfa272dc7a98
Fix T99058: geometry nodes ignore if subdivision surface modifier is disabled
It was looking up the last modifier in the stack, ignoring visibility, instead
of mesh->runtime.subsurf_runtime_data set by the modifier evaluation and used by
the drawing code.
===================================================================
M source/blender/blenkernel/intern/mesh_wrapper.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh_wrapper.cc
b/source/blender/blenkernel/intern/mesh_wrapper.cc
index fdebf1d6a26..48a29b2aad3 100644
--- a/source/blender/blenkernel/intern/mesh_wrapper.cc
+++ b/source/blender/blenkernel/intern/mesh_wrapper.cc
@@ -309,12 +309,7 @@ int BKE_mesh_wrapper_poly_len(const Mesh *me)
static Mesh *mesh_wrapper_ensure_subdivision(const Object *ob, Mesh *me)
{
- SubsurfModifierData *smd = BKE_object_get_last_subsurf_modifier(ob);
- if (!smd) {
- return me;
- }
-
- SubsurfRuntimeData *runtime_data = (SubsurfRuntimeData
*)smd->modifier.runtime;
+ SubsurfRuntimeData *runtime_data = (SubsurfRuntimeData
*)me->runtime.subsurf_runtime_data;
if (runtime_data == nullptr || runtime_data->settings.level == 0) {
return me;
}
@@ -335,7 +330,7 @@ static Mesh *mesh_wrapper_ensure_subdivision(const Object
*ob, Mesh *me)
/* Happens on bad topology, but also on empty input mesh. */
return me;
}
- const bool use_clnors = BKE_subsurf_modifier_use_custom_loop_normals(smd,
me);
+ const bool use_clnors = runtime_data->use_loop_normals;
if (use_clnors) {
/* If custom normals are present and the option is turned on calculate the
split
* normals and clear flag so the normals get interpolated to the result
mesh. */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs