[Bf-blender-cvs] [3c368031893] master: Cleanup: Fix unused variable warning in lite build

Hans Goudey noreply at git.blender.org
Sun Oct 17 05:58:36 CEST 2021


Commit: 3c3680318932b7e7b4f99cfb1ecae1cd63baf14b
Author: Hans Goudey
Date:   Sat Oct 16 22:58:30 2021 -0500
Branches: master
https://developer.blender.org/rB3c3680318932b7e7b4f99cfb1ecae1cd63baf14b

Cleanup: Fix unused variable warning in lite build

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
index 5b480f2dc22..410c9a8bb35 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
@@ -68,7 +68,10 @@ static void geo_node_subdivision_surface_init(bNodeTree *UNUSED(ntree), bNode *n
 static void geo_node_subdivision_surface_exec(GeoNodeExecParams params)
 {
   GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
-
+#ifndef WITH_OPENSUBDIV
+  params.error_message_add(NodeWarningType::Error,
+                           TIP_("Disabled, Blender was compiled without OpenSubdiv"));
+#else
   Field<float> crease_field = params.extract_input<Field<float>>("Crease");
 
   const NodeGeometrySubdivisionSurface &storage =
@@ -83,10 +86,6 @@ static void geo_node_subdivision_surface_exec(GeoNodeExecParams params)
     return;
   }
 
-#ifndef WITH_OPENSUBDIV
-  params.error_message_add(NodeWarningType::Error,
-                           TIP_("Disabled, Blender was compiled without OpenSubdiv"));
-#else
   geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) {
     if (!geometry_set.has_mesh()) {
       return;



More information about the Bf-blender-cvs mailing list