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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-19 05:49:58 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-19 05:49:58 +0400
commitd433cd65f7127d60e17d05a824290423ad226eae (patch)
treef0a9c821f6046e97b74c6969d41269b558fd52ab /source/blender/editors/space_nla
parent10f0f66560234a04aed3295c74fff20adacbc57f (diff)
parentf10dea7e3b9b431edae9c787fa1a9e09cd567ed7 (diff)
Merged changes in the trunk up to revision 53146.
Conflicts resolved: release/datafiles/startup.blend source/blender/blenkernel/CMakeLists.txt source/blender/blenlib/intern/bpath.c source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/SConscript28
-rw-r--r--source/blender/editors/space_nla/nla_draw.c36
2 files changed, 45 insertions, 19 deletions
diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript
index ee010e6856f..18c6392eee9 100644
--- a/source/blender/editors/space_nla/SConscript
+++ b/source/blender/editors/space_nla/SConscript
@@ -1,4 +1,30 @@
-#!/usr/bin/python
+#!/usr/bin/env python
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Nathan Letwory.
+#
+# ***** END GPL LICENSE BLOCK *****
+
Import ('env')
sources = env.Glob('*.c')
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index fd999bf2476..0c89e3ecbcf 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -632,7 +632,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
for (ale = anim_data->first; ale; ale = ale->next) {
const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla));
const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla));
- const float ydatac = (float)(y - 7);
+ const float ydatac = (float)(y - 0.35f * U.widget_unit);
/* check if visible */
if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
@@ -716,7 +716,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
if (ale->id) {
/* special exception for textures */
if (GS(ale->id->name) == ID_TE) {
- offset = 14;
+ offset = 0.7f * U.widget_unit;
indent = 1;
}
/* special exception for nodetrees */
@@ -727,7 +727,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
case NTREE_SHADER:
{
/* same as for textures */
- offset = 14;
+ offset = 0.7f * U.widget_unit;
indent = 1;
}
break;
@@ -735,19 +735,19 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
case NTREE_TEXTURE:
{
/* even more */
- offset = 21;
+ offset = U.widget_unit;
indent = 1;
}
break;
default:
/* normal will do */
- offset = 14;
+ offset = 0.7f * U.widget_unit;
break;
}
}
else {
- offset = 14;
+ offset = 0.7f * U.widget_unit;
}
}
else {
@@ -779,7 +779,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
glColor4f(color[0], color[1], color[2], alpha);
}
- offset += 7 * indent;
+ offset += 0.35f * U.widget_unit * indent;
/* only on top two corners, to show that this channel sits on top of the preceding ones */
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
@@ -797,7 +797,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
UI_ThemeColorShade(TH_HEADER, ((nonSolo == 0) ? 20 : -20));
indent += group;
- offset += 7 * indent;
+ offset += 0.35f * U.widget_unit * indent;
glBegin(GL_QUADS);
glVertex2f(x + offset, yminc);
glVertex2f(x + offset, ymaxc);
@@ -809,14 +809,14 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
/* draw expand/collapse triangle */
if (expand > 0) {
UI_icon_draw(x + offset, ydatac, expand);
- offset += 17;
+ offset += 0.85f * U.widget_unit;
}
/* draw special icon indicating certain data-types */
if (special > -1) {
/* for normal channels */
UI_icon_draw(x + offset, ydatac, special);
- offset += 17;
+ offset += 0.85f * U.widget_unit;
}
glDisable(GL_BLEND);
@@ -837,19 +837,19 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
/* draw protect 'lock' */
if (protect > -1) {
- offset = 16;
+ offset = 0.8f * U.widget_unit;
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, protect);
}
/* draw mute 'eye' */
if (mute > -1) {
- offset += 16;
+ offset += 0.8f * U.widget_unit;
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, mute);
}
/* draw NLA-action line 'status-icons' - only when there's an action */
if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) {
- offset += 16;
+ offset += 0.8f * U.widget_unit;
/* now draw some indicator icons */
if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) {
@@ -862,7 +862,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
fdrawline((float)(v2d->cur.xmax - offset), yminc,
(float)(v2d->cur.xmax - offset), ymaxc);
- offset += 16;
+ offset += 0.8f * U.widget_unit;
/* 'tweaking action' indicator - not a button */
UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, ICON_EDIT);
@@ -870,10 +870,10 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
else {
/* XXX firstly draw a little rect to help identify that it's different from the toggles */
glBegin(GL_LINE_LOOP);
- glVertex2f((float)v2d->cur.xmax - offset - 1, y - 7);
- glVertex2f((float)v2d->cur.xmax - offset - 1, y + 9);
- glVertex2f((float)v2d->cur.xmax - 1, y + 9);
- glVertex2f((float)v2d->cur.xmax - 1, y - 7);
+ glVertex2f((float)v2d->cur.xmax - offset - 1, y - 0.35f * U.widget_unit);
+ glVertex2f((float)v2d->cur.xmax - offset - 1, y + 0.45f * U.widget_unit);
+ glVertex2f((float)v2d->cur.xmax - 1, y + 0.45f * U.widget_unit);
+ glVertex2f((float)v2d->cur.xmax - 1, y - 0.35f * U.widget_unit);
glEnd(); // GL_LINES
/* 'push down' icon for normal active-actions */