[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49868] branches/soc-2011-tomato: svn merge ^/trunk/blender -r49854:49867
Campbell Barton
ideasman42 at gmail.com
Mon Aug 13 11:35:12 CEST 2012
Revision: 49868
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49868
Author: campbellbarton
Date: 2012-08-13 09:35:11 +0000 (Mon, 13 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r49854:49867
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49854
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_mask_common.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/source/blender/blenfont/BLF_api.h
branches/soc-2011-tomato/source/blender/blenfont/intern/blf.c
branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c
branches/soc-2011-tomato/source/blender/blenfont/intern/blf_internal_types.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/cloth.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/image_gen.c
branches/soc-2011-tomato/source/blender/editors/interface/view2d_ops.c
branches/soc-2011-tomato/source/blender/editors/object/object_hook.c
branches/soc-2011-tomato/source/blender/editors/object/object_intern.h
branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_view.c
branches/soc-2011-tomato/source/blender/imbuf/IMB_imbuf.h
branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
branches/soc-2011-tomato/source/blender/imbuf/intern/bmp.c
branches/soc-2011-tomato/source/blender/imbuf/intern/divers.c
branches/soc-2011-tomato/source/blender/imbuf/intern/indexer.c
branches/soc-2011-tomato/source/blender/imbuf/intern/iris.c
branches/soc-2011-tomato/source/blender/imbuf/intern/jp2.c
branches/soc-2011-tomato/source/blender/imbuf/intern/jpeg.c
branches/soc-2011-tomato/source/blender/imbuf/intern/metadata.c
branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
branches/soc-2011-tomato/source/blender/imbuf/intern/png.c
branches/soc-2011-tomato/source/blender/imbuf/intern/readimage.c
branches/soc-2011-tomato/source/blender/imbuf/intern/rectop.c
branches/soc-2011-tomato/source/blender/imbuf/intern/rotate.c
branches/soc-2011-tomato/source/blender/imbuf/intern/scaling.c
branches/soc-2011-tomato/source/blender/imbuf/intern/targa.c
branches/soc-2011-tomato/source/blender/imbuf/intern/thumbs.c
branches/soc-2011-tomato/source/blender/imbuf/intern/tiff.c
branches/soc-2011-tomato/source/blender/imbuf/intern/util.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_node_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_view2d_types.h
branches/soc-2011-tomato/source/blender/windowmanager/WM_api.h
branches/soc-2011-tomato/source/blender/windowmanager/WM_types.h
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49854
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49867
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_mask_common.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_mask_common.py 2012-08-13 09:13:19 UTC (rev 49867)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_mask_common.py 2012-08-13 09:35:11 UTC (rev 49868)
@@ -237,7 +237,14 @@
col.operator("mask.parent_set")
col.operator("mask.parent_clear")
+ col = layout.column(align=True)
+ col.label(text="Animation:")
+ col.operator("mask.shape_key_clear")
+ col.operator("mask.shape_key_insert")
+ col.operator("mask.shape_key_feather_reset")
+ col.operator("mask.shape_key_rekey")
+
class MASK_MT_mask(Menu):
bl_label = "Mask"
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-08-13 09:13:19 UTC (rev 49867)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-08-13 09:35:11 UTC (rev 49868)
@@ -1183,6 +1183,7 @@
layout.operator_context = 'EXEC_AREA'
layout.operator("object.hook_add_newob")
layout.operator("object.hook_add_selob")
+ layout.operator("object.hook_add_selob", text="Hook to Selected Object Bone").use_bone = True
if [mod.type == 'HOOK' for mod in context.active_object.modifiers]:
layout.separator()
Modified: branches/soc-2011-tomato/source/blender/blenfont/BLF_api.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/BLF_api.h 2012-08-13 09:13:19 UTC (rev 49867)
+++ branches/soc-2011-tomato/source/blender/blenfont/BLF_api.h 2012-08-13 09:35:11 UTC (rev 49868)
@@ -145,13 +145,13 @@
/* Set the buffer, size and number of channels to draw, one thing to take care is call
* this function with NULL pointer when we finish, for example:
*
- * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4);
+ * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, TRUE);
*
* ... set color, position and draw ...
*
- * BLF_buffer(NULL, NULL, 0, 0, 0);
+ * BLF_buffer(NULL, NULL, 0, 0, 0, FALSE);
*/
-void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch);
+void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, int do_color_management);
/* Set the color to be used for text. */
void BLF_buffer_col(int fontid, float r, float g, float b, float a);
Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf.c 2012-08-13 09:13:19 UTC (rev 49867)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf.c 2012-08-13 09:35:11 UTC (rev 49868)
@@ -746,16 +746,17 @@
}
}
-void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch)
+void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, int do_color_management)
{
FontBLF *font = BLF_get(fontid);
if (font) {
- font->b_fbuf = fbuf;
- font->b_cbuf = cbuf;
- font->bw = w;
- font->bh = h;
- font->bch = nch;
+ font->buf_info.fbuf = fbuf;
+ font->buf_info.cbuf = cbuf;
+ font->buf_info.w = w;
+ font->buf_info.h = h;
+ font->buf_info.ch = nch;
+ font->buf_info.do_color_management = do_color_management;
}
}
@@ -764,10 +765,10 @@
FontBLF *font = BLF_get(fontid);
if (font) {
- font->b_col[0] = r;
- font->b_col[1] = g;
- font->b_col[2] = b;
- font->b_col[3] = a;
+ font->buf_info.col[0] = r;
+ font->buf_info.col[1] = g;
+ font->buf_info.col[2] = b;
+ font->buf_info.col[3] = a;
}
}
@@ -775,7 +776,7 @@
{
FontBLF *font = BLF_get(fontid);
- if (font && font->glyph_cache && (font->b_fbuf || font->b_cbuf)) {
+ if (font && font->glyph_cache && (font->buf_info.fbuf || font->buf_info.cbuf)) {
blf_font_buffer(font, str);
}
}
Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c 2012-08-13 09:13:19 UTC (rev 49867)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c 2012-08-13 09:35:11 UTC (rev 49868)
@@ -225,11 +225,14 @@
size_t i = 0;
GlyphBLF **glyph_ascii_table = font->glyph_cache->glyph_ascii_table;
- /* buffer specific vars*/
- const unsigned char b_col_char[4] = {font->b_col[0] * 255,
- font->b_col[1] * 255,
- font->b_col[2] * 255,
- font->b_col[3] * 255};
+ /* buffer specific vars */
+ FontBufInfoBLF *buf_info = &font->buf_info;
+ float b_col_float[4];
+ const unsigned char b_col_char[4] = {buf_info->col[0] * 255,
+ buf_info->col[1] * 255,
+ buf_info->col[2] * 255,
+ buf_info->col[3] * 255};
+
unsigned char *cbuf;
int chx, chy;
int y, x;
@@ -239,6 +242,14 @@
blf_font_ensure_ascii_table(font);
+ /* another buffer spesific call for color conversion */
+ if (buf_info->do_color_management) {
+ srgb_to_linearrgb_v4(b_col_float, buf_info->col);
+ }
+ else {
+ copy_v4_v4(b_col_float, buf_info->col);
+ }
+
while (str[i]) {
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
@@ -259,16 +270,16 @@
pen_y = (int)font->pos[1] - (g->height - (int)g->pos_y);
}
- if ((chx + g->width) >= 0 && chx < font->bw && (pen_y + g->height) >= 0 && pen_y < font->bh) {
+ if ((chx + g->width) >= 0 && chx < buf_info->w && (pen_y + g->height) >= 0 && pen_y < buf_info->h) {
/* don't draw beyond the buffer bounds */
int width_clip = g->width;
int height_clip = g->height;
int yb_start = g->pitch < 0 ? 0 : g->height - 1;
- if (width_clip + chx > font->bw)
- width_clip -= chx + width_clip - font->bw;
- if (height_clip + pen_y > font->bh)
- height_clip -= pen_y + height_clip - font->bh;
+ if (width_clip + chx > buf_info->w)
+ width_clip -= chx + width_clip - buf_info->w;
+ if (height_clip + pen_y > buf_info->h)
+ height_clip -= pen_y + height_clip - buf_info->h;
/* drawing below the image? */
if (pen_y < 0) {
@@ -277,7 +288,7 @@
pen_y = 0;
}
- if (font->b_fbuf) {
+ if (buf_info->fbuf) {
int yb = yb_start;
for (y = ((chy >= 0) ? 0 : -chy); y < height_clip; y++) {
for (x = ((chx >= 0) ? 0 : -chx); x < width_clip; x++) {
@@ -285,18 +296,18 @@
if (a > 0.0f) {
float alphatest;
- fbuf = font->b_fbuf + font->bch * ((chx + x) + ((pen_y + y) * font->bw));
+ fbuf = buf_info->fbuf + buf_info->ch * ((chx + x) + ((pen_y + y) * buf_info->w));
if (a >= 1.0f) {
- fbuf[0] = font->b_col[0];
- fbuf[1] = font->b_col[1];
- fbuf[2] = font->b_col[2];
- fbuf[3] = (alphatest = (fbuf[3] + (font->b_col[3]))) < 1.0f ? alphatest : 1.0f;
+ fbuf[0] = b_col_float[0];
+ fbuf[1] = b_col_float[1];
+ fbuf[2] = b_col_float[2];
+ fbuf[3] = (alphatest = (fbuf[3] + (b_col_float[3]))) < 1.0f ? alphatest : 1.0f;
}
else {
- fbuf[0] = (font->b_col[0] * a) + (fbuf[0] * (1 - a));
- fbuf[1] = (font->b_col[1] * a) + (fbuf[1] * (1 - a));
- fbuf[2] = (font->b_col[2] * a) + (fbuf[2] * (1 - a));
- fbuf[3] = (alphatest = (fbuf[3] + (font->b_col[3] * a))) < 1.0f ? alphatest : 1.0f;
+ fbuf[0] = (b_col_float[0] * a) + (fbuf[0] * (1.0f - a));
+ fbuf[1] = (b_col_float[1] * a) + (fbuf[1] * (1.0f - a));
+ fbuf[2] = (b_col_float[2] * a) + (fbuf[2] * (1.0f - a));
+ fbuf[3] = (alphatest = (fbuf[3] + (b_col_float[3] * a))) < 1.0f ? alphatest : 1.0f;
}
}
}
@@ -308,7 +319,7 @@
}
}
- if (font->b_cbuf) {
+ if (buf_info->cbuf) {
int yb = yb_start;
for (y = 0; y < height_clip; y++) {
for (x = 0; x < width_clip; x++) {
@@ -316,7 +327,7 @@
if (a > 0.0f) {
int alphatest;
- cbuf = font->b_cbuf + font->bch * ((chx + x) + ((pen_y + y) * font->bw));
+ cbuf = buf_info->cbuf + buf_info->ch * ((chx + x) + ((pen_y + y) * buf_info->w));
if (a >= 1.0f) {
cbuf[0] = b_col_char[0];
cbuf[1] = b_col_char[1];
@@ -324,10 +335,10 @@
cbuf[3] = (alphatest = ((int)cbuf[3] + (int)b_col_char[3])) < 255 ? alphatest : 255;
}
else {
- cbuf[0] = (b_col_char[0] * a) + (cbuf[0] * (1 - a));
- cbuf[1] = (b_col_char[1] * a) + (cbuf[1] * (1 - a));
- cbuf[2] = (b_col_char[2] * a) + (cbuf[2] * (1 - a));
- cbuf[3] = (alphatest = ((int)cbuf[3] + (int)((font->b_col[3] * a) * 255.0f))) <
+ cbuf[0] = (b_col_char[0] * a) + (cbuf[0] * (1.0f - a));
+ cbuf[1] = (b_col_char[1] * a) + (cbuf[1] * (1.0f - a));
+ cbuf[2] = (b_col_char[2] * a) + (cbuf[2] * (1.0f - a));
+ cbuf[3] = (alphatest = ((int)cbuf[3] + (int)((b_col_float[3] * a) * 255.0f))) <
255 ? alphatest : 255;
}
}
@@ -507,15 +518,17 @@
font->glyph_cache = NULL;
font->blur = 0;
font->max_tex_size = -1;
- font->b_fbuf = NULL;
- font->b_cbuf = NULL;
- font->bw = 0;
- font->bh = 0;
- font->bch = 0;
- font->b_col[0] = 0;
- font->b_col[1] = 0;
- font->b_col[2] = 0;
- font->b_col[3] = 0;
+
+ font->buf_info.fbuf = NULL;
+ font->buf_info.cbuf = NULL;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list