diff options
author | Bastien Montagne <bastien@blender.org> | 2020-11-17 23:33:28 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-11-17 23:33:28 +0300 |
commit | 9b20bbc3bff62ae94f7b2e692724ab83a7c1d600 (patch) | |
tree | 08cac2423e573943d6ae8891ebc94bd029444979 /release/scripts/startup/bl_ui | |
parent | df2bf164c788c367709351aa5c34d843a3639a9c (diff) |
LibOverride: PointCache: Add UI feedback about need to enable Disk Cache.
Note that I chose to modify the label of the main `Bake` button instead
of adding an extra label line, as that would disturb the UI in a
annoying way.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_common.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index b8c0035ee6b..1ffaa47168f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -126,6 +126,7 @@ def point_cache_ui(self, cache, enabled, cachetype): layout.context_pointer_set("point_cache", cache) is_saved = bpy.data.is_saved + is_liboverride = cache.id_data.override_library is not None # NOTE: TODO temporarily used until the animate properties are properly skipped. layout.use_property_decorate = False # No animation (remove this later on). @@ -221,7 +222,9 @@ def point_cache_ui(self, cache, enabled, cachetype): col = flow.column() col.active = can_bake - if cache.is_baked is True: + if is_liboverride and not cache.use_disk_cache: + col.operator("ptcache.bake", icon='ERROR', text="Bake (Disk Cache mandatory)") + elif cache.is_baked is True: col.operator("ptcache.free_bake", text="Delete Bake") else: col.operator("ptcache.bake", text="Bake").bake = True |