|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstdlib>#include <cstring>#include "BLI_math_color.h"#include "BLI_utildefines.h"#include "DNA_anim_types.h"#include "DNA_modifier_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "BKE_bake_geometry_nodes_modifier.hh"#include "BKE_pointcache.h"#include "ANIM_action.hh"#include "GPU_immediate.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "ED_anim_api.hh"#include "ED_keyframes_draw.hh"#include "MOD_nodes.hh"#include "action_intern.hh"Go to the source code of this file.
Classes | |
| struct | CacheRange |
Functions | |
Channel List | |
| void | draw_channel_names (bContext *C, bAnimContext *ac, ARegion *region, const ListBase &anim_data) |
Timeline - Caches | |
| static bool | timeline_cache_is_hidden_by_setting (const SpaceAction *saction, const 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], float color_state[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) |
| static void | timeline_cache_draw_geometry_nodes (const blender::Span< CacheRange > cache_ranges, const bool all_simulations_baked, float *y_offset, const float line_height, const uint pos_id) |
| void | timeline_draw_cache (const SpaceAction *saction, const Object *ob, const Scene *scene) |
Keyframes | |
| #define | EXTRA_SCROLL_PAD 100.0f |
| static void | draw_channel_action_ranges (ListBase *anim_data, View2D *v2d) |
| static void | draw_backdrops (bAnimContext *ac, ListBase &anim_data, View2D *v2d, uint pos) |
| static void | draw_keyframes (bAnimContext *ac, View2D *v2d, SpaceAction *saction, ListBase &anim_data) |
| void | draw_channel_strips (bAnimContext *ac, SpaceAction *saction, ARegion *region, ListBase *anim_data) |
| #define EXTRA_SCROLL_PAD 100.0f |
Definition at line 119 of file action_draw.cc.
Referenced by draw_backdrops(), and draw_channel_strips().
|
static |
Definition at line 172 of file action_draw.cc.
References ACHANNEL_SETTING_SELECT, ALE_NONE, ANIM_channel_get_typeinfo(), ANIM_channel_setting_get(), ANIM_UI_get_channel_height(), ANIM_UI_get_channel_step(), ANIM_UI_get_first_channel_top(), ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_GPENCIL, ANIMCONT_MASK, ANIMCONT_SHAPEKEY, ANIMTYPE_DSSKEY, ANIMTYPE_DSWOR, ANIMTYPE_FILLACT_LAYERED, ANIMTYPE_FILLACTD, ANIMTYPE_GREASE_PENCIL_DATABLOCK, ANIMTYPE_GREASE_PENCIL_LAYER_GROUP, ANIMTYPE_GROUP, ANIMTYPE_OBJECT, ANIMTYPE_SCENE, ANIMTYPE_SUMMARY, View2D::cur, bAnimContext::datatype, bAnimListElem::datatype, RenderData::efra, ELEM, EXTRA_SCROLL_PAD, ListBase::first, bAnimChannelType::get_channel_color, bAnimChannelType::has_setting, immRectf(), immUniformColor3ubvAlpha(), immUniformColor4ubv(), immUniformThemeColor(), IN_RANGE, bAnimListElem::next, pos, Scene::r, bAnimContext::scene, RenderData::sfra, TH_ANIM_ACTIVE, TH_DOPESHEET_CHANNELOB, TH_DOPESHEET_CHANNELSUBOB, TH_GROUP, TH_GROUP_ACTIVE, TH_HILITE, TH_SHADE2, bAnimListElem::type, UI_GetThemeColor4ubv(), USER_ANIM_SHOW_CHANNEL_GROUP_COLORS, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_channel_strips().
Definition at line 122 of file action_draw.cc.
References ALE_NONE, ANIM_channel_action_get(), ANIM_draw_action_framerange(), ANIM_UI_get_channel_skip(), ANIM_UI_get_channel_step(), ANIM_UI_get_first_channel_top(), View2D::cur, ListBase::first, IN_RANGE, rctf::ymax, and rctf::ymin.
Referenced by draw_channel_strips().
| void draw_channel_names | ( | bContext * | C, |
| bAnimContext * | ac, | ||
| ARegion * | region, | ||
| const ListBase & | anim_data ) |
Left hand part.
Definition at line 56 of file action_draw.cc.
References ANIM_channel_draw(), ANIM_channel_draw_widgets(), ANIM_UI_get_channel_height(), ANIM_UI_get_channel_step(), ANIM_UI_get_first_channel_top(), bAnimContext::area, BLI_rctf_init(), View2D::cur, ListBase::first, IN_RANGE, bAnimListElem::next, UI_block_begin(), UI_block_draw(), UI_block_end(), UI_EMBOSS, UI_view2d_sync(), V2D_LOCK_COPY, rctf::xmax, rctf::ymax, and rctf::ymin.
Referenced by action_channel_region_draw().
| void draw_channel_strips | ( | bAnimContext * | ac, |
| SpaceAction * | saction, | ||
| ARegion * | region, | ||
| ListBase * | anim_data ) |
Draw keyframes in each channel.
Definition at line 469 of file action_draw.cc.
References ANIM_animdata_freelist(), ANIMCONT_DOPESHEET, View2D::cur, bAnimContext::datatype, draw_backdrops(), draw_channel_action_ranges(), draw_keyframes(), EXTRA_SCROLL_PAD, SpaceAction::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immVertex2f(), immVertexFormat(), pos, SACTION_MOVING, SpaceAction::timeslide, rctf::ymax, and rctf::ymin.
Referenced by action_main_region_draw().
|
static |
Definition at line 308 of file action_draw.cc.
References SpaceAction::ads, bAnimListElem::adt, ALE_ACT, ALE_ACTION_LAYERED, ALE_ACTION_SLOT, ALE_ALL, ALE_FCURVE, ALE_GPFRAME, ALE_GREASE_PENCIL_CEL, ALE_GREASE_PENCIL_DATA, ALE_GREASE_PENCIL_GROUP, ALE_GROUP, ALE_MASKLAY, ALE_NLASTRIP, ALE_NONE, ALE_OB, ALE_SCE, ANIM_nla_mapping_get(), ANIM_UI_get_channel_height(), ANIM_UI_get_channel_step(), ANIM_UI_get_first_channel_top(), ANIM_UI_get_keyframe_scale_factor(), View2D::cur, bAnimListElem::data, bAnimListElem::datatype, ED_add_action_channel(), ED_add_action_group_channel(), ED_add_action_layered_channel(), ED_add_action_slot_channel(), ED_add_fcurve_channel(), ED_add_grease_pencil_cels_channel(), ED_add_grease_pencil_datablock_channel(), ED_add_grease_pencil_layer_group_channel(), ED_add_grease_pencil_layer_legacy_channel(), ED_add_mask_layer_channel(), ED_add_object_channel(), ED_add_scene_channel(), ED_add_summary_channel(), ED_channel_draw_list_create(), ED_channel_list_flush(), ED_channel_list_free(), ListBase::first, SpaceAction::flag, IN_RANGE, bAnimListElem::key_data, SpaceAction::mode, bAnimListElem::next, SACTCONT_TIMELINE, SACTION_SHOW_EXTREMES, SACTION_SHOW_INTERPOLATION, rctf::ymax, and rctf::ymin.
Referenced by draw_channel_strips().
Definition at line 556 of file action_draw.cc.
References BLI_assert, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_DYNAMICPAINT, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_RIGIDBODY, PTCACHE_TYPE_SMOKE_DOMAIN, PTCACHE_TYPE_SMOKE_HIGHRES, PTCACHE_TYPE_SOFTBODY, and PTCacheID::type.
Referenced by timeline_cache_draw_single().
|
static |
Definition at line 671 of file action_draw.cc.
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 730 of file action_draw.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::bake::Baked, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::IndexRange::first(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_PRIM_TRIS, immBeginAtMost(), immEnd(), immRectf_fast(), immUniform4fv(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::bke::bake::Invalid, blender::Span< T >::is_empty(), blender::IndexRange::last(), mul_v3_fl(), TH_SIMULATED_FRAMES, top, UI_GetThemeColor4fv(), V2D_SCROLL_HANDLE_HEIGHT, and blender::bke::bake::Valid.
Referenced by timeline_draw_cache().
|
static |
Definition at line 691 of file action_draw.cc.
References PTCacheID::cache, copy_v4_v4(), PointCache::endframe, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), immRectf(), immUniform4fv(), interp_v3_v3v3(), PointCache::startframe, TH_BACK, timeline_cache_color_get(), timeline_cache_draw_cached_segments(), timeline_cache_modify_color_based_on_state(), UI_GetThemeColor4fv(), and V2D_SCROLL_HANDLE_HEIGHT.
Referenced by timeline_draw_cache().
|
static |
Definition at line 622 of file action_draw.cc.
References PointCache::cached_frames, PointCache::endframe, and PointCache::startframe.
Referenced by timeline_cache_draw_cached_segments(), and timeline_cache_segments_count().
|
static |
Definition at line 518 of file action_draw.cc.
References SpaceAction::cache_display, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_DYNAMICPAINT, PTCACHE_TYPE_PARTICLES, PTCACHE_TYPE_RIGIDBODY, 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 606 of file action_draw.cc.
References PointCache::flag, mul_v3_fl(), PTCACHE_BAKED, and PTCACHE_OUTDATED.
Referenced by timeline_cache_draw_single().
|
static |
Definition at line 656 of file action_draw.cc.
References count, PointCache::startframe, and timeline_cache_find_next_cached_segment().
Referenced by timeline_cache_draw_cached_segments().
| void timeline_draw_cache | ( | const SpaceAction * | saction, |
| const Object * | ob, | ||
| const Scene * | scene ) |
Definition at line 835 of file action_draw.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::bake::BakeNodeCache::bake, blender::bke::bake::SimulationNodeCache::bake, blender::bke::bake::ModifierCache::bake_cache_by_id, blender::bke::bake::Baked, BKE_ptcache_ids_from_object(), BLI_freelistN(), SpaceAction::cache_display, blender::bke::bake::SimulationNodeCache::cache_status, eModifierType_Nodes, blender::bke::bake::NodeBakeCache::frame_range(), blender::bke::bake::NodeBakeCache::frames, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_DIAG_STRIPES, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1i(), immVertexFormat(), LISTBASE_FOREACH, lock, Object::modifiers, blender::bke::bake::ModifierCache::mutex, bNodeTree::nested_node_refs_num, NodesModifierData::node_group, NODES_MODIFIER_BAKE_MODE_STILL, NodesModifierData::runtime, blender::bke::bake::ModifierCache::simulation_cache_by_id, TIME_CACHE_DISPLAY, TIME_CACHE_SIMULATION_NODES, timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), timeline_cache_is_hidden_by_setting(), and UI_SCALE_FAC.
Referenced by action_main_region_draw_overlay().