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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-22 00:13:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-22 00:13:12 +0400
commit10af15b85b743a18215a1fc58799264b5c798403 (patch)
tree5c93a43229f31a9befdd2582d3fe382390add2cf /source/blender/editors/sculpt_paint
parent3c9d69744e0aca3ffe3ace103233679988769e91 (diff)
parentaba149189b7f0ee08765d2ef63a94080d02bdbf4 (diff)
Cycles: svn merge -r40934:41157 ^/trunk/blender
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c8
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 9e12aa64065..b7c861c703d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -403,7 +403,7 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int
*tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect);
tile= MEM_callocN(sizeof(UndoImageTile), "UndoImageTile");
- strcpy(tile->idname, ima->id.name);
+ BLI_strncpy(tile->idname, ima->id.name, sizeof(tile->idname));
tile->x= x_tile;
tile->y= y_tile;
@@ -411,7 +411,7 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int
allocsize *= (ibuf->rect_float)? sizeof(float): sizeof(char);
tile->rect= MEM_mapallocN(allocsize, "UndeImageTile.rect");
- strcpy(tile->ibufname, ibuf->name);
+ BLI_strncpy(tile->ibufname, ibuf->name, sizeof(tile->ibufname));
tile->gen_type= ima->gen_type;
tile->source= ima->source;
@@ -3429,7 +3429,7 @@ static void project_paint_end(ProjPaintState *ps)
}
/* This is a BIT ODD, but overwrite the undo tiles image info with this pixels original color
- * because allocating the tiles allong the way slows down painting */
+ * because allocating the tiles along the way slows down painting */
if (is_float) {
float *rgba_fp = (float *)tilerect + (((projPixel->x_px - x_round) + (projPixel->y_px - y_round) * IMAPAINT_TILE_SIZE)) * 4;
@@ -4008,7 +4008,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), float *lastpos, f
copy_v2_v2(handles[a].mval, pos);
copy_v2_v2(handles[a].prevmval, lastpos);
- /* thread spesific */
+ /* thread specific */
handles[a].thread_index = a;
handles[a].projImages = (ProjPaintImage *)BLI_memarena_alloc(ps->arena_mt[a], ps->image_tot * sizeof(ProjPaintImage));
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index cf90c43f3e1..87411b97061 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1619,7 +1619,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
}
}
- /* important to normalize after mirror, otherwise mirror gets wight
+ /* important to normalize after mirror, otherwise mirror gets weight
* which has already been scaled down in relation to other weights,
* then scales a second time [#26193]. Tricky multi-paint code doesn't
* suffer from this problem - campbell */
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 13b6fef3004..7656e51d241 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -39,6 +39,8 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_string.h"
+#include "BLI_listbase.h"
#include "BLI_ghash.h"
#include "BLI_threads.h"
@@ -262,7 +264,7 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node)
}
unode= MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode");
- strcpy(unode->idname, ob->id.name);
+ BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname));
unode->node= node;
BLI_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert);