Fix #91271: Reset to Default broken for fluid cache file format

The default wasn't in the list of static enum items which means the
value was reset to 0 instead of the proper default. Even though the
list is dynamically generated, the possible enum items should be
part of the static list anyway.
This commit is contained in:
Hans Goudey
2024-12-11 09:57:56 -05:00
parent 28f8f6ccc6
commit c4d3f25aae

View File

@@ -1315,7 +1315,9 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
/* Cache type - generated dynamically based on domain type */
static const EnumPropertyItem cache_file_type_items[] = {
{0, "NONE", 0, "", ""},
{FLUID_DOMAIN_FILE_UNI, "UNI", 0, "Uni Cache", "Uni file format (.uni)"},
{FLUID_DOMAIN_FILE_OPENVDB, "OPENVDB", 0, "OpenVDB", "OpenVDB file format (.vdb)"},
{FLUID_DOMAIN_FILE_RAW, "RAW", 0, "Raw Cache", "Raw file format (.raw)"},
{0, nullptr, 0, nullptr, nullptr},
};