Blender  V3.3
Macros | Functions
action_draw.c File Reference
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_pointcache.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"
#include "action_intern.h"

Go to the source code of this file.

Macros

#define EXTRA_SCROLL_PAD   100.0f
 

Functions

void draw_channel_names (bContext *C, bAnimContext *ac, ARegion *region)
 
static void draw_channel_action_ranges (bAnimContext *ac, ListBase *anim_data, View2D *v2d)
 
void draw_channel_strips (bAnimContext *ac, SpaceAction *saction, ARegion *region)
 
static bool timeline_cache_is_hidden_by_setting (SpaceAction *saction, PTCacheID *pid)
 
static void timeline_cache_color_get (PTCacheID *pid, float color[4])
 
static void timeline_cache_modify_color_based_on_state (PointCache *cache, float color[4])
 
static bool timeline_cache_find_next_cached_segment (PointCache *cache, int search_start_frame, int *r_segment_start, int *r_segment_end)
 
static uint timeline_cache_segments_count (PointCache *cache)
 
static void timeline_cache_draw_cached_segments (PointCache *cache, uint pos_id)
 
static void timeline_cache_draw_single (PTCacheID *pid, float y_offset, float height, uint pos_id)
 
void timeline_draw_cache (SpaceAction *saction, Object *ob, Scene *scene)
 

Macro Definition Documentation

◆ EXTRA_SCROLL_PAD

#define EXTRA_SCROLL_PAD   100.0f

Definition at line 115 of file action_draw.c.

Function Documentation

◆ draw_channel_action_ranges()

static void draw_channel_action_ranges ( bAnimContext ac,
ListBase anim_data,
View2D v2d 
)
static

◆ draw_channel_names()

void draw_channel_names ( struct bContext C,
struct bAnimContext ac,
struct ARegion region 
)

◆ draw_channel_strips()

void draw_channel_strips ( struct bAnimContext ac,
struct SpaceAction saction,
struct ARegion region 
)

Draw keyframes in each channel.

Definition at line 165 of file action_draw.c.

References ACHANNEL_FIRST_TOP, ACHANNEL_HEIGHT, ACHANNEL_SETTING_SELECT, ACHANNEL_STEP, ACHANNEL_TOT_HEIGHT, ThemeWireColor::active, SpaceAction::ads, ALE_ACT, ALE_ALL, ALE_FCURVE, ALE_GPFRAME, ALE_GROUP, ALE_MASKLAY, ALE_NONE, ALE_OB, ALE_SCE, ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_channel_get_typeinfo(), ANIM_channel_setting_get(), ANIM_nla_mapping_get(), ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_GPENCIL, ANIMCONT_MASK, ANIMCONT_SHAPEKEY, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_DSSKEY, ANIMTYPE_DSWOR, ANIMTYPE_FCURVE, ANIMTYPE_FILLACTD, ANIMTYPE_GPLAYER, ANIMTYPE_GROUP, ANIMTYPE_OBJECT, ANIMTYPE_SCENE, ANIMTYPE_SUMMARY, bGPDlayer::color, color, bActionGroup::cs, View2D::cur, bActionGroup::customCol, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, bAnimListElem::datatype, draw_action_channel(), draw_agroup_channel(), draw_channel_action_ranges(), draw_fcurve_channel(), draw_gpl_channel(), draw_masklay_channel(), draw_object_channel(), draw_scene_channel(), draw_summary_channel(), ED_keylist_draw_list_create(), ED_keylist_draw_list_flush(), ED_keylist_draw_list_free(), RenderData::efra, ELEM, EXTRA_SCROLL_PAD, filter(), ListBase::first, SpaceAction::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), FCurve::grp, bAnimChannelType::has_setting, height, immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3f(), immUniformColor3ubvAlpha(), immUniformColor4ubv(), immUniformThemeColor(), immVertex2f(), immVertexFormat(), IN_RANGE, bAnimListElem::key_data, MIN2, SpaceAction::mode, bAnimListElem::next, NULL, pos, Scene::r, rgb_float_to_uchar(), SACTCONT_TIMELINE, SACTION_MOVING, SACTION_SHOW_EXTREMES, SACTION_SHOW_INTERPOLATION, bAnimContext::scene, ThemeWireColor::select, RenderData::sfra, ThemeWireColor::solid, TH_ANIM_ACTIVE, TH_DOPESHEET_CHANNELOB, TH_DOPESHEET_CHANNELSUBOB, TH_GROUP, TH_GROUP_ACTIVE, TH_HILITE, TH_SHADE2, SpaceAction::timeslide, View2D::tot, bAnimListElem::type, UI_GetThemeColor4ubv(), USER_ANIM_SHOW_CHANNEL_GROUP_COLORS, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, and bAnimContext::yscale_fac.

Referenced by action_main_region_draw().

◆ timeline_cache_color_get()

static void timeline_cache_color_get ( PTCacheID pid,
float  color[4] 
)
static

◆ timeline_cache_draw_cached_segments()

static void timeline_cache_draw_cached_segments ( PointCache cache,
uint  pos_id 
)
static

◆ timeline_cache_draw_single()

static void timeline_cache_draw_single ( PTCacheID pid,
float  y_offset,
float  height,
uint  pos_id 
)
static

◆ timeline_cache_find_next_cached_segment()

static bool timeline_cache_find_next_cached_segment ( PointCache cache,
int  search_start_frame,
int *  r_segment_start,
int *  r_segment_end 
)
static

◆ timeline_cache_is_hidden_by_setting()

static bool timeline_cache_is_hidden_by_setting ( SpaceAction saction,
PTCacheID pid 
)
static

◆ timeline_cache_modify_color_based_on_state()

static void timeline_cache_modify_color_based_on_state ( PointCache cache,
float  color[4] 
)
static

Definition at line 505 of file action_draw.c.

References color, PointCache::flag, PTCACHE_BAKED, and PTCACHE_OUTDATED.

Referenced by timeline_cache_draw_single().

◆ timeline_cache_segments_count()

static uint timeline_cache_segments_count ( PointCache cache)
static

◆ timeline_draw_cache()

void timeline_draw_cache ( SpaceAction saction,
Object ob,
Scene scene 
)