Fix #124187: UI placeholder fails with None

With python API, `placeholder=None` throws an error and fails to
display the property in UI. Clear `PROP_NEVER_NULL` flag to resolve.

Pull Request: https://projects.blender.org/blender/blender/pulls/126497
This commit is contained in:
Pratik Borhade
2024-08-20 01:02:52 +02:00
committed by Harley Acheson
parent 4c37b3ea02
commit da57f2f3d5

View File

@@ -1332,8 +1332,9 @@ void RNA_api_ui_layout(StructRNA *srna)
"Item. Exposes an RNA item and places it into the layout.");
api_ui_item_rna_common(func);
api_ui_item_common(func);
RNA_def_string(
PropertyRNA *prop = RNA_def_string(
func, "placeholder", nullptr, 0, "", "Hint describing the expected value when empty");
RNA_def_property_clear_flag(prop, PROP_NEVER_NULL);
RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail");
RNA_def_boolean(func, "slider", false, "", "Use slider widget for numeric values");
RNA_def_int(func,