Blender V2.61 - r43446
|
#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_sound_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_sequencer.h"
#include "BKE_sound.h"
#include "IMB_imbuf.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
#include "ED_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "sequencer_intern.h"
Go to the source code of this file.
Defines | |
#define | SEQ_LEFTHANDLE 1 |
#define | SEQ_RIGHTHANDLE 2 |
Functions | |
static void | draw_shadedstrip (Sequence *seq, unsigned char col[3], float x1, float y1, float x2, float y2) |
static void | get_seq_color3ubv (Scene *curscene, Sequence *seq, unsigned char col[3]) |
static void | drawseqwave (Scene *scene, Sequence *seq, float x1, float y1, float x2, float y2, float stepsize) |
static void | drawmeta_stipple (int value) |
static void | drawmeta_contents (Scene *scene, Sequence *seqm, float x1, float y1, float x2, float y2) |
static void | draw_seq_handle (View2D *v2d, Sequence *seq, float pixelx, short direction) |
static void | draw_seq_extensions (Scene *scene, ARegion *ar, Sequence *seq) |
static void | draw_seq_text (View2D *v2d, Sequence *seq, float x1, float x2, float y1, float y2, const unsigned char background_col[3]) |
static void | draw_seq_strip (Scene *scene, ARegion *ar, Sequence *seq, int outline_tint, float pixelx) |
static void UNUSED_FUNCTION() | set_special_seq_update (int val) |
void | draw_image_seq (const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs) |
static void | draw_seq_backdrop (View2D *v2d) |
static void | draw_seq_strips (const bContext *C, Editing *ed, ARegion *ar) |
static void | seq_draw_sfra_efra (Scene *scene, View2D *v2d) |
void | draw_timeline_seq (const bContext *C, ARegion *ar) |
Variables | |
static Sequence * | special_seq_update = NULL |
Definition in file sequencer_draw.c.
#define SEQ_LEFTHANDLE 1 |
Definition at line 71 of file sequencer_draw.c.
Referenced by draw_seq_handle(), and draw_seq_strip().
#define SEQ_RIGHTHANDLE 2 |
Definition at line 72 of file sequencer_draw.c.
Referenced by draw_seq_handle(), and draw_seq_strip().
void draw_image_seq | ( | const bContext * | C, |
Scene * | scene, | ||
ARegion * | ar, | ||
SpaceSeq * | sseq, | ||
int | cfra, | ||
int | frame_ofs | ||
) |
Definition at line 757 of file sequencer_draw.c.
References ABS, SpaceSeq::chanshown, CTX_data_main(), Scene::ed, SpaceSeq::flag, G, give_ibuf_seq(), give_ibuf_seq_direct(), give_ibuf_seq_threaded(), glaGetOneInteger(), IMB_freeImBuf(), IMB_rect_from_float(), SpaceSeq::mainb, make_histogram_view_from_ibuf(), make_sep_waveform_view_from_ibuf(), make_vectorscope_view_from_ibuf(), make_waveform_view_from_ibuf(), make_zebra_view_from_ibuf(), NULL, Editing::over_border, UserDef::prefetchframes, Scene::r, ImBuf::rect, ImBuf::rect_float, SpaceSeq::render_size, SEQ_DRAW_COLOR_SEPERATED, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_IMBUF, SEQ_DRAW_IMG_VECTORSCOPE, SEQ_DRAW_IMG_WAVEFORM, SEQ_DRAW_SAFE_MARGINS, seq_new_render_data(), setlinestyle(), RenderData::size, TH_BACK, TH_WIRE, View2D::tot, U, UI_CNR_ALL, UI_ThemeColorBlendShade(), UI_view2d_curRect_validate(), UI_view2d_totRect_set(), UI_view2d_view_ortho(), UI_view2d_view_restore(), uiDrawBox(), uiSetRoundBox(), ARegion::v2d, ImBuf::x, RenderData::xasp, rctf::xmax, rctf::xmin, RenderData::xsch, ImBuf::y, RenderData::yasp, rctf::ymax, rctf::ymin, RenderData::ysch, and SpaceSeq::zebra.
Referenced by sequencer_preview_area_draw().
static void draw_seq_backdrop | ( | View2D * | v2d | ) | [static] |
Definition at line 976 of file sequencer_draw.c.
References View2D::cur, i, MAX2, TH_BACK, TH_GRID, UI_ThemeColor(), UI_ThemeColorShade(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
Definition at line 407 of file sequencer_draw.c.
References View2D::cur, draw_shadedstrip(), Sequence::enddisp, Sequence::endofs, Sequence::endstill, fdrawbox(), fdrawline(), Sequence::flag, get_seq_color3ubv(), Sequence::len, Sequence::machine, View2D::mask, SELECT, SEQ_EFFECT, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, Sequence::start, Sequence::startdisp, Sequence::startofs, Sequence::startstill, Sequence::type, UI_GetColorPtrBlendShade3ubv(), UI_GetColorPtrShade3ubv(), ARegion::v2d, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by draw_seq_strip().
static void draw_seq_handle | ( | View2D * | v2d, |
Sequence * | seq, | ||
float | pixelx, | ||
short | direction | ||
) | [static] |
Definition at line 325 of file sequencer_draw.c.
References BLI_snprintf(), CLAMP(), Sequence::enddisp, Sequence::flag, G, get_sequence_effect_num_inputs(), Sequence::handsize, Sequence::machine, SELECT, SEQ_EFFECT, SEQ_LEFTHANDLE, SEQ_LEFTSEL, SEQ_RIGHTHANDLE, SEQ_RIGHTSEL, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, Sequence::startdisp, Sequence::type, and UI_view2d_text_cache_add().
Referenced by draw_seq_strip().
static void draw_seq_strip | ( | Scene * | scene, |
ARegion * | ar, | ||
Sequence * | seq, | ||
int | outline_tint, | ||
float | pixelx | ||
) | [static] |
Definition at line 641 of file sequencer_draw.c.
References View2D::cur, draw_seq_extensions(), draw_seq_handle(), draw_seq_text(), draw_shadedstrip(), drawmeta_contents(), drawseqwave(), Sequence::enddisp, Sequence::endstill, Sequence::flag, G, get_seq_color3ubv(), Sequence::handsize, Sequence::len, Sequence::machine, SELECT, SEQ_LEFTHANDLE, SEQ_LOCK, SEQ_META, SEQ_MUTE, SEQ_OVERLAP, SEQ_RIGHTHANDLE, seq_single_check(), SEQ_SOUND, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, seq_tx_get_final_left(), seq_tx_get_final_right(), Sequence::start, Sequence::startdisp, Sequence::startstill, stipple_diag_stripes_neg, stipple_diag_stripes_pos, Sequence::type, UI_GetColorPtrShade3ubv(), uiDrawBoxShade(), ARegion::v2d, ARegion::winx, rctf::xmax, and rctf::xmin.
Referenced by draw_seq_strips().
Definition at line 1018 of file sequencer_draw.c.
References CTX_data_scene(), View2D::cur, draw_seq_strip(), Sequence::enddisp, ListBase::first, Sequence::flag, Sequence::len, Sequence::machine, View2D::mask, MAX2, MIN2, Sequence::next, SELECT, seq_active_get(), Editing::seqbasep, Sequence::start, Sequence::startdisp, ARegion::v2d, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
static void draw_seq_text | ( | View2D * | v2d, |
Sequence * | seq, | ||
float | x1, | ||
float | x2, | ||
float | y1, | ||
float | y2, | ||
const unsigned char | background_col[3] | ||
) | [static] |
Definition at line 512 of file sequencer_draw.c.
References BLI_snprintf(), Strip::dir, FILE_MAX, Sequence::flag, give_seqname(), Scene::id, Sequence::len, Sequence::machine, Sequence::multicam_source, bSound::name, StripElem::name, ID::name, Sequence::name, Sequence::plugin, Sequence::scene, Sequence::scene_camera, SELECT, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_ADJUSTMENT, SEQ_EFFECT, SEQ_IMAGE, SEQ_META, SEQ_MOVIE, SEQ_MULTICAM, SEQ_PLUGIN, SEQ_SCENE, SEQ_SOUND, Sequence::sound, str, Sequence::strip, Strip::stripdata, Sequence::type, UI_view2d_text_cache_rectf(), PluginSeq::version, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_seq_strip().
static void draw_shadedstrip | ( | Sequence * | seq, |
unsigned char | col[3], | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | [static] |
Definition at line 579 of file sequencer_draw.c.
References Sequence::flag, SELECT, SEQ_INVALID_EFFECT, SEQ_MUTE, stipple_halftone, UI_GetColorPtrBlendShade3ubv(), and UI_GetColorPtrShade3ubv().
Referenced by draw_seq_extensions(), and draw_seq_strip().
Definition at line 1079 of file sequencer_draw.c.
References ANIM_draw_cfra(), ANIM_draw_previewrange(), boundbox_seq(), RenderData::cfra, CTX_data_scene(), CTX_wm_space_seq(), View2D::cur, DRAW_MARKERS_LINES, draw_markers_time(), draw_seq_backdrop(), draw_seq_strips(), DRAWCFRA_SHOW_NUMBOX, DRAWCFRA_UNIT_SECONDS, Scene::ed, FALSE, ListBase::first, SpaceSeq::flag, View2D::flag, Editing::metastack, Editing::over_cfra, Editing::over_flag, Editing::over_ofs, Scene::r, seq_draw_sfra_efra(), SEQ_DRAWFRAMES, SEQ_EDIT_OVERLAY_ABS, SEQ_EDIT_OVERLAY_SHOW, seq_give_editing(), SEQ_NO_DRAW_CFRANUM, TH_BACK, View2D::tot, UI_GetThemeColor3fv(), UI_view2d_constant_grid_draw(), UI_view2d_scrollers_calc(), UI_view2d_scrollers_draw(), UI_view2d_scrollers_free(), UI_view2d_text_cache_draw(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), ARegion::v2d, V2D_GRID_CLAMP, V2D_UNIT_FRAMES, V2D_UNIT_SECONDSSEQ, V2D_UNIT_VALUES, rctf::ymax, and rctf::ymin.
Referenced by sequencer_main_area_draw().
static void drawmeta_contents | ( | Scene * | scene, |
Sequence * | seqm, | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | [static] |
Definition at line 255 of file sequencer_draw.c.
References drawmeta_stipple(), Sequence::enddisp, fdrawbox(), ListBase::first, Sequence::flag, get_seq_color3ubv(), Sequence::machine, MAX2, MAXSEQ, MIN2, Sequence::next, SEQ_MUTE, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, Sequence::seqbase, Sequence::startdisp, and UI_GetColorPtrShade3ubv().
Referenced by draw_seq_strip().
static void drawmeta_stipple | ( | int | value | ) | [static] |
Definition at line 240 of file sequencer_draw.c.
References stipple_halftone.
Referenced by drawmeta_contents().
static void drawseqwave | ( | Scene * | scene, |
Sequence * | seq, | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
float | stepsize | ||
) | [static] |
Definition at line 167 of file sequencer_draw.c.
References Sequence::anim_startofs, data, SoundWaveform::data, Sequence::enddisp, Sequence::flag, FPS, i, SoundWaveform::length, length(), SEQ_AUDIO_DRAW_WAVEFORM, Sequence::sound, sound_read_waveform(), SOUND_WAVE_SAMPLES_PER_SECOND, Sequence::startdisp, Sequence::startofs, and bSound::waveform.
Referenced by draw_seq_strip().
Definition at line 79 of file sequencer_draw.c.
References SolidColorVars::col, Sequence::effectdata, Sequence::flag, rgb_byte_set_hue_float_offset(), rgb_float_to_byte(), Sequence::scene, SEQ_ADD, SEQ_ADJUSTMENT, SEQ_ALPHAOVER, SEQ_ALPHAUNDER, SEQ_COLOR, SEQ_CROSS, SEQ_GAMCROSS, SEQ_GLOW, SEQ_IMAGE, SEQ_META, SEQ_MOVIE, SEQ_MUL, SEQ_MULTICAM, SEQ_MUTE, SEQ_OVERDROP, SEQ_PLUGIN, SEQ_SCENE, SEQ_SOUND, SEQ_SPEED, SEQ_SUB, SEQ_TRANSFORM, SEQ_WIPE, TH_SEQ_AUDIO, TH_SEQ_EFFECT, TH_SEQ_IMAGE, TH_SEQ_META, TH_SEQ_MOVIE, TH_SEQ_PLUGIN, TH_SEQ_SCENE, TH_SEQ_TRANSITION, Sequence::type, UI_GetColorPtrBlendShade3ubv(), UI_GetColorPtrShade3ubv(), and UI_GetThemeColor3ubv().
Referenced by draw_seq_extensions(), draw_seq_strip(), and drawmeta_contents().
Definition at line 1054 of file sequencer_draw.c.
References View2D::cur, fdrawline(), PEFRA, PSFRA, TH_BACK, UI_ThemeColorShade(), UI_ThemeColorShadeAlpha(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
static void UNUSED_FUNCTION() set_special_seq_update | ( | int | val | ) | [static] |
Definition at line 746 of file sequencer_draw.c.
References NULL, and simple_enum_gen::val.
Sequence* special_seq_update = NULL [static] |
Definition at line 744 of file sequencer_draw.c.