Cleanup: use RNA_def_enum_flag

This commit is contained in:
Campbell Barton
2025-08-07 17:47:40 +10:00
parent 16430b10f1
commit 5b78323450
2 changed files with 13 additions and 14 deletions

View File

@@ -2236,13 +2236,12 @@ void OBJECT_OT_bake(wmOperatorType *ot)
SCE_PASS_COMBINED,
"Type",
"Type of pass to bake, some of them may not be supported by the current render engine");
prop = RNA_def_enum(ot->srna,
"pass_filter",
rna_enum_bake_pass_filter_type_items,
R_BAKE_PASS_FILTER_NONE,
"Pass Filter",
"Filter to combined, diffuse, glossy, transmission and subsurface passes");
RNA_def_property_flag(prop, PROP_ENUM_FLAG);
RNA_def_enum_flag(ot->srna,
"pass_filter",
rna_enum_bake_pass_filter_type_items,
R_BAKE_PASS_FILTER_NONE,
"Pass Filter",
"Filter to combined, diffuse, glossy, transmission and subsurface passes");
RNA_def_string_file_path(ot->srna,
"filepath",
nullptr,

View File

@@ -730,13 +730,13 @@ void properties_register(wmOperatorType *ot, int flags)
RNA_def_property_flag(prop, PROP_HIDDEN);
if ((flags & P_GEO_SNAP) == P_GEO_SNAP) {
prop = RNA_def_enum(ot->srna,
"snap_elements",
rna_enum_snap_element_items,
SCE_SNAP_TO_INCREMENT,
"Snap to Elements",
"");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_ENUM_FLAG);
prop = RNA_def_enum_flag(ot->srna,
"snap_elements",
rna_enum_snap_element_items,
SCE_SNAP_TO_INCREMENT,
"Snap to Elements",
"");
RNA_def_property_flag(prop, PROP_HIDDEN);
RNA_def_boolean(ot->srna, "use_snap_project", false, "Project Individual Elements", "");