|
Blender V5.0
|
#include <cfloat>#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include "DNA_anim_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "BLI_bounds_types.hh"#include "BLI_listbase.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_fcurve.hh"#include "BKE_nla.hh"#include "ED_anim_api.hh"#include "ED_keyframes_draw.hh"#include "ED_keyframes_keylist.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_state.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "nla_intern.hh"#include "nla_private.h"Go to the source code of this file.
| void draw_nla_main_data | ( | bAnimContext * | ac, |
| SpaceNla * | snla, | ||
| ARegion * | region ) |
Definition at line 787 of file nla_draw.cc.
References AnimData::act_extendmode, ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_draw_action_framerange(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_ACTION_SLOT, ANIMTYPE_ANIMDATA, ANIMTYPE_DSARM, ANIMTYPE_DSCACHEFILE, ANIMTYPE_DSCAM, ANIMTYPE_DSCUR, ANIMTYPE_DSGPENCIL, ANIMTYPE_DSHAIR, ANIMTYPE_DSLAM, ANIMTYPE_DSLAT, ANIMTYPE_DSLIGHTPROBE, ANIMTYPE_DSLINESTYLE, ANIMTYPE_DSMAT, ANIMTYPE_DSMBALL, ANIMTYPE_DSMCLIP, ANIMTYPE_DSMESH, ANIMTYPE_DSNTREE, ANIMTYPE_DSPART, ANIMTYPE_DSPOINTCLOUD, ANIMTYPE_DSSKEY, ANIMTYPE_DSSPK, ANIMTYPE_DSTEX, ANIMTYPE_DSVOLUME, ANIMTYPE_DSWOR, ANIMTYPE_FCURVE, ANIMTYPE_FILLACT_LAYERED, ANIMTYPE_FILLACTD, ANIMTYPE_FILLDRIVERS, ANIMTYPE_GPLAYER, ANIMTYPE_GREASE_PENCIL_DATABLOCK, ANIMTYPE_GREASE_PENCIL_LAYER, ANIMTYPE_GREASE_PENCIL_LAYER_GROUP, ANIMTYPE_GROUP, ANIMTYPE_MASKDATABLOCK, ANIMTYPE_MASKLAYER, ANIMTYPE_NLAACTION, ANIMTYPE_NLACONTROLS, ANIMTYPE_NLACURVE, ANIMTYPE_NLATRACK, ANIMTYPE_NONE, ANIMTYPE_NUM_TYPES, ANIMTYPE_OBJECT, ANIMTYPE_PALETTE, ANIMTYPE_SCENE, ANIMTYPE_SHAPEKEY, ANIMTYPE_SPECIALDATA__UNUSED, ANIMTYPE_SUMMARY, BKE_nla_clip_length_ensure_nonzero(), BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::cur, bAnimContext::data, bAnimContext::datatype, filter, ListBase::first, blender::animrig::Action::get_frame_range(), get_visible_nla_strips(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), IN_RANGE, LISTBASE_FOREACH, View2D::mask, bAnimListElem::next, nla_action_draw_keyframes(), nla_action_get_color(), nla_draw_strip(), nla_draw_strip_frames_text(), nla_draw_strip_text(), NLASTRIP_EXTEND_HOLD, NLASTRIP_EXTEND_HOLD_FORWARD, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_TEMP_META, NLATRACK_FIRST_TOP, NLATRACK_HEIGHT, NLATRACK_SKIP, NLATRACK_STEP, NLATRACK_TOT_HEIGHT, pos, View2D::tot, UI_SCALE_FAC, ARegion::v2d, wrap(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by nla_main_region_draw().
| void draw_nla_track_list | ( | const bContext * | C, |
| bAnimContext * | ac, | ||
| ARegion * | region, | ||
| const ListBase & | anim_data ) |
Definition at line 974 of file nla_draw.cc.
References ANIM_channel_draw(), ANIM_channel_draw_widgets(), bAnimContext::area, BLI_rctf_init(), C, View2D::cur, blender::ui::Emboss, ListBase::first, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, IN_RANGE, bAnimListElem::next, NLATRACK_FIRST_TOP, NLATRACK_HEIGHT, NLATRACK_STEP, bAnimContext::sl, UI_block_begin(), UI_block_draw(), UI_block_end(), UI_view2d_sync(), ARegion::v2d, V2D_LOCK_COPY, rctf::xmax, rctf::ymax, and rctf::ymin.
Referenced by nla_track_region_draw().
Gets the first and last visible NLA strips on a track. Note that this also includes tracks that might only be visible because of their extendmode.
Definition at line 707 of file nla_draw.cc.
References BKE_nlastrip_within_bounds(), BLI_listbase_is_empty(), View2D::cur, NlaStrip::end, NlaStrip::extendmode, ListBase::first, ListBase::last, LISTBASE_FOREACH, NlaStrip::next, NLASTRIP_EXTEND_HOLD, NLASTRIP_EXTEND_NOTHING, NlaStrip::prev, NlaStrip::start, NlaTrack::strips, rctf::xmax, and rctf::xmin.
Referenced by draw_nla_main_data().
This check only accounts for the track's disabled flag and whether the strip is being tweaked. It does not account for muting or soloing.
This shouldn't happen. If passed nullptr, then just treat strip as enabled.
For disabled tracks, only the tweaked strip is enabled.
Definition at line 400 of file nla_draw.cc.
References AnimData::actstrip, BLI_assert, NlaTrack::flag, and NLATRACK_DISABLED.
Referenced by nla_draw_strip().
|
static |
Definition at line 78 of file nla_draw.cc.
References action_to_keylist(), BLI_listbase_count(), BLI_rcti_size_x(), BLI_rcti_size_y(), KeyframeShaderBindings::color_id, View2D::cur, draw_keyframe_shape(), ED_keylist_all_keys_frame_range(), ED_keylist_create(), ED_keylist_free(), ED_keylist_is_empty(), ED_keylist_listbase(), KeyframeShaderBindings::flags_id, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_SHADER_KEYFRAME_SHAPE, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1f(), immUniform2f(), immUniformColor4fv(), immVertexFormat(), KEYFRAME_EXTREME_NONE, KEYFRAME_HANDLE_NONE, KEYFRAME_SHAPE_FRAME, LISTBASE_FOREACH, View2D::mask, blender::Bounds< T >::max, blender::Bounds< T >::min, min_ff(), nla_action_get_color(), KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, KeyframeShaderBindings::size_id, rctf::xmax, rctf::xmin, and y.
Referenced by draw_nla_main_data().
Get color to use for NLA Action channel's background.
Definition at line 53 of file nla_draw.cc.
References ADT_NLA_EDIT_ON, ADT_NLA_SOLO_TRACK, AnimData::flag, TH_ANIM_ACTIVE, TH_ANIM_INACTIVE, TH_NLA_TWEAK, and UI_GetThemeColor4fv().
Referenced by acf_nlaaction_backdrop(), acf_nlaaction_color(), draw_nla_main_data(), and nla_action_draw_keyframes().
|
static |
Definition at line 170 of file nla_draw.cc.
References NlaStrip::act, NlaStrip::actend, NlaStrip::actstart, BLI_listbase_count(), ELEM, ListBase::first, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformThemeColorShade(), immVertex2f(), immVertexFormat(), LISTBASE_FOREACH, bAction::markers, nlastrip_get_frame(), NLATIME_CONVERT_MAP, TH_STRIP_SELECT, and UI_SCALE_FAC.
Referenced by nla_strip_draw_markers().
|
static |
Definition at line 417 of file nla_draw.cc.
References NlaStrip::actend, NlaStrip::actstart, ADT_NLA_SOLO_TRACK, ATTR_FALLTHROUGH, BLI_assert, BLI_listbase_count(), View2D::cur, NlaStrip::end, NlaStrip::extendmode, ListBase::first, AnimData::flag, NlaStrip::flag, NlaTrack::flag, SpaceNla::flag, floorf, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), i, imm_draw_box_wire_2d(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3fvAlpha(), immVertex2f(), immVertexFormat(), IS_EQF, is_nlastrip_enabled(), ListBase::last, LISTBASE_FOREACH, NlaStrip::next, nla_draw_strip_curves(), nla_draw_use_dashed_outlines(), nla_strip_draw_markers(), nla_strip_get_color_inside(), NLASTRIP_EXTEND_HOLD, NLASTRIP_EXTEND_HOLD_FORWARD, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_INVALID_LOCATION, NLASTRIP_FLAG_MUTED, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLATRACK_MUTED, NLATRACK_SOLO, NlaStrip::prev, NlaStrip::repeat, NlaStrip::scale, SNLA_NOLOCALMARKERS, SNLA_NOSTRIPCURVES, NlaStrip::start, NlaStrip::strips, NlaStrip::type, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by draw_nla_main_data().
Definition at line 295 of file nla_draw.cc.
References abs, BKE_fcurve_find(), NlaStrip::blendin, NlaStrip::blendout, CLAMP, NlaStrip::end, evaluate_fcurve(), NlaStrip::fcurves, NlaStrip::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_PRIM_LINE_STRIP, immBegin(), immBeginAtMost(), immEnd(), immUniformColor3f(), immUniformColor4f(), immVertex2f(), IS_EQF, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_USR_INFLUENCE, pos, NlaStrip::start, and y.
Referenced by nla_draw_strip().
|
static |
Add frame extents to cache of text-strings to draw in pixel-space for now, only used when transforming strips.
Definition at line 677 of file nla_draw.cc.
References col, NlaStrip::end, SNPRINTF_UTF8_RLEN, NlaStrip::start, and UI_view2d_text_cache_add().
Referenced by draw_nla_main_data().
|
static |
Add the relevant text to the cache of text-strings to draw in pixel-space.
Definition at line 619 of file nla_draw.cc.
References ADT_NLA_SOLO_TRACK, col, DATA_, AnimData::flag, NlaStrip::flag, NlaTrack::flag, NlaStrip::name, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_TEMP_META, NLASTRIP_FLAG_TWEAKUSER, NLATRACK_SOLO, str, STRNCPY_UTF8_RLEN, UI_view2d_text_cache_add_rectf(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_nla_main_data().
Definition at line 366 of file nla_draw.cc.
References GPU_line_width(), GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBindBuiltinProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformColor3fv(), immVertexFormat(), and UI_SCALE_FAC.
Referenced by nla_draw_strip().
Definition at line 215 of file nla_draw.cc.
References NlaStrip::flag, GPU_line_width(), LISTBASE_FOREACH, nla_actionclip_draw_markers(), NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_CLIP, NlaStrip::strips, and NlaStrip::type.
Referenced by nla_draw_strip().
Definition at line 243 of file nla_draw.cc.
References AnimData::actstrip, ADT_NLA_EDIT_ON, AnimData::flag, NlaStrip::flag, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TWEAKUSER, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLASTRIP_TYPE_SOUND, NLASTRIP_TYPE_TRANSITION, TH_NLA_META, TH_NLA_META_SEL, TH_NLA_SOUND, TH_NLA_SOUND_SEL, TH_NLA_TRANSITION, TH_NLA_TRANSITION_SEL, TH_NLA_TWEAK, TH_NLA_TWEAK_DUPLI, TH_STRIP, TH_STRIP_SELECT, NlaStrip::type, and UI_GetThemeColor3fv().
Referenced by nla_draw_strip().