Page Menu
Home
Search
Configure Global Search
Log In
Files
F19949
fix29615.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Sergey Sharybin (sergey)
Nov 13 2013, 4:21 PM
Size
2 KB
Subscribers
None
fix29615.patch
View Options
Index: source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- source/blender/editors/sculpt_paint/paint_image.c (revision 42629)
+++ source/blender/editors/sculpt_paint/paint_image.c (working copy)
@@ -383,7 +383,7 @@
void *rect;
int x, y;
- short source;
+ short source, use_float;
char gen_type;
} UndoImageTile;
@@ -413,11 +413,13 @@
ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_IMAGE);
UndoImageTile *tile;
int allocsize;
+ short use_float = ibuf->rect_float ? 1 : 0;
for(tile=lb->first; tile; tile=tile->next)
if(tile->x == x_tile && tile->y == y_tile && ima->gen_type == tile->gen_type && ima->source == tile->source)
- if(strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0)
- return tile->rect;
+ if(tile->use_float == use_float)
+ if(strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0)
+ return tile->rect;
if (*tmpibuf==NULL)
*tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect);
@@ -435,6 +437,7 @@
tile->gen_type= ima->gen_type;
tile->source= ima->source;
+ tile->use_float= use_float;
undo_copy_tile(tile, *tmpibuf, ibuf, 0);
undo_paint_push_count_alloc(UNDO_PAINT_IMAGE, allocsize);
@@ -455,6 +458,8 @@
IB_rectfloat|IB_rect);
for(tile=lb->first; tile; tile=tile->next) {
+ short use_float;
+
/* find image based on name, pointer becomes invalid with global undo */
if(ima && strcmp(tile->idname, ima->id.name)==0) {
/* ima is valid */
@@ -464,6 +469,7 @@
}
ibuf= BKE_image_get_ibuf(ima, NULL);
+ use_float = ibuf->rect_float ? 1 : 0;
if(ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
/* current ImBuf filename was changed, probably current frame
@@ -480,6 +486,9 @@
if (ima->gen_type != tile->gen_type || ima->source != tile->source)
continue;
+ if (use_float != tile->use_float)
+ continue;
+
undo_copy_tile(tile, tmpibuf, ibuf, 1);
GPU_free_image(ima); /* force OpenGL reload */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
da/75/9a107e09e46b099d4bec61e17bd0
Event Timeline
Log In to Comment