Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-04-20 14:45:48 +0300
committerJoshua Leung <aligorith@gmail.com>2018-04-20 19:54:41 +0300
commit60e2c60be711a892459953b8788494fe869164e8 (patch)
tree84fbd69112c857e66bd34527993fe477d34c8c2d /source/blender/editors/space_time
parent6d0c59b0116a8575e82b71e61e7c577923f3d2b7 (diff)
Fix: Timeline's "Show Cache" options should not get reset on window size change
These were getting set in the init() callback instead of the new(). As a result, the settings would get reset everytime you resized the window/area - not quite something you'd really want happening everything the size changes!
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r--source/blender/editors/space_time/space_time.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 6882fcd396f..24650fead95 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -752,6 +752,12 @@ static SpaceLink *time_new(const bContext *C)
stime->spacetype = SPACE_TIME;
stime->flag |= TIME_DRAWFRAMES;
+
+ /* enable all cache display */
+ stime->cache_display |= TIME_CACHE_DISPLAY;
+ stime->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES);
+ stime->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT);
+ stime->cache_display |= TIME_CACHE_RIGIDBODY;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for time");
@@ -796,13 +802,7 @@ static SpaceLink *time_new(const bContext *C)
/* validate spacedata, add own area level handlers */
static void time_init(wmWindowManager *UNUSED(wm), ScrArea *sa)
{
- SpaceTime *stime = (SpaceTime *)sa->spacedata.first;
-
- /* enable all cache display */
- stime->cache_display |= TIME_CACHE_DISPLAY;
- stime->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES);
- stime->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT);
- stime->cache_display |= TIME_CACHE_RIGIDBODY;
+ //SpaceTime *stime = (SpaceTime *)sa->spacedata.first;
}
static SpaceLink *time_duplicate(SpaceLink *sl)