Cleanup: function argument flags for UIList.draw_item
Correct two mistakes in [0] which accidentally assigned
flags to the previously declared parameter as well as assigning an
argument to `prop`, then setting the flags on `parm`.
While it seems that "active_property" only became optional by accident
leave this as-is to avoid breaking scripts.
[0]: 113997a03c
Ref #134379.
This commit is contained in:
@@ -2073,12 +2073,13 @@ static void rna_def_uilist(BlenderRNA *brna)
|
||||
0,
|
||||
"",
|
||||
"Identifier of property in active_data, for the active element");
|
||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED | PARM_PYFUNC_OPTIONAL);
|
||||
parm = RNA_def_int(
|
||||
func, "index", 0, 0, INT_MAX, "", "Index of the item in the collection", 0, INT_MAX);
|
||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
||||
parm = RNA_def_property(func, "flt_flag", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_ui_text(parm, "", "The filter-flag result for this item");
|
||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
||||
RNA_def_int(func, "index", 0, 0, INT_MAX, "", "Index of the item in the collection", 0, INT_MAX);
|
||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED | PARM_PYFUNC_OPTIONAL);
|
||||
prop = RNA_def_property(func, "flt_flag", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_ui_text(prop, "", "The filter-flag result for this item");
|
||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED | PARM_PYFUNC_OPTIONAL);
|
||||
|
||||
/* draw_filter */
|
||||
func = RNA_def_function(srna, "draw_filter", nullptr);
|
||||
|
||||
Reference in New Issue
Block a user