Cleanup: remove redundant use of PARM_PYFUNC_OPTIONAL

This is only used for registration, as long as PARM_REQUIRED isn't set
function arguments are assumed to be optional.
This commit is contained in:
Campbell Barton
2025-02-11 16:13:39 +11:00
parent df24ef3dee
commit 9f84c6beb6
2 changed files with 0 additions and 4 deletions

View File

@@ -157,14 +157,12 @@ void RNA_api_fcurves(StructRNA *srna)
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
parm = RNA_def_float(
func, "step", 1, 0.01, FLT_MAX, "Step", "At which interval to add keys", 1, 16);
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_PYFUNC_OPTIONAL);
RNA_def_enum(func,
"remove",
channel_bake_remove_options,
int(blender::animrig::BakeCurveRemove::IN_RANGE),
"Remove Options",
"Choose which keys should be automatically removed by the bake");
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_PYFUNC_OPTIONAL);
}
void RNA_api_drivers(StructRNA * /*srna*/)

View File

@@ -959,7 +959,6 @@ void RNA_api_strips(StructRNA *srna, const bool metastrip)
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
parm = RNA_def_enum(
func, "fit_method", scale_fit_methods, SEQ_USE_ORIGINAL_SIZE, "Image Fit Method", nullptr);
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_PYFUNC_OPTIONAL);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Strip", "", "New Strip");
RNA_def_function_return(func, parm);
@@ -993,7 +992,6 @@ void RNA_api_strips(StructRNA *srna, const bool metastrip)
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
parm = RNA_def_enum(
func, "fit_method", scale_fit_methods, SEQ_USE_ORIGINAL_SIZE, "Image Fit Method", nullptr);
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_PYFUNC_OPTIONAL);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Strip", "", "New Strip");
RNA_def_function_return(func, parm);