[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24445] trunk/blender/source/blender/ editors/screen/screen_ops.c: Bugfix #19835: While playing animation, Render >Dimensions>FrameRate does not change animation speed
Joshua Leung
aligorith at gmail.com
Tue Nov 10 10:50:39 CET 2009
Revision: 24445
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24445
Author: aligorith
Date: 2009-11-10 10:50:39 +0100 (Tue, 10 Nov 2009)
Log Message:
-----------
Bugfix #19835: While playing animation, Render>Dimensions>FrameRate does not change animation speed
The timestep used for the playback timer now gets adjusted accordingly when the frames-per-second setting gets changed during playback (i.e. in the "animation_step" operator). This is not as ideal as only updating this when the framerate setting is changed, but using an appropriate update function for this failed miserably.
Modified Paths:
--------------
trunk/blender/source/blender/editors/screen/screen_ops.c
Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c 2009-11-10 06:29:10 UTC (rev 24444)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c 2009-11-10 09:50:39 UTC (rev 24445)
@@ -2232,7 +2232,7 @@
ScreenAnimData *sad= wt->customdata;
ScrArea *sa;
int sync;
-
+
/* sync, don't sync, or follow scene setting */
if(sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
else if(sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
@@ -2288,12 +2288,12 @@
}
}
}
-
+
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
ED_update_for_newframe(C, 1);
-
+
sound_update_playing(C);
-
+
for(sa= screen->areabase.first; sa; sa= sa->next) {
ARegion *ar;
for(ar= sa->regionbase.first; ar; ar= ar->next) {
@@ -2305,6 +2305,12 @@
}
}
+ /* recalculate the timestep for the timer now that we've finished calculating this,
+ * since the frames-per-second value may have been changed
+ */
+ // TODO: this may make evaluation a bit slower if the value doesn't change... any way to avoid this?
+ wt->timestep= (1.0/FPS);
+
//WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
return OPERATOR_FINISHED;
More information about the Bf-blender-cvs
mailing list