Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "DNA_anim_types.h"
#include "DNA_node_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "nla_intern.h"
Go to the source code of this file.
Functions | |
static void | nla_action_get_color (AnimData *adt, bAction *act, float color[4]) |
static void | nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d, float y, float ymin, float ymax) |
static void | nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float color[3]) |
static void | nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc) |
static void | nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStrip *strip, View2D *v2d, float yminc, float ymaxc) |
static void | nla_draw_strip_text (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, int index, View2D *v2d, float yminc, float ymaxc) |
static void | nla_draw_strip_frames_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, View2D *v2d, float UNUSED(yminc), float ymaxc) |
void | draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar) |
static void | draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, View2D *v2d, float y) |
void | draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar) |
Definition in file nla_draw.c.
void draw_nla_channel_list | ( | bContext * | C, |
bAnimContext * | ac, | ||
ARegion * | ar | ||
) |
Definition at line 924 of file nla_draw.c.
References ANIM_animdata_filter(), ANIM_channel_draw_widgets(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, BLI_freelistN(), View2D::cur, bAnimContext::data, bAnimContext::datatype, draw_nla_channel_list_gl(), filter(), ListBase::first, IN_RANGE, bAnimListElem::next, NLACHANNEL_HEIGHT, NLACHANNEL_HEIGHT_HALF, NLACHANNEL_STEP, NULL, bAnimContext::sa, bAnimContext::sl, View2D::tot, UI_EMBOSS, UI_view2d_sync(), uiBeginBlock(), uiDrawBlock(), uiEndBlock(), ARegion::v2d, V2D_LOCK_COPY, rctf::ymax, and rctf::ymin.
Referenced by nla_channel_area_draw().
static void draw_nla_channel_list_gl | ( | bAnimContext * | ac, |
ListBase * | anim_data, | ||
View2D * | v2d, | ||
float | y | ||
) | [static] |
Definition at line 658 of file nla_draw.c.
References ADT_NLA_EDIT_NOMAP, ADT_NLA_EDIT_ON, ADT_NLA_SOLO_TRACK, ANIM_channel_draw(), ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, BLI_snprintf(), BLI_strncpy(), View2D::cur, EDITABLE_NLT, fdrawline(), ListBase::first, AnimData::flag, NlaTrack::flag, GS, bNodeTree::id, bAction::id, ID_NT, ID_TE, if(), IN_RANGE, ID::name, NlaTrack::name, NLACHANNEL_HEIGHT_HALF, NLACHANNEL_SKIP, NLACHANNEL_STEP, NLATRACK_ACTIVE, NLATRACK_DISABLED, NLATRACK_MUTED, NLATRACK_SOLO, NTREE_SHADER, NTREE_TEXTURE, SEL_NLT, bAnimContext::sl, TH_HEADER, TH_TEXT, TH_TEXT_HI, bNodeTree::type, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_DrawString(), UI_icon_draw(), UI_ThemeColor(), UI_ThemeColorShade(), uiDrawBox(), uiSetRoundBox(), rctf::xmax, rctf::ymax, and rctf::ymin.
Referenced by draw_nla_channel_list().
void draw_nla_main_data | ( | bAnimContext * | ac, |
SpaceNla * | snla, | ||
ARegion * | ar | ||
) |
Definition at line 537 of file nla_draw.c.
References bAnimListElem::adt, ANIM_animdata_filter(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, BKE_nlastrip_within_bounds(), BLI_freelistN(), MakeCursor::color, View2D::cur, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, fdrawline(), filter(), ListBase::first, NlaStrip::flag, IN_RANGE, NlaStrip::next, bAnimListElem::next, nla_action_draw_keyframes(), nla_action_get_color(), nla_draw_strip(), nla_draw_strip_frames_text(), nla_draw_strip_text(), NLACHANNEL_HEIGHT, NLACHANNEL_HEIGHT_HALF, NLACHANNEL_SKIP, NLACHANNEL_STEP, NLASTRIP_FLAG_TEMP_META, NULL, NlaTrack::strips, View2D::tot, bAnimListElem::type, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by nla_main_area_draw().
static void nla_action_draw_keyframes | ( | AnimData * | adt, |
bAction * | act, | ||
View2D * | v2d, | ||
float | y, | ||
float | ymin, | ||
float | ymax | ||
) | [static] |
Definition at line 112 of file nla_draw.c.
References action_to_keylist(), BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_dlrbTree_linkedlist_sync(), ActKeyColumn::cfra, MakeCursor::color, draw_keyframe_shape(), ELEM, DLRBT_Tree::first, ActKeyColumn::key_type, KEYFRAME_SHAPE_FRAME, DLRBT_Tree::last, ActKeyColumn::next, nla_action_get_color(), NULL, and UI_view2d_getscale().
Referenced by draw_nla_main_data().
Definition at line 80 of file nla_draw.c.
References ADT_NLA_EDIT_ON, ADT_NLA_SOLO_TRACK, and AnimData::flag.
Referenced by draw_nla_main_data(), and nla_action_draw_keyframes().
static void nla_draw_strip | ( | SpaceNla * | snla, |
AnimData * | adt, | ||
NlaTrack * | nlt, | ||
NlaStrip * | strip, | ||
View2D * | v2d, | ||
float | yminc, | ||
float | ymaxc | ||
) | [static] |
Definition at line 310 of file nla_draw.c.
References NlaStrip::actend, NlaStrip::actstart, ADT_NLA_SOLO_TRACK, MakeCursor::color, View2D::cur, NlaStrip::end, NlaStrip::extendmode, fdrawline(), ListBase::first, NlaStrip::flag, SpaceNla::flag, NlaTrack::flag, AnimData::flag, i, IS_EQF, ListBase::last, NlaStrip::next, nla_draw_strip_curves(), nla_strip_get_color_inside(), NLASTRIP_EXTEND_HOLD, NLASTRIP_EXTEND_HOLD_FORWARD, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_MUTED, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLATRACK_SOLO, NULL, NlaStrip::prev, NlaStrip::repeat, NlaStrip::scale, setlinestyle(), SNLA_NOSTRIPCURVES, NlaStrip::start, NlaStrip::strips, NlaStrip::type, UI_CNR_ALL, uiDrawBoxShade(), uiSetRoundBox(), rctf::xmax, and rctf::xmin.
Referenced by draw_nla_main_data().
static void nla_draw_strip_curves | ( | NlaStrip * | strip, |
float | yminc, | ||
float | ymaxc | ||
) | [static] |
Definition at line 249 of file nla_draw.c.
References NlaStrip::blendin, NlaStrip::blendout, NlaStrip::end, evaluate_fcurve(), NlaStrip::fcurves, NlaStrip::flag, IS_EQF, list_find_fcurve(), NLASTRIP_FLAG_USR_INFLUENCE, and NlaStrip::start.
Referenced by nla_draw_strip().
static void nla_draw_strip_frames_text | ( | NlaTrack * | UNUSEDnlt, |
NlaStrip * | strip, | ||
View2D * | v2d, | ||
float | UNUSEDyminc, | ||
float | ymaxc | ||
) | [static] |
Definition at line 513 of file nla_draw.c.
References BLI_snprintf(), NlaStrip::end, NlaStrip::start, and UI_view2d_text_cache_add().
Referenced by draw_nla_main_data().
static void nla_draw_strip_text | ( | AnimData * | adt, |
NlaTrack * | nlt, | ||
NlaStrip * | strip, | ||
int | index, | ||
View2D * | v2d, | ||
float | yminc, | ||
float | ymaxc | ||
) | [static] |
Definition at line 461 of file nla_draw.c.
References ADT_NLA_SOLO_TRACK, BLI_snprintf(), BLI_strncpy(), NlaStrip::end, AnimData::flag, NlaStrip::flag, NlaTrack::flag, NlaStrip::name, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_FLAG_TWEAKUSER, NLATRACK_SOLO, NlaStrip::start, str, UI_view2d_text_cache_rectf(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_nla_main_data().
static void nla_strip_get_color_inside | ( | AnimData * | adt, |
NlaStrip * | strip, | ||
float | color[3] | ||
) | [static] |
Definition at line 163 of file nla_draw.c.
References ADT_NLA_EDIT_ON, AnimData::flag, NlaStrip::flag, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TWEAKUSER, NLASTRIP_TYPE_META, NLASTRIP_TYPE_SOUND, NLASTRIP_TYPE_TRANSITION, TH_STRIP, TH_STRIP_SELECT, NlaStrip::type, and UI_GetThemeColor3fv().
Referenced by nla_draw_strip().