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-06-03 22:25:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-03 22:25:57 +0400
commit4413024cdcf68c911c7de0ee3eea3221bef48b90 (patch)
tree4a1582557f85da8dda0029b12e6bf85c937fda34 /source/blender/editors/space_node
parentfea490c73e361409f4d52c787d9ceed9655adb13 (diff)
parentf9856c1c2da8139651eb59ff3bf174065d0f628c (diff)
svn merge ^/trunk/blender -r47325:47381
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c168
-rw-r--r--source/blender/editors/space_node/node_draw.c10
-rw-r--r--source/blender/editors/space_node/node_intern.h2
-rw-r--r--source/blender/editors/space_node/node_templates.c2
4 files changed, 95 insertions, 87 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index c17993b7b96..801b6c9001c 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -54,6 +54,7 @@
#include "BKE_node.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "NOD_composite.h"
#include "NOD_shader.h"
@@ -82,7 +83,7 @@
#include "node_intern.h"
// XXX interface.h
-extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
+extern void ui_dropshadow(rctf *rct, float radius, float aspect, float alpha, int select);
/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
@@ -100,7 +101,7 @@ static void node_socket_button_label(const bContext *UNUSED(C), uiBlock *block,
bNodeTree *UNUSED(ntree), bNode *UNUSED(node), bNodeSocket *sock,
const char *UNUSED(name), int x, int y, int width)
{
- uiDefBut(block, LABEL, 0, sock->name, x, y, width, NODE_DY, NULL, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, IFACE_(sock->name), x, y, width, NODE_DY, NULL, 0, 0, 0, 0, "");
}
static void node_socket_button_default(const bContext *C, uiBlock *block,
@@ -115,7 +116,7 @@ static void node_socket_button_default(const bContext *C, uiBlock *block,
RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
- bt = uiDefButR(block, NUM, B_NODE_EXEC, name,
+ bt = uiDefButR(block, NUM, B_NODE_EXEC, IFACE_(name),
x, y + 1, width, NODE_DY - 2,
&ptr, "default_value", 0, 0, 0, -1, -1, NULL);
if (node)
@@ -167,7 +168,7 @@ static void node_socket_button_components(const bContext *C, uiBlock *block,
args->arg1 = CTX_wm_space_node(C);
args->arg2 = node;
- uiDefBlockButN(block, socket_component_menu, args, name, x, y + 1, width, NODE_DY - 2, "");
+ uiDefBlockButN(block, socket_component_menu, args, IFACE_(name), x, y + 1, width, NODE_DY - 2, "");
}
}
@@ -176,7 +177,7 @@ static void node_socket_button_color(const bContext *C, uiBlock *block,
const char *name, int x, int y, int width)
{
if (sock->link || (sock->flag & SOCK_HIDE_VALUE))
- node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+ node_socket_button_label(C, block, ntree, node, sock, IFACE_(name), x, y, width);
else {
PointerRNA ptr;
uiBut *bt;
@@ -190,7 +191,7 @@ static void node_socket_button_color(const bContext *C, uiBlock *block,
uiButSetFunc(bt, node_sync_cb, CTX_wm_space_node(C), node);
if (name[0] != '\0' && labelw > 0)
- uiDefBut(block, LABEL, 0, name, x + 40, y + 2, labelw, NODE_DY - 2, NULL, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, IFACE_(name), x + 40, y + 2, labelw, NODE_DY - 2, NULL, 0, 0, 0, 0, "");
}
}
@@ -203,7 +204,7 @@ static void node_draw_input_default(const bContext *C, uiBlock *block,
if (stype->buttonfunc)
stype->buttonfunc(C, block, ntree, node, sock, name, x, y, width);
else
- node_socket_button_label(C, block, ntree, node, sock, name, x, y, width);
+ node_socket_button_label(C, block, ntree, node, sock, IFACE_(name), x, y, width);
}
static void node_draw_output_default(const bContext *C, uiBlock *block,
@@ -213,13 +214,14 @@ static void node_draw_output_default(const bContext *C, uiBlock *block,
SpaceNode *snode = CTX_wm_space_node(C);
float slen;
int ofs = 0;
+ const char *ui_name = IFACE_(name);
UI_ThemeColor(TH_TEXT);
- slen = snode->aspect * UI_GetStringWidth(name);
+ slen = snode->aspect * UI_GetStringWidth(ui_name);
while (slen > node->width) {
ofs++;
- slen = snode->aspect * UI_GetStringWidth(name + ofs);
+ slen = snode->aspect * UI_GetStringWidth(ui_name + ofs);
}
- uiDefBut(block, LABEL, 0, name + ofs, (short)(sock->locx - 15.0f - slen), (short)(sock->locy - 9.0f),
+ uiDefBut(block, LABEL, 0, ui_name + ofs, (short)(sock->locx - 15.0f - slen), (short)(sock->locy - 9.0f),
(short)(node->width - NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
@@ -324,8 +326,8 @@ static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt
uiTemplateCurveMapping(layout, ptr, "curve", 's', 0, 0);
row = uiLayoutRow(layout, 1);
- uiItemR(row, ptr, "frame_start", 0, "Sta", ICON_NONE);
- uiItemR(row, ptr, "frame_end", 0, "End", ICON_NONE);
+ uiItemR(row, ptr, "frame_start", 0, IFACE_("Sta"), ICON_NONE);
+ uiItemR(row, ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
}
static void node_buts_colorramp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
@@ -642,6 +644,7 @@ static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket *
{
bNodeTree *ngroup = (bNodeTree *)gnode->id;
uiBut *bt;
+ const char *ui_name = IFACE_(sock->name);
if (sock->flag & SOCK_DYNAMIC) {
bt = uiDefBut(gnode->block, TEX, 0, "",
@@ -653,9 +656,9 @@ static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket *
uiButSetFunc(bt, update_group_output_cb, snode, ngroup);
}
else {
- uiDefBut(gnode->block, LABEL, 0, sock->name,
+ uiDefBut(gnode->block, LABEL, 0, ui_name,
sock->locx + xoffset, sock->locy + 1 + yoffset, 72, NODE_DY,
- NULL, 0, sizeof(sock->name), 0, 0, "");
+ NULL, 0, sizeof(ui_name), 0, 0, "");
}
}
@@ -970,6 +973,11 @@ static void node_draw_frame(const bContext *C, ARegion *ar, SpaceNode *snode, bN
{
rctf *rct = &node->totr;
int color_id = node_get_colorid(node);
+ unsigned char color[4];
+ float alpha;
+
+ UI_GetThemeColor4ubv(TH_NODE_FRAME, color);
+ alpha = (float)(color[3])/255.0f;
/* skip if out of view */
if (node->totr.xmax < ar->v2d.cur.xmin || node->totr.xmin > ar->v2d.cur.xmax ||
@@ -981,13 +989,13 @@ static void node_draw_frame(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* shadow */
- node_draw_shadow(snode, node, BASIS_RAD);
+ node_draw_shadow(snode, node, BASIS_RAD, alpha);
/* body */
if (node->flag & NODE_CUSTOM_COLOR)
- glColor3fv(node->color);
+ glColor4f(node->color[0], node->color[1], node->color[2], alpha);
else
- UI_ThemeColor4(TH_NODE);
+ UI_ThemeColor4(TH_NODE_FRAME);
glEnable(GL_BLEND);
uiSetRoundBox(UI_CNR_ALL);
uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, BASIS_RAD);
@@ -1044,8 +1052,8 @@ static int node_resize_area_frame(bNode *node, int x, int y)
static void node_buts_frame_details(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
- uiItemR(layout, ptr, "label_size", 0, "Label Size", ICON_NONE);
- uiItemR(layout, ptr, "shrink", 0, "Shrink", ICON_NONE);
+ uiItemR(layout, ptr, "label_size", 0, IFACE_("Label Size"), ICON_NONE);
+ uiItemR(layout, ptr, "shrink", 0, IFACE_("Shrink"), ICON_NONE);
}
@@ -1199,15 +1207,15 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin
{
uiLayout *row;
- uiItemL(layout, "Location:", ICON_NONE);
+ uiItemL(layout, IFACE_("Location:"), ICON_NONE);
row = uiLayoutRow(layout, 1);
uiItemR(row, ptr, "translation", 0, "", ICON_NONE);
- uiItemL(layout, "Rotation:", ICON_NONE);
+ uiItemL(layout, IFACE_("Rotation:"), ICON_NONE);
row = uiLayoutRow(layout, 1);
uiItemR(row, ptr, "rotation", 0, "", ICON_NONE);
- uiItemL(layout, "Scale:", ICON_NONE);
+ uiItemL(layout, IFACE_("Scale:"), ICON_NONE);
row = uiLayoutRow(layout, 1);
uiItemR(row, ptr, "scale", 0, "", ICON_NONE);
@@ -1239,14 +1247,14 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA
uiItemPointerR(col, ptr, "color_layer", &dataptr, "vertex_colors", "", ICON_NONE);
}
else {
- uiItemR(col, ptr, "uv_layer", 0, "UV", ICON_NONE);
- uiItemR(col, ptr, "color_layer", 0, "VCol", ICON_NONE);
+ uiItemR(col, ptr, "uv_layer", 0, IFACE_("UV"), ICON_NONE);
+ uiItemR(col, ptr, "color_layer", 0, IFACE_("VCol"), ICON_NONE);
}
}
static void node_shader_buts_attribute(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
- uiItemR(layout, ptr, "attribute_name", 0, "Name", ICON_NONE);
+ uiItemR(layout, ptr, "attribute_name", 0, IFACE_("Name"), ICON_NONE);
}
static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
@@ -1409,7 +1417,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
ImageUser *iuser = node->storage;
char numstr[32];
const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0);
- BLI_snprintf(numstr, sizeof(numstr), "Frame: %d", framenr);
+ BLI_snprintf(numstr, sizeof(numstr), IFACE_("Frame: %d"), framenr);
uiItemL(layout, numstr, ICON_NONE);
}
@@ -1479,18 +1487,18 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(col, ptr, "use_relative", 0, NULL, ICON_NONE);
if (RNA_boolean_get(ptr, "use_relative")) {
- uiItemL(col, "Aspect Correction", 0);
+ uiItemL(col, IFACE_("Aspect Correction"), 0);
row = uiLayoutRow(layout, 1);
uiItemR(row, ptr, "aspect_correction", UI_ITEM_R_EXPAND, NULL, 0);
col = uiLayoutColumn(layout, 1);
- uiItemR(col, ptr, "factor_x", 0, "X", ICON_NONE);
- uiItemR(col, ptr, "factor_y", 0, "Y", ICON_NONE);
+ uiItemR(col, ptr, "factor_x", 0, IFACE_("X"), ICON_NONE);
+ uiItemR(col, ptr, "factor_y", 0, IFACE_("Y"), ICON_NONE);
}
else {
col = uiLayoutColumn(layout, 1);
- uiItemR(col, ptr, "size_x", 0, "X", ICON_NONE);
- uiItemR(col, ptr, "size_y", 0, "Y", ICON_NONE);
+ uiItemR(col, ptr, "size_x", 0, IFACE_("X"), ICON_NONE);
+ uiItemR(col, ptr, "size_y", 0, IFACE_("Y"), ICON_NONE);
}
}
@@ -1502,9 +1510,9 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(layout, ptr, "use_wrap", 0, NULL, ICON_NONE);
col = uiLayoutColumn(layout, 1);
- uiItemL(col, "Center:", ICON_NONE);
- uiItemR(col, ptr, "center_x", 0, "X", ICON_NONE);
- uiItemR(col, ptr, "center_y", 0, "Y", ICON_NONE);
+ uiItemL(col, IFACE_("Center:"), ICON_NONE);
+ uiItemR(col, ptr, "center_x", 0, IFACE_("X"), ICON_NONE);
+ uiItemR(col, ptr, "center_y", 0, IFACE_("Y"), ICON_NONE);
uiItemS(layout);
@@ -1533,7 +1541,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *UNUSED(C), Po
uiLayout *sub, *col;
col = uiLayoutColumn(layout, 0);
- uiItemL(col, "Bokeh Type:", ICON_NONE);
+ uiItemL(col, IFACE_("Bokeh Type:"), ICON_NONE);
uiItemR(col, ptr, "bokeh", 0, "", ICON_NONE);
uiItemR(col, ptr, "angle", 0, NULL, ICON_NONE);
@@ -1628,12 +1636,12 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), Po
col = uiLayoutColumn(layout, 0);
uiItemR(col, ptr, "samples", 0, NULL, ICON_NONE);
- uiItemR(col, ptr, "factor", 0, "Blur", ICON_NONE);
+ uiItemR(col, ptr, "factor", 0, IFACE_("Blur"), ICON_NONE);
col = uiLayoutColumn(layout, 1);
- uiItemL(col, "Speed:", ICON_NONE);
- uiItemR(col, ptr, "speed_min", 0, "Min", ICON_NONE);
- uiItemR(col, ptr, "speed_max", 0, "Max", ICON_NONE);
+ uiItemL(col, IFACE_("Speed:"), ICON_NONE);
+ uiItemR(col, ptr, "speed_min", 0, IFACE_("Min"), ICON_NONE);
+ uiItemR(col, ptr, "speed_max", 0, IFACE_("Max"), ICON_NONE);
uiItemR(layout, ptr, "use_curved", 0, NULL, ICON_NONE);
}
@@ -1657,16 +1665,16 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), Point
col = uiLayoutColumn(layout, 1);
if (RNA_boolean_get(ptr, "relative")) {
- uiItemR(col, ptr, "rel_min_x", 0, "Left", ICON_NONE);
- uiItemR(col, ptr, "rel_max_x", 0, "Right", ICON_NONE);
- uiItemR(col, ptr, "rel_min_y", 0, "Up", ICON_NONE);
- uiItemR(col, ptr, "rel_max_y", 0, "Down", ICON_NONE);
+ uiItemR(col, ptr, "rel_min_x", 0, IFACE_("Left"), ICON_NONE);
+ uiItemR(col, ptr, "rel_max_x", 0, IFACE_("Right"), ICON_NONE);
+ uiItemR(col, ptr, "rel_min_y", 0, IFACE_("Up"), ICON_NONE);
+ uiItemR(col, ptr, "rel_max_y", 0, IFACE_("Down"), ICON_NONE);
}
else {
- uiItemR(col, ptr, "min_x", 0, "Left", ICON_NONE);
- uiItemR(col, ptr, "max_x", 0, "Right", ICON_NONE);
- uiItemR(col, ptr, "min_y", 0, "Up", ICON_NONE);
- uiItemR(col, ptr, "max_y", 0, "Down", ICON_NONE);
+ uiItemR(col, ptr, "min_x", 0, IFACE_("Left"), ICON_NONE);
+ uiItemR(col, ptr, "max_x", 0, IFACE_("Right"), ICON_NONE);
+ uiItemR(col, ptr, "min_y", 0, IFACE_("Up"), ICON_NONE);
+ uiItemR(col, ptr, "max_y", 0, IFACE_("Down"), ICON_NONE);
}
}
@@ -1686,9 +1694,9 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUS
col = uiLayoutColumn(layout, 0);
- uiItemL(col, "Inner Edge:", ICON_NONE);
+ uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE);
uiItemR(col, ptr, "inner_mode", 0, "", ICON_NONE);
- uiItemL(col, "Buffer Edge:", ICON_NONE);
+ uiItemL(col, IFACE_("Buffer Edge:"), ICON_NONE);
uiItemR(col, ptr, "edge_mode", 0, "", ICON_NONE);
}
@@ -1765,7 +1773,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED
col = uiLayoutColumn(layout, 1);
- uiItemL(layout, "Color Space:", ICON_NONE);
+ uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1777,7 +1785,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
{
uiLayout *row, *col;
- uiItemL(layout, "Despill Channel:", ICON_NONE);
+ uiItemL(layout, IFACE_("Despill Channel:"), ICON_NONE);
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1785,7 +1793,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "limit_method") == 0) {
- uiItemL(col, "Limiting Channel:", ICON_NONE);
+ uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
row = uiLayoutRow(col, 0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -1827,12 +1835,12 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(
{
uiLayout *col, *row;
- uiItemL(layout, "Color Space:", ICON_NONE);
+ uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, "color_space", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
col = uiLayoutColumn(layout, 0);
- uiItemL(col, "Key Channel:", ICON_NONE);
+ uiItemL(col, IFACE_("Key Channel:"), ICON_NONE);
row = uiLayoutRow(col, 0);
uiItemR(row, ptr, "matte_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1840,7 +1848,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
if (RNA_enum_get(ptr, "limit_method") == 0) {
- uiItemL(col, "Limiting Channel:", ICON_NONE);
+ uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
row = uiLayoutRow(col, 0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
@@ -1917,9 +1925,9 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C)
int multilayer = (RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER);
if (multilayer)
- uiItemL(layout, "Path:", 0);
+ uiItemL(layout, IFACE_("Path:"), 0);
else
- uiItemL(layout, "Base Path:", 0);
+ uiItemL(layout, IFACE_("Base Path:"), 0);
uiItemR(layout, ptr, "base_path", 0, "", ICON_NONE);
}
static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
@@ -1935,7 +1943,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
uiItemS(layout);
- uiItemO(layout, "Add Input", ICON_ZOOMIN, "NODE_OT_output_file_add_socket");
+ uiItemO(layout, IFACE_("Add Input"), ICON_ZOOMIN, "NODE_OT_output_file_add_socket");
active_index = RNA_int_get(ptr, "active_input_index");
/* using different collection properties if multilayer format is enabled */
@@ -1961,7 +1969,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
uiLayout *row, *col;
col = uiLayoutColumn(layout, 1);
- uiItemL(col, "Layer:", 0);
+ uiItemL(col, IFACE_("Layer:"), 0);
row = uiLayoutRow(col, 0);
uiItemR(row, &active_input_ptr, "name", 0, "", 0);
uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "", ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY);
@@ -1970,7 +1978,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
uiLayout *row, *col;
col = uiLayoutColumn(layout, 1);
- uiItemL(col, "File Path:", 0);
+ uiItemL(col, IFACE_("File Path:"), 0);
row = uiLayoutRow(col, 0);
uiItemR(row, &active_input_ptr, "path", 0, "", 0);
uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "", ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY);
@@ -1979,7 +1987,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
imfptr = RNA_pointer_get(&active_input_ptr, "format");
col = uiLayoutColumn(layout, 1);
- uiItemL(col, "Format:", 0);
+ uiItemL(col, IFACE_("Format:"), 0);
uiItemR(col, &active_input_ptr, "use_node_format", 0, NULL, 0);
col = uiLayoutColumn(layout, 0);
@@ -2146,14 +2154,14 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
row = uiLayoutRow(layout, 0);
uiItemL(row, "", 0);
- uiItemL(row, "Saturation", 0);
- uiItemL(row, "Contrast", 0);
- uiItemL(row, "Gamma", 0);
- uiItemL(row, "Gain", 0);
- uiItemL(row, "Lift", 0);
+ uiItemL(row, IFACE_("Saturation"), 0);
+ uiItemL(row, IFACE_("Contrast"), 0);
+ uiItemL(row, IFACE_("Gamma"), 0);
+ uiItemL(row, IFACE_("Gain"), 0);
+ uiItemL(row, IFACE_("Lift"), 0);
row = uiLayoutRow(layout, 0);
- uiItemL(row, "Master", 0);
+ uiItemL(row, IFACE_("Master"), 0);
uiItemR(row, ptr, "master_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "master_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "master_gamma", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -2161,7 +2169,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "master_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
row = uiLayoutRow(layout, 0);
- uiItemL(row, "Highlights", 0);
+ uiItemL(row, IFACE_("Highlights"), 0);
uiItemR(row, ptr, "highlights_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "highlights_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "highlights_gamma", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -2169,7 +2177,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "highlights_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
row = uiLayoutRow(layout, 0);
- uiItemL(row, "Midtones", 0);
+ uiItemL(row, IFACE_("Midtones"), 0);
uiItemR(row, ptr, "midtones_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "midtones_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "midtones_gamma", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -2177,7 +2185,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, "", ICON_NONE);
row = uiLayoutRow(layout, 0);
- uiItemL(row, "Shadows", 0);
+ uiItemL(row, IFACE_("Shadows"), 0);
uiItemR(row, ptr, "shadows_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "shadows_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE);
uiItemR(row, ptr, "shadows_gamma", UI_ITEM_R_SLIDER, "", ICON_NONE);
@@ -2198,31 +2206,31 @@ static void node_composit_buts_colorcorrection_but(uiLayout *layout, bContext *U
uiItemR(row, ptr, "green", 0, NULL, ICON_NONE);
uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE);
row = layout;
- uiItemL(row, "Saturation", 0);
+ uiItemL(row, IFACE_("Saturation"), 0);
uiItemR(row, ptr, "master_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "highlights_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "shadows_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- uiItemL(row, "Contrast", 0);
+ uiItemL(row, IFACE_("Contrast"), 0);
uiItemR(row, ptr, "master_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "highlights_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "shadows_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- uiItemL(row, "Gamma", 0);
+ uiItemL(row, IFACE_("Gamma"), 0);
uiItemR(row, ptr, "master_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "highlights_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "shadows_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- uiItemL(row, "Gain", 0);
+ uiItemL(row, IFACE_("Gain"), 0);
uiItemR(row, ptr, "master_gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "highlights_gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "shadows_gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- uiItemL(row, "Lift", 0);
+ uiItemL(row, IFACE_("Lift"), 0);
uiItemR(row, ptr, "master_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "highlights_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2637,12 +2645,12 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), Poin
uiLayout *col;
col = uiLayoutColumn(layout, 1);
- uiItemR(col, ptr, "offset", 0, "Offset", ICON_NONE);
- uiItemR(col, ptr, "offset_frequency", 0, "Frequency", ICON_NONE);
+ uiItemR(col, ptr, "offset", 0, IFACE_("Offset"), ICON_NONE);
+ uiItemR(col, ptr, "offset_frequency", 0, IFACE_("Frequency"), ICON_NONE);
col = uiLayoutColumn(layout, 1);
- uiItemR(col, ptr, "squash", 0, "Squash", ICON_NONE);
- uiItemR(col, ptr, "squash_frequency", 0, "Frequency", ICON_NONE);
+ uiItemR(col, ptr, "squash", 0, IFACE_("Squash"), ICON_NONE);
+ uiItemR(col, ptr, "squash_frequency", 0, IFACE_("Frequency"), ICON_NONE);
}
static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
@@ -2703,7 +2711,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
uiItemR(row, &tex_ptr, "cloud_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
row = uiLayoutRow(col, 0);
uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
- uiItemR(col, &tex_ptr, "noise_depth", UI_ITEM_R_EXPAND, "Depth", ICON_NONE);
+ uiItemR(col, &tex_ptr, "noise_depth", UI_ITEM_R_EXPAND, IFACE_("Depth"), ICON_NONE);
break;
case TEX_DISTNOISE:
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index b623e21d9cd..921aceb7b2e 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -83,7 +83,7 @@
/* width of socket columns in group display */
#define NODE_GROUP_FRAME 120
// XXX interface.h
-extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
+extern void ui_dropshadow(rctf *rct, float radius, float aspect, float alpha, int select);
/* XXX update functions for node editor are a mess, needs a clear concept */
void ED_node_tree_update(SpaceNode *snode, Scene *scene)
@@ -669,13 +669,13 @@ static void node_toggle_button_cb(struct bContext *C, void *node_argv, void *op_
WM_operator_name_call(C, opname, WM_OP_INVOKE_DEFAULT, NULL);
}
-void node_draw_shadow(SpaceNode *snode, bNode *node, float radius)
+void node_draw_shadow(SpaceNode *snode, bNode *node, float radius, float alpha)
{
rctf *rct = &node->totr;
uiSetRoundBox(UI_CNR_ALL);
if (node->parent==NULL)
- ui_dropshadow(rct, radius, snode->aspect, node->flag & SELECT);
+ ui_dropshadow(rct, radius, snode->aspect, alpha, node->flag & SELECT);
else {
const float margin = 3.0f;
@@ -712,7 +712,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* shadow */
- node_draw_shadow(snode, node, BASIS_RAD);
+ node_draw_shadow(snode, node, BASIS_RAD, 1.0f);
/* header */
if (color_id==TH_NODE)
@@ -872,7 +872,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
char showname[128]; /* 128 is used below */
/* shadow */
- node_draw_shadow(snode, node, hiddenrad);
+ node_draw_shadow(snode, node, hiddenrad, 1.0f);
/* body */
UI_ThemeColor(color_id);
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 87f2ac74672..35b1583b24e 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -72,7 +72,7 @@ void node_menus_register(void);
int node_get_colorid(struct bNode *node);
void node_socket_circle_draw(struct bNodeTree *ntree, struct bNodeSocket *sock, float size, int highlight);
int node_get_resize_cursor(int directions);
-void node_draw_shadow(struct SpaceNode *snode, struct bNode *node, float radius);
+void node_draw_shadow(struct SpaceNode *snode, struct bNode *node, float radius, float alpha);
void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node);
void node_update_default(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
int node_select_area_default(struct bNode *node, int x, int y);
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index ee3827428bc..97e64c4acdf 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -483,7 +483,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
uiBlockSetCurLayout(block, column);
if (sock->link) {
- uiItemL(column, "Link", ICON_NONE);
+ uiItemL(column, IFACE_("Link"), ICON_NONE);
but= block->buttons.last;
but->flag= UI_TEXT_LEFT;