diff options
Diffstat (limited to 'source/blender/editors/space_clip/clip_dopesheet_draw.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_dopesheet_draw.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c index 84209f7b744..e264d7f3885 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.c +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c @@ -328,21 +328,15 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar) IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) { MovieTrackingTrack *track = channel->track; - uiBut *but; + const int icon = (track->flag & TRACK_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED; PointerRNA ptr; - int icon; RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track, &ptr); - if (track->flag & TRACK_LOCKED) - icon = ICON_LOCKED; - else - icon = ICON_UNLOCKED; - uiBlockSetEmboss(block, UI_EMBOSSN); - but = uiDefIconButR(block, ICONTOG, 1, icon, - v2d->cur.xmax - UI_UNIT_X - CHANNEL_PAD, y - UI_UNIT_Y / 2.0f, - UI_UNIT_X, UI_UNIT_Y, &ptr, "lock", 0, 0, 0, 0, 0, NULL); + uiDefIconButR(block, ICONTOG, 1, icon, + v2d->cur.xmax - UI_UNIT_X - CHANNEL_PAD, y - UI_UNIT_Y / 2.0f, + UI_UNIT_X, UI_UNIT_Y, &ptr, "lock", 0, 0, 0, 0, 0, NULL); uiBlockSetEmboss(block, UI_EMBOSS); } |