|
Blender
V2.93
|
#include <float.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.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_dlrbTree.h"#include "BLI_utildefines.h"#include "BKE_context.h"#include "BKE_fcurve.h"#include "BKE_nla.h"#include "BKE_screen.h"#include "ED_anim_api.h"#include "ED_keyframes_draw.h"#include "GPU_immediate.h"#include "GPU_immediate_util.h"#include "GPU_state.h"#include "WM_types.h"#include "UI_interface.h"#include "UI_resources.h"#include "UI_view2d.h"#include "nla_intern.h"#include "nla_private.h"Go to the source code of this file.
| void draw_nla_channel_list | ( | const bContext * | C, |
| bAnimContext * | ac, | ||
| ARegion * | region | ||
| ) |
Definition at line 845 of file nla_draw.c.
References 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, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, height, IN_RANGE, bAnimListElem::next, NLACHANNEL_FIRST_TOP, NLACHANNEL_HEIGHT, NLACHANNEL_STEP, NLACHANNEL_TOT_HEIGHT, NULL, bAnimContext::sl, 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 nla_channel_region_draw().
| void draw_nla_main_data | ( | bAnimContext * | ac, |
| SpaceNla * | snla, | ||
| ARegion * | region | ||
| ) |
Definition at line 717 of file nla_draw.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, BKE_nlastrip_within_bounds(), BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::cur, bAnimContext::data, bAnimContext::datatype, NlaStrip::end, filter(), ListBase::first, NlaStrip::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), height, immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3f(), immUniformColor4f(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), IN_RANGE, View2D::mask, NlaStrip::next, nla_action_draw_keyframes(), nla_action_get_color(), nla_draw_strip(), nla_draw_strip_frames_text(), nla_draw_strip_text(), NLACHANNEL_FIRST_TOP, NLACHANNEL_HEIGHT, NLACHANNEL_SKIP, NLACHANNEL_STEP, NLACHANNEL_TOT_HEIGHT, NLASTRIP_FLAG_TEMP_META, NULL, pos, NlaStrip::start, NlaTrack::strips, View2D::tot, UI_DPI_FAC, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by nla_main_region_draw().
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 NULL, then just treat strip as enabled.
For disabled tracks, only the tweaked strip is enabled.
Definition at line 415 of file nla_draw.c.
References AnimData::actstrip, BLI_assert, NlaTrack::flag, and NLATRACK_DISABLED.
Referenced by nla_draw_strip().
|
static |
Definition at line 94 of file nla_draw.c.
References action_to_keylist(), BLI_dlrbTree_free(), BLI_dlrbTree_init(), BLI_listbase_count(), BLI_rcti_size_x(), BLI_rcti_size_y(), draw_keyframe_shape(), ELEM, DLRBT_Tree::first, GPU_COMP_F32, GPU_COMP_U32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_SHADER_KEYFRAME_DIAMOND, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1f(), immUniform2f(), immUniformColor4fv(), immVertexFormat(), KEYFRAME_EXTREME_NONE, KEYFRAME_HANDLE_NONE, KEYFRAME_SHAPE_FRAME, DLRBT_Tree::last, LISTBASE_FOREACH, View2D::mask, nla_action_get_color(), NULL, and y.
Referenced by draw_nla_main_data().
Definition at line 69 of file nla_draw.c.
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 182 of file nla_draw.c.
References NlaStrip::act, NlaStrip::actend, NlaStrip::actstart, BLI_listbase_count(), ELEM, ListBase::first, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_2D_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, NULL, TH_STRIP_SELECT, and UI_DPI_FAC.
Referenced by nla_strip_draw_markers().
|
static |
Definition at line 432 of file nla_draw.c.
References NlaStrip::actend, NlaStrip::actstart, ADT_NLA_SOLO_TRACK, ATTR_FALLTHROUGH, BLI_listbase_count(), View2D::cur, NlaStrip::end, NlaStrip::extendmode, ListBase::first, NlaStrip::flag, NlaTrack::flag, AnimData::flag, SpaceNla::flag, floorf, 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(), 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_MUTED, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLATRACK_MUTED, NLATRACK_SOLO, NULL, NlaStrip::prev, NlaStrip::repeat, NlaStrip::scale, SNLA_NOLOCALMARKERS, SNLA_NOSTRIPCURVES, NlaStrip::start, NlaStrip::strips, NlaStrip::type, UI_CNR_ALL, UI_draw_roundbox_corner_set(), UI_draw_roundbox_shade_x(), x2, rctf::xmax, rctf::xmin, and y.
Referenced by draw_nla_main_data().
Definition at line 316 of file nla_draw.c.
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(), immVertex2f(), IS_EQF, 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 692 of file nla_draw.c.
References BLI_snprintf_rlen(), col, NlaStrip::end, NlaStrip::start, and UI_view2d_text_cache_add().
Referenced by draw_nla_main_data().
|
static |
Definition at line 633 of file nla_draw.c.
References ADT_NLA_SOLO_TRACK, BLI_snprintf_rlen(), BLI_strncpy_rlen(), col, NlaStrip::flag, NlaTrack::flag, AnimData::flag, NlaStrip::name, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_FLAG_TWEAKUSER, NLATRACK_SOLO, str, UI_view2d_text_cache_add_rectf(), and rctf::xmin.
Referenced by draw_nla_main_data().
Definition at line 381 of file nla_draw.c.
References GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBindBuiltinProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformColor3fv(), immVertexFormat(), and UI_DPI_FAC.
Referenced by nla_draw_strip().
Definition at line 226 of file nla_draw.c.
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 254 of file nla_draw.c.
References AnimData::actstrip, ADT_NLA_EDIT_ON, NlaStrip::flag, AnimData::flag, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TWEAKUSER, 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().