Blender
V3.3
|
#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) |
#define EXTRA_SCROLL_PAD 100.0f |
Definition at line 115 of file action_draw.c.
|
static |
Definition at line 118 of file action_draw.c.
References ACHANNEL_FIRST_TOP, ACHANNEL_SKIP, ACHANNEL_STEP, ALE_NONE, ANIM_channel_action_get(), ANIM_draw_action_framerange(), View2D::cur, ListBase::first, IN_RANGE, NULL, rctf::ymax, and rctf::ymin.
Referenced by draw_channel_strips().
void draw_channel_names | ( | struct bContext * | C, |
struct bAnimContext * | ac, | ||
struct ARegion * | region | ||
) |
Left hand part.
Definition at line 50 of file action_draw.c.
References ACHANNEL_FIRST_TOP, ACHANNEL_HEIGHT, ACHANNEL_STEP, ACHANNEL_TOT_HEIGHT, ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_channel_draw(), ANIM_channel_draw_widgets(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, bAnimContext::area, BLI_rctf_init(), C, View2D::cur, bAnimContext::data, bAnimContext::datatype, filter(), ListBase::first, height, IN_RANGE, bAnimListElem::next, NULL, View2D::tot, UI_block_begin(), UI_block_draw(), UI_block_end(), UI_EMBOSS, UI_view2d_sync(), ARegion::v2d, V2D_LOCK_COPY, rctf::xmax, rctf::ymax, and rctf::ymin.
Referenced by action_channel_region_draw().
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().
Definition at line 454 of file action_draw.c.
References BLI_assert, color, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_DYNAMICPAINT, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_RIGIDBODY, PTCACHE_TYPE_SIM_PARTICLES, PTCACHE_TYPE_SMOKE_DOMAIN, PTCACHE_TYPE_SMOKE_HIGHRES, PTCACHE_TYPE_SOFTBODY, and PTCacheID::type.
Referenced by timeline_cache_draw_single().
|
static |
Definition at line 568 of file action_draw.c.
References GPU_PRIM_TRIS, immBeginAtMost(), immEnd(), immRectf_fast(), PointCache::startframe, timeline_cache_find_next_cached_segment(), and timeline_cache_segments_count().
Referenced by timeline_cache_draw_single().
|
static |
Definition at line 588 of file action_draw.c.
References PTCacheID::cache, color, PointCache::endframe, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), height, immRectf(), immUniformColor4fv(), PointCache::startframe, timeline_cache_color_get(), timeline_cache_draw_cached_segments(), timeline_cache_modify_color_based_on_state(), and V2D_SCROLL_HANDLE_HEIGHT.
Referenced by timeline_draw_cache().
|
static |
Definition at line 519 of file action_draw.c.
References PointCache::cached_frames, PointCache::endframe, offset, and PointCache::startframe.
Referenced by timeline_cache_draw_cached_segments(), and timeline_cache_segments_count().
|
static |
Definition at line 415 of file action_draw.c.
References SpaceAction::cache_display, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_DYNAMICPAINT, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_RIGIDBODY, PTCACHE_TYPE_SIM_PARTICLES, PTCACHE_TYPE_SMOKE_DOMAIN, PTCACHE_TYPE_SMOKE_HIGHRES, PTCACHE_TYPE_SOFTBODY, TIME_CACHE_CLOTH, TIME_CACHE_DYNAMICPAINT, TIME_CACHE_PARTICLES, TIME_CACHE_RIGIDBODY, TIME_CACHE_SMOKE, TIME_CACHE_SOFTBODY, and PTCacheID::type.
Referenced by timeline_draw_cache().
|
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().
|
static |
Definition at line 553 of file action_draw.c.
References count, PointCache::startframe, and timeline_cache_find_next_cached_segment().
Referenced by timeline_cache_draw_cached_segments().
void timeline_draw_cache | ( | SpaceAction * | saction, |
Object * | ob, | ||
Scene * | scene | ||
) |
Definition at line 609 of file action_draw.c.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), SpaceAction::cache_display, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immUnbindProgram(), immVertexFormat(), LISTBASE_FOREACH, NULL, scene, TIME_CACHE_DISPLAY, timeline_cache_draw_single(), timeline_cache_is_hidden_by_setting(), and UI_DPI_FAC.
Referenced by action_main_region_draw().