|
Created on demand while painting, use to access the previous state for some paint operations.
These buffers are also used for undo when available.
|
| static void | blender::calc_tile_rect (const ImBuf &ibuf, const int x_tile, const int y_tile, int2 &r_tile_pos, int2 &r_tile_size) |
| static rcti | blender::calc_tile_region (const ImBuf &ibuf, const int x_tile, const int y_tile) |
| static void | blender::ptile_free (PaintTile *ptile) |
| static void | blender::ptile_invalidate_map (PaintTileMap *paint_tile_map) |
| const ImBuf * | blender::ED_image_paint_tile_find (PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate) |
| const ImBuf * | blender::ED_image_paint_tile_push (PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool **r_valid) |
| static void | blender::ptile_restore_runtime_map (PaintTileMap *paint_tile_map) |
| static uint32_t | blender::index_from_xy (uint32_t tile_x, uint32_t tile_y, const uint32_t tiles_dims[2]) |
| static UndoImageTile * | blender::utile_alloc (bool has_float) |
| static void | blender::utile_init_from_imbuf (UndoImageTile *utile, const int x_tile, const int y_tile, const ImBuf *ibuf) |
| static void | blender::utile_restore (const UndoImageTile *utile, const int x_tile, const int y_tile, ImBuf *ibuf) |
| static void | blender::utile_decref (UndoImageTile *utile) |
| static UndoImageBuf * | blender::ubuf_from_image_no_tiles (Image *image, const ImBuf *ibuf) |
| static void | blender::ubuf_from_image_all_tiles (UndoImageBuf *ubuf, const ImBuf *ibuf) |
| static bool | blender::ubuf_ensure_compat_ibuf (const UndoImageBuf *ubuf, ImBuf *ibuf) |
| static void | blender::ubuf_free (UndoImageBuf *ubuf) |
| static UndoImageBuf * | blender::uhandle_lookup_ubuf (UndoImageHandle *uh, const Image *, const StringRef ibuf_filepath, const int ibuf_fileframe) |
| static UndoImageBuf * | blender::uhandle_add_ubuf (UndoImageHandle *uh, Image *image, ImBuf *ibuf) |
| static UndoImageBuf * | blender::uhandle_ensure_ubuf (UndoImageHandle *uh, Image *image, ImBuf *ibuf) |
| static UndoImageHandle * | blender::uhandle_lookup_by_name (ListBaseT< UndoImageHandle > *undo_handles, const Image *image, int tile_number) |
| static UndoImageHandle * | blender::uhandle_lookup (ListBaseT< UndoImageHandle > *undo_handles, const Image *image, int tile_number) |
| static UndoImageHandle * | blender::uhandle_add (ListBaseT< UndoImageHandle > *undo_handles, Image *image, ImageUser *iuser) |
| static UndoImageHandle * | blender::uhandle_ensure (ListBaseT< UndoImageHandle > *undo_handles, Image *image, ImageUser *iuser) |
| static UndoImageBuf * | blender::ubuf_lookup_from_reference (ImageUndoStep *us_prev, const Image *image, int tile_number, const UndoImageBuf *ubuf) |
| static void | blender::image_undosys_step_encode_init (bContext *, UndoStep *us_p) |
| static bool | blender::image_undosys_step_encode (bContext *C, Main *, UndoStep *us_p) |
| static void | blender::image_undosys_step_decode_undo_impl (ImageUndoStep *us) |
| static void | blender::image_undosys_step_decode_redo_impl (ImageUndoStep *us) |
| static void | blender::image_undosys_step_decode_undo (ImageUndoStep *us, bool is_final) |
| static void | blender::image_undosys_step_decode_redo (ImageUndoStep *us) |
| static void | blender::image_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) |
| static void | blender::image_undosys_step_free (UndoStep *us_p) |
| static void | blender::image_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | blender::ED_image_undosys_type (UndoType *ut) |
| PaintTileMap * | blender::ED_image_paint_tile_map_get () |
| void | blender::ED_image_undo_restore (UndoStep *us) |
| static ImageUndoStep * | blender::image_undo_push_begin (const char *name, PaintMode paint_mode) |
| void | blender::ED_image_undo_push_begin (const char *name, PaintMode paint_mode) |
| void | blender::ED_image_undo_push_begin_with_image (const char *name, Image *image, ImBuf *ibuf, ImageUser *iuser) |
| void | blender::ED_image_undo_push_begin_with_image_all_udims (const char *name, Image *image, ImageUser *iuser) |
| void | blender::ED_image_undo_push (Image *image, ImBuf *ibuf, ImageUser *iuser, ImageUndoStep *us) |
| void | blender::ED_image_undo_push_end () |
Overview
- Each undo step is a #ImageUndoStep
- Each #ImageUndoStep stores a list of #UndoImageHandle
- Each #UndoImageHandle stores a list of #UndoImageBuf (this is the undo systems equivalent of an #ImBuf).
- Each #UndoImageBuf stores an array of #UndoImageTile The tiles are shared between #UndoImageBuf's to avoid duplication.
When the undo system manages an image, there will always be a full copy (as a #UndoImageBuf) each new undo step only stores modified tiles.
Changeset IDs are used to track the correspondence between image buffers used in the main database and in the undo stack. An ImBuf may be allocated, freed, reloaded or resized as part of global memfile undo steps. A matching changeset ID means that it's the same image buffer and individual tiles can be restored, rather than having to do a full image buffer restore.
Definition in file image_undo.cc.