From 0499dbc5c16fe6b276da81d65cade4f5da92a308 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 May 2021 11:22:54 +1000 Subject: PlayAnim: support limiting the cache by memory instead of frames Partial fix for T81751 which exposes multiple playback performance issues. Previously the cache was limited to 30 frames, without a way to increase the cache for smooth playback with files that are slow to load. Now the animation plays back smoothly once loaded into cache. The cache limit from the system preference is used when the player is launched from Blender. A new player argument `-c ` was added to support this. --- source/creator/creator_args.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index d7f649b657d..9c7b7dc3f34 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1189,7 +1189,10 @@ static const char arg_handle_playback_mode_doc[] = "\t-s \n" "\t\tPlay from .\n" "\t-e \n" - "\t\tPlay until ."; + "\t\tPlay until .\n" + "\t-c \n" + "\t\tAmount of memory in megabytes to allow for caching images during playback.\n" + "\t\tZero disables (clamping to a fixed number of frames instead)."; static int arg_handle_playback_mode(int argc, const char **argv, void *UNUSED(data)) { /* not if -b was given first */ -- cgit v1.2.3