Blender
V3.3
|
#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_range.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 "ED_keyframes_keylist.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 895 of file nla_draw.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_channel_draw(), ANIM_channel_draw_widgets(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, 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 787 of file nla_draw.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_draw_action_framerange(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FCURVESONLY, ANIMFILTER_LIST_CHANNELS, ANIMFILTER_LIST_VISIBLE, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, BLI_rctf_size_x(), BLI_rcti_size_x(), color, View2D::cur, bAnimContext::data, bAnimContext::datatype, NlaStrip::end, filter(), ListBase::first, NlaStrip::flag, get_visible_nla_strips(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), height, immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), IN_RANGE, LISTBASE_FOREACH, View2D::mask, 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, View2D::tot, UI_DPI_FAC, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by nla_main_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 709 of file nla_draw.c.
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, NULL, blender::meshintersect::prev(), 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 NULL, then just treat strip as enabled.
For disabled tracks, only the tweaked strip is enabled.
Definition at line 409 of file nla_draw.c.
References AnimData::actstrip, BLI_assert, NlaTrack::flag, and NLATRACK_DISABLED.
Referenced by nla_draw_strip().
|
static |
Definition at line 77 of file nla_draw.c.
References action_to_keylist(), BLI_listbase_count(), BLI_rcti_size_x(), BLI_rcti_size_y(), color, KeyframeShaderBindings::color_id, 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_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_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, Range2f::max, Range2f::min, min_ff(), nla_action_get_color(), NULL, KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, KeyframeShaderBindings::size_id, and y.
Referenced by draw_nla_main_data().
Get color to use for NLA Action channel's background.
Definition at line 52 of file nla_draw.c.
References ADT_NLA_EDIT_ON, ADT_NLA_SOLO_TRACK, color, 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 169 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 426 of file nla_draw.c.
References NlaStrip::actend, NlaStrip::actstart, ADT_NLA_SOLO_TRACK, ATTR_FALLTHROUGH, BLI_listbase_count(), color, 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_FLAG_SELECT, 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_4fv(), UI_draw_roundbox_corner_set(), x2, rctf::xmax, rctf::xmin, and y.
Referenced by draw_nla_main_data().
Definition at line 303 of file nla_draw.c.
References blender::math::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 679 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 |
Add the relevant text to the cache of text-strings to draw in pixel-space.
Definition at line 621 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_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 375 of file nla_draw.c.
References color, 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 213 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 241 of file nla_draw.c.
References AnimData::actstrip, ADT_NLA_EDIT_ON, color, 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().