diff options
author | Peter Schlaile <peter@schlaile.de> | 2010-11-28 21:23:21 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2010-11-28 21:23:21 +0300 |
commit | 510920a299478cdd50ce8ce4ff43d14eb4e2c2e4 (patch) | |
tree | 9b71b0e3e8c3ab5a746cc2f018c73541237c0893 /source/blender/editors/space_sequencer/sequencer_edit.c | |
parent | 3f6eb67b7718e329a482d71d2340989ee0a15e76 (diff) |
== Sequencer ==
This fixes Orig Dimension display (mostly).
* orx, ory both didn't get calculated, if dimension already matched
* putting them into Strip instead of StripData ment, that using images
of different dimensions in one strip could lead to incorrect results
Still TODO: on file open, timeline display happens before preview
display which means: orig_width and height are calculated after the
first draw of N-keys dialog. You have to hit refresh (or scrub one
frame) to get the right values displayed.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 9d67cc2366c..f264e90194f 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2561,18 +2561,15 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) if(active_seq==NULL) return OPERATOR_CANCELLED; - switch (active_seq->type) { + StripElem * se = 0; + + if (active_seq->strip) { + switch (active_seq->type) { case SEQ_IMAGE: + se = give_stripelem(active_seq, scene->r.cfra); + break; case SEQ_MOVIE: - if (active_seq->strip) { - // prevent setting the render size if sequence values aren't initialized - if ( (active_seq->strip->orx>0) && (active_seq->strip->ory>0) ) { - scene->r.xsch= active_seq->strip->orx; - scene->r.ysch= active_seq->strip->ory; - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); - retval = OPERATOR_FINISHED; - } - } + se = active_seq->strip->stripdata; break; case SEQ_SCENE: case SEQ_META: @@ -2580,7 +2577,19 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) case SEQ_HD_SOUND: default: break; + } } + + if (se) { + // prevent setting the render size if sequence values aren't initialized + if ( (se->orig_width > 0) && (se->orig_height > 0) ) { + scene->r.xsch= se->orig_width; + scene->r.ysch= se->orig_height; + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + retval = OPERATOR_FINISHED; + } + } + return retval; } |