[Bf-blender-cvs] [2de21113b94] blender2.8: RNA: curve points add(count) a required arg
Campbell Barton
noreply at git.blender.org
Wed Oct 3 01:09:37 CEST 2018
Commit: 2de21113b945d1b0a1ffa7c3c0e6b62a95482e05
Author: Campbell Barton
Date: Wed Oct 3 09:08:54 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB2de21113b945d1b0a1ffa7c3c0e6b62a95482e05
RNA: curve points add(count) a required arg
===================================================================
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 6020899ede7..690e868f4af 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1244,7 +1244,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
/*PropertyRNA *prop; */
FunctionRNA *func;
- /*PropertyRNA *parm; */
+ PropertyRNA *parm;
RNA_def_property_srna(cprop, "SplinePoints");
srna = RNA_def_struct(brna, "SplinePoints", NULL);
@@ -1254,7 +1254,8 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
- RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
+ parm = RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
#if 0
func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
More information about the Bf-blender-cvs
mailing list