Anim: Make experimental.use_animation_baklava read-only when non-exp

Make the RNA property `prefs.experimental.use_animation_baklava` read-only
when Blender was built without experimental features.

This reverts parts of b46e2e6300, which
completely removed the flag. That was a bit over-zealous, as there is still
Python code that checks it. Now it always stays `False` on non-experimental
builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/128494
This commit is contained in:
Sybren A. Stüvel
2024-10-03 09:39:10 +02:00
parent 5fa0e1fc8d
commit e16e43dcde

View File

@@ -7583,16 +7583,19 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
"work around invalid usercount handling in code that may lead to loss "
"of data due to wrongly detected unused data-blocks");
# ifdef WITH_ANIM_BAKLAVA
/* Only allow setting this to 'true' when actually built with Baklava. */
prop = RNA_def_property(srna, "use_animation_baklava", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "use_animation_baklava", 1);
RNA_def_property_ui_text(
prop,
"Multi-Slot Actions",
"The new 'layered' Action can contain the animation for multiple data-blocks at once");
RNA_def_property_update(prop, 0, "rna_userdef_update");
# ifndef WITH_ANIM_BAKLAVA
/* Only allow setting this to 'true' when actually built with Baklava. Some of the Baklava code
* is not guarded with `WITH_ANIM_BAKLAVA`, but rather assumes that this flag is always 'false'
* then. */
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
# endif
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)