Blender V2.61 - r43446
|
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include <unistd.h>
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_anim_api.h"
#include "graph_intern.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
Go to the source code of this file.
Defines | |
#define | drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f ) |
#define | cpackA(intVC, alpha) |
Functions | |
static void | draw_fcurve_modifier_controls_envelope (FModifier *fcm, View2D *v2d) |
static void | draw_fcurve_vertices_keyframes (FCurve *fcu, SpaceIpo *UNUSED(sipo), View2D *v2d, short edit, short sel) |
static void | draw_fcurve_handle_control (float x, float y, float xscale, float yscale, float hsize) |
static void | draw_fcurve_vertices_handles (FCurve *fcu, SpaceIpo *sipo, View2D *v2d, short sel, short sel_handle_only) |
static void | set_fcurve_vertex_color (FCurve *fcu, short sel) |
static void | draw_fcurve_vertices (SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short do_handles, short sel_handle_only) |
static int | draw_fcurve_handles_check (SpaceIpo *sipo, FCurve *fcu) |
static void | draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) |
static void | draw_fcurve_sample_control (float x, float y, float xscale, float yscale, float hsize) |
static void | draw_fcurve_samples (SpaceIpo *sipo, ARegion *ar, FCurve *fcu) |
static void | draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d, View2DGrid *grid) |
static void | draw_fcurve_curve_samples (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d) |
static void | draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d) |
void | graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) |
void | graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel) |
void | graph_draw_channel_names (bContext *C, bAnimContext *ac, ARegion *ar) |
Definition in file graph_draw.c.
#define cpackA | ( | intVC, | |
alpha | |||
) |
{ \ float _cpackCol[3]; \ cpack_to_rgb(intVC, &_cpackCol[0], &_cpackCol[1], &_cpackCol[2]); \ glColor4f(_cpackCol[0], _cpackCol[1], _cpackCol[2], alpha); \ }
Definition at line 81 of file graph_draw.c.
#define drawFCurveFade | ( | fcu | ) | ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f ) |
Definition at line 75 of file graph_draw.c.
Referenced by draw_fcurve_handles(), graph_draw_curves(), and set_fcurve_vertex_color().
static void draw_fcurve_curve | ( | bAnimContext * | ac, |
ID * | id, | ||
FCurve * | fcu, | ||
View2D * | v2d, | ||
View2DGrid * | grid | ||
) | [static] |
Definition at line 494 of file graph_draw.c.
References ANIM_unit_mapping_get_factor(), View2D::cur, FCurve::driver, evaluate_fcurve(), NULL, bAnimContext::scene, U, UI_view2d_grid_size(), UserDef::v2d_min_gridsize, rctf::xmax, and rctf::xmin.
Referenced by graph_draw_curves().
static void draw_fcurve_curve_bezts | ( | bAnimContext * | ac, |
ID * | id, | ||
FCurve * | fcu, | ||
View2D * | v2d | ||
) | [static] |
Definition at line 632 of file graph_draw.c.
References ANIM_unit_mapping_apply_fcurve(), ANIM_UNITCONV_RESTORE, FCurve::bezt, BEZT_IPO_CONST, BEZT_IPO_LIN, correct_bezpart(), View2D::cur, data, FCurve::driver, FCurve::extend, FCURVE_EXTRAPOLATE_CONSTANT, FCURVE_INT_VALUES, FCurve::flag, forward_diff_bezier(), BezTriple::ipo, len_v2v2(), bAnimContext::scene, FCurve::totvert, BezTriple::vec, rctf::xmax, and rctf::xmin.
Referenced by graph_draw_curves().
static void draw_fcurve_curve_samples | ( | bAnimContext * | ac, |
ID * | id, | ||
FCurve * | fcu, | ||
View2D * | v2d | ||
) | [static] |
Definition at line 555 of file graph_draw.c.
References ANIM_unit_mapping_apply_fcurve(), ANIM_UNITCONV_RESTORE, View2D::cur, FCurve::extend, FCURVE_EXTRAPOLATE_CONSTANT, FCURVE_INT_VALUES, FCurve::flag, FCurve::fpt, bAnimContext::scene, FCurve::totvert, FPoint::vec, rctf::xmax, and rctf::xmin.
Referenced by graph_draw_curves(), and graph_draw_ghost_curves().
static void draw_fcurve_handle_control | ( | float | x, |
float | y, | ||
float | xscale, | ||
float | yscale, | ||
float | hsize | ||
) | [static] |
Definition at line 184 of file graph_draw.c.
Referenced by draw_fcurve_vertices_handles().
Definition at line 338 of file graph_draw.c.
References BEZSELECTED, FCurve::bezt, BEZT_IPO_BEZ, drawFCurveFade, BezTriple::f1, BezTriple::f2, BezTriple::f3, SpaceIpo::flag, BezTriple::h1, BezTriple::h2, BezTriple::ipo, NULL, SELECT, SIPO_SELVHANDLESONLY, TH_HANDLE_FREE, TH_HANDLE_SEL_FREE, FCurve::totvert, UI_GetThemeColor3ubv(), and BezTriple::vec.
Referenced by graph_draw_curves().
Definition at line 316 of file graph_draw.c.
References AGRP_PROTECTED, FCURVE_INT_VALUES, FCURVE_PROTECTED, SpaceIpo::flag, FCurve::flag, bActionGroup::flag, FCurve::grp, SIPO_NOHANDLES, and FCurve::totvert.
Referenced by graph_draw_curves().
Definition at line 94 of file graph_draw.c.
References bglBegin(), bglEnd(), View2D::cur, FModifier::data, FMod_Envelope::data, i, IN_RANGE, FMod_Envelope::max, FMod_Envelope::midval, FMod_Envelope::min, setlinestyle(), rctf::xmax, and rctf::xmin.
Referenced by graph_draw_curves().
static void draw_fcurve_sample_control | ( | float | x, |
float | y, | ||
float | xscale, | ||
float | yscale, | ||
float | hsize | ||
) | [static] |
Definition at line 427 of file graph_draw.c.
Referenced by draw_fcurve_samples().
Definition at line 460 of file graph_draw.c.
References draw_fcurve_sample_control(), FCURVE_ACTIVE, FCURVE_SELECTED, SpaceIpo::flag, FCurve::flag, FCurve::fpt, NULL, SIPO_BEAUTYDRAW_OFF, TH_TEXT, TH_TEXT_HI, TH_VERTEX_SIZE, FCurve::totvert, UI_GetThemeValuef(), UI_ThemeColor(), UI_view2d_getscale(), ARegion::v2d, and FPoint::vec.
Referenced by graph_draw_curves().
static void draw_fcurve_vertices | ( | SpaceIpo * | sipo, |
ARegion * | ar, | ||
FCurve * | fcu, | ||
short | do_handles, | ||
short | sel_handle_only | ||
) | [static] |
Definition at line 281 of file graph_draw.c.
References draw_fcurve_vertices_handles(), draw_fcurve_vertices_keyframes(), FCURVE_PROTECTED, FCurve::flag, set_fcurve_vertex_color(), TH_VERTEX_SIZE, UI_GetThemeValuef(), and ARegion::v2d.
Referenced by graph_draw_curves().
static void draw_fcurve_vertices_handles | ( | FCurve * | fcu, |
SpaceIpo * | sipo, | ||
View2D * | v2d, | ||
short | sel, | ||
short | sel_handle_only | ||
) | [static] |
Definition at line 216 of file graph_draw.c.
References BEZSELECTED, FCurve::bezt, BEZT_IPO_BEZ, draw_fcurve_handle_control(), BezTriple::f1, BezTriple::f3, SpaceIpo::flag, i, BezTriple::ipo, NULL, SELECT, SIPO_BEAUTYDRAW_OFF, TH_HANDLE_VERTEX, TH_HANDLE_VERTEX_SELECT, TH_HANDLE_VERTEX_SIZE, FCurve::totvert, UI_GetThemeValuef(), UI_ThemeColor(), UI_view2d_getscale(), and BezTriple::vec.
Referenced by draw_fcurve_vertices().
static void draw_fcurve_vertices_keyframes | ( | FCurve * | fcu, |
SpaceIpo * | UNUSEDsipo, | ||
View2D * | v2d, | ||
short | edit, | ||
short | sel | ||
) | [static] |
Definition at line 144 of file graph_draw.c.
References FCurve::bezt, bglBegin(), bglEnd(), bglVertex3fv(), View2D::cur, BezTriple::f2, i, IN_RANGE, SELECT, FCurve::totvert, BezTriple::vec, rctf::xmax, and rctf::xmin.
Referenced by draw_fcurve_vertices().
void graph_draw_channel_names | ( | bContext * | C, |
bAnimContext * | ac, | ||
ARegion * | ar | ||
) |
Definition at line 961 of file graph_draw.c.
References ACHANNEL_FIRST, ACHANNEL_HEIGHT, ACHANNEL_HEIGHT_HALF, ACHANNEL_STEP, ANIM_animdata_filter(), ANIM_channel_draw(), ANIM_channel_draw_widgets(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, BLI_freelistN(), View2D::cur, bAnimContext::data, bAnimContext::datatype, filter(), ListBase::first, i, IN_RANGE, bAnimListElem::next, NULL, UI_EMBOSS, UI_view2d_totRect_set(), uiBeginBlock(), uiDrawBlock(), uiEndBlock(), ARegion::v2d, ARegion::winx, rctf::ymax, and rctf::ymin.
Referenced by graph_channel_area_draw().
void graph_draw_curves | ( | bAnimContext * | ac, |
SpaceIpo * | sipo, | ||
ARegion * | ar, | ||
View2DGrid * | grid, | ||
short | sel | ||
) |
Definition at line 826 of file graph_draw.c.
References AGRP_MUTED, AGRP_PROTECTED, ANIM_animdata_filter(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), ANIM_unit_mapping_apply_fcurve(), ANIM_UNITCONV_RESTORE, ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_SEL, ANIMFILTER_UNSEL, FCurve::bezt, BLI_freelistN(), FCurve::color, bAnimContext::data, bAnimContext::datatype, draw_fcurve_curve(), draw_fcurve_curve_bezts(), draw_fcurve_curve_samples(), draw_fcurve_handles(), draw_fcurve_handles_check(), draw_fcurve_modifier_controls_envelope(), draw_fcurve_samples(), draw_fcurve_vertices(), drawFCurveFade, FCURVE_ACTIVE, fcurve_are_keyframes_usable(), FCURVE_INT_VALUES, FCURVE_MUTED, FCURVE_PROTECTED, FCURVE_SELECTED, filter(), find_active_fmodifier(), ListBase::first, SpaceIpo::flag, FCurve::flag, bActionGroup::flag, FMODIFIER_TYPE_ENVELOPE, FCurve::fpt, FCurve::grp, bAnimListElem::id, bAnimListElem::key_data, FCurve::modifiers, bAnimListElem::next, NULL, bAnimContext::scene, setlinestyle(), SIPO_BEAUTYDRAW_OFF, SIPO_SELCUVERTSONLY, SIPO_SELVHANDLESONLY, TH_HEADER, FCurve::totvert, UI_ThemeColorShade(), and ARegion::v2d.
Referenced by graph_main_area_draw().
void graph_draw_ghost_curves | ( | bAnimContext * | ac, |
SpaceIpo * | sipo, | ||
ARegion * | ar | ||
) |
Definition at line 791 of file graph_draw.c.
References FCurve::color, draw_fcurve_curve_samples(), ListBase::first, SpaceIpo::flag, SpaceIpo::ghostCurves, FCurve::next, NULL, setlinestyle(), SIPO_BEAUTYDRAW_OFF, and ARegion::v2d.
Referenced by graph_main_area_draw().
static void set_fcurve_vertex_color | ( | FCurve * | fcu, |
short | sel | ||
) | [static] |
Definition at line 262 of file graph_draw.c.
References drawFCurveFade, FCURVE_PROTECTED, FCurve::flag, TH_TEXT, TH_TEXT_HI, TH_VERTEX, TH_VERTEX_SELECT, and UI_ThemeColorShadeAlpha().
Referenced by draw_fcurve_vertices().