From 9b20bbc3bff62ae94f7b2e692724ab83a7c1d600 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 17 Nov 2020 21:33:28 +0100 Subject: 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. --- source/blender/editors/physics/physics_pointcache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index e827a3fbb2d..f0cf1f2fbf9 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -66,10 +66,13 @@ static bool ptcache_poll(bContext *C) } if (ID_IS_OVERRIDE_LIBRARY_REAL(id) && (point_cache->flag & PTCACHE_DISK_CACHE) == false) { + CTX_wm_operator_poll_msg_set(C, + "Library override data-blocks only support Disk Cache storage"); return false; } if (ID_IS_LINKED(id) && (point_cache->flag & PTCACHE_DISK_CACHE) == false) { + CTX_wm_operator_poll_msg_set(C, "Linked data-blocks do not allow to edit caches"); return false; } @@ -88,6 +91,8 @@ static bool ptcache_add_remove_poll(bContext *C) } if (ID_IS_OVERRIDE_LIBRARY_REAL(id) || ID_IS_LINKED(id)) { + CTX_wm_operator_poll_msg_set( + C, "Linked or library override data-blocks do not allow to add or remove caches"); return false; } -- cgit v1.2.3