[Bf-blender-cvs] [2d379019415] blender2.8: RNA: fcurve keyframe add(count) a required arg

Campbell Barton noreply at git.blender.org
Wed Oct 3 01:06:52 CEST 2018


Commit: 2d3790194155ef2e7f691d294e01b8613179fb8d
Author: Campbell Barton
Date:   Wed Oct 3 09:04:51 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB2d3790194155ef2e7f691d294e01b8613179fb8d

RNA: fcurve keyframe add(count) a required arg

This matches mesh add methods, and doesn't force it to be a keyword arg.

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

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

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

diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 56565de37a8..6b06ecb6452 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1894,7 +1894,8 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
 
 	func = RNA_def_function(srna, "add", "rna_FKeyframe_points_add");
 	RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve");
-	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);
 
 	func = RNA_def_function(srna, "remove", "rna_FKeyframe_points_remove");
 	RNA_def_function_ui_description(func, "Remove keyframe from an F-Curve");



More information about the Bf-blender-cvs mailing list