[Bf-blender-cvs] [6fac4bb8b0d] master: Curve: increase max of order U/V

RedMser noreply at git.blender.org
Thu Oct 6 04:17:50 CEST 2022


Commit: 6fac4bb8b0db68e5f0807708f59ecf128f286b85
Author: RedMser
Date:   Thu Oct 6 13:11:29 2022 +1100
Branches: master
https://developer.blender.org/rB6fac4bb8b0db68e5f0807708f59ecf128f286b85

Curve: increase max of order U/V

Uses soft and hard max of the resolution properties.

Range for order U/V was 2-6, but after testing higher max values with
NURB splines and surfaces with many control points, no problems were
found.

Reviewed By: campbellbarton

Ref D13918

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

M	source/blender/makesrna/intern/rna_curve.c

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

diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 3a90d631c63..126300f0425 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1947,22 +1947,23 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
   prop = RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
   RNA_def_property_int_sdna(prop, NULL, "orderu");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-  RNA_def_property_range(prop, 2, 6);
-  RNA_def_property_ui_text(
-      prop,
-      "Order U",
-      "NURBS order in the U direction (for splines and surfaces, higher values "
-      "let points influence a greater area)");
+  RNA_def_property_range(prop, 2, 64);
+  RNA_def_property_ui_range(prop, 2, 6, 1, -1);
+  RNA_def_property_ui_text(prop,
+                           "Order U",
+                           "NURBS order in the U direction. Higher values make each point "
+                           "influence a greater area, but have worse performance");
   RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
 
   prop = RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
   RNA_def_property_int_sdna(prop, NULL, "orderv");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-  RNA_def_property_range(prop, 2, 6);
+  RNA_def_property_range(prop, 2, 64);
+  RNA_def_property_ui_range(prop, 2, 6, 1, -1);
   RNA_def_property_ui_text(prop,
                            "Order V",
-                           "NURBS order in the V direction (for surfaces only, higher values "
-                           "let points influence a greater area)");
+                           "NURBS order in the V direction. Higher values make each point "
+                           "influence a greater area, but have worse performance");
   RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
 
   prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);



More information about the Bf-blender-cvs mailing list