Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-27 02:21:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-27 02:21:56 +0400
commit54b64cfd612922054f014460f1c08ec4b0374a3d (patch)
tree2df8a029ef6deff92da8e67fee92c55a29c11234 /source/blender/editors/space_clip/clip_dopesheet_draw.c
parenteda0f3b1863e2e41b9913e16af82407b63e145bf (diff)
code cleanup: use const float and define array size
Diffstat (limited to 'source/blender/editors/space_clip/clip_dopesheet_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c14
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);
}