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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-04 16:40:21 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-03-10 15:47:33 +0300
commitca717f0489af6854f3f4bedb3c1e82ea0a8dff1c (patch)
tree9d25588ea433fd5242277a3a704283b0130d8799 /source/blender/editors/include/ED_paint.h
parent212660f467451b0092fcebcb44591c92c09acbc9 (diff)
Fix T74425: Cannot texture paint an images sequence anymore
Caused by the introduction of UDIM (rBc30d6571bb47). We need to make sure the tiles ImageUser is set up correctly [especially the framenr], otherwise BKE_image_acquire_ibuf() and friends will fail to find the correct ImBuf. Also instead of initializing a minimal BKE_imageuser_default, now use an appropriate ImageUser if avaliable and pass this around (instead of just the tile_number). 2D painting can reuse the Image Editor ImageUser, for 3D painting we still rely on a default ImageUser in most places, but at least set the framenr correctly]. This also fixes crashes when doing image operations such as inverting or resizing on images in a sequence in the Image Editor. This also fixes color sampling (S) from the 3DView going wrong for image sequences (would fallback to OpenGL sampling because an ImBuf could not be found). Maniphest Tasks: T74425 Differential Revision: https://developer.blender.org/D7022
Diffstat (limited to 'source/blender/editors/include/ED_paint.h')
-rw-r--r--source/blender/editors/include/ED_paint.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h
index 065eb082e4d..4159f22703f 100644
--- a/source/blender/editors/include/ED_paint.h
+++ b/source/blender/editors/include/ED_paint.h
@@ -27,6 +27,7 @@ extern "C" {
struct ImBuf;
struct Image;
+struct ImageUser;
struct UndoStep;
struct UndoType;
struct bContext;
@@ -42,7 +43,7 @@ void ED_keymap_paint(struct wmKeyConfig *keyconf);
void ED_imapaint_clear_partial_redraw(void);
void ED_imapaint_dirty_region(struct Image *ima,
struct ImBuf *ibuf,
- int tile_number,
+ struct ImageUser *iuser,
int x,
int y,
int w,
@@ -58,7 +59,7 @@ void ED_image_undo_push_begin(const char *name, int paint_mode);
void ED_image_undo_push_begin_with_image(const char *name,
struct Image *image,
struct ImBuf *ibuf,
- int tile_number);
+ struct ImageUser *iuser);
void ED_image_undo_push_end(void);
void ED_image_undo_restore(struct UndoStep *us);
@@ -68,7 +69,7 @@ void ED_image_undosys_type(struct UndoType *ut);
void *ED_image_paint_tile_find(struct ListBase *undo_tiles,
struct Image *ima,
struct ImBuf *ibuf,
- int tile_number,
+ struct ImageUser *iuser,
int x_tile,
int y_tile,
unsigned short **r_mask,
@@ -77,7 +78,7 @@ void *ED_image_paint_tile_push(struct ListBase *undo_tiles,
struct Image *ima,
struct ImBuf *ibuf,
struct ImBuf **tmpibuf,
- int tile_number,
+ struct ImageUser *iuser,
int x_tile,
int y_tile,
unsigned short **r_mask,