[Bf-blender-cvs] [60e2c60be71] blender2.8: Fix: Timeline's "Show Cache" options should not get reset on window size change
Joshua Leung
noreply at git.blender.org
Fri Apr 20 19:06:55 CEST 2018
Commit: 60e2c60be711a892459953b8788494fe869164e8
Author: Joshua Leung
Date: Fri Apr 20 13:45:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB60e2c60be711a892459953b8788494fe869164e8
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!
===================================================================
M source/blender/editors/space_action/space_action.c
M source/blender/editors/space_time/space_time.c
===================================================================
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 23e3751b358..82547d6f8bc 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -107,6 +107,12 @@ static SpaceLink *action_new(const bContext *C)
saction->ads.filterflag |= ADS_FILTER_SUMMARY;
+ /* enable all cache display */
+ saction->cache_display |= TIME_CACHE_DISPLAY;
+ saction->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES);
+ saction->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT);
+ saction->cache_display |= TIME_CACHE_RIGIDBODY;
+
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for action");
@@ -176,12 +182,6 @@ static void action_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
SpaceAction *saction = sa->spacedata.first;
saction->flag |= SACTION_TEMP_NEEDCHANSYNC;
-
- /* enable all cache display */
- saction->cache_display |= TIME_CACHE_DISPLAY;
- saction->cache_display |= (TIME_CACHE_SOFTBODY | TIME_CACHE_PARTICLES);
- saction->cache_display |= (TIME_CACHE_CLOTH | TIME_CACHE_SMOKE | TIME_CACHE_DYNAMICPAINT);
- saction->cache_display |= TIME_CACHE_RIGIDBODY;
}
static SpaceLink *action_duplicate(SpaceLink *sl)
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)
More information about the Bf-blender-cvs
mailing list