Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_2d.c
| Show First 20 Lines • Show All 663 Lines • ▼ Show 20 Lines | |||||
| * textures that stick to the surface where only part of the pixels are new */ | * textures that stick to the surface where only part of the pixels are new */ | ||||
| static void brush_painter_imbuf_partial_update(BrushPainter *painter, | static void brush_painter_imbuf_partial_update(BrushPainter *painter, | ||||
| ImagePaintTile *tile, | ImagePaintTile *tile, | ||||
| const float pos[2], | const float pos[2], | ||||
| const int diameter) | const int diameter) | ||||
| { | { | ||||
| BrushPainterCache *cache = &tile->cache; | BrushPainterCache *cache = &tile->cache; | ||||
| ImBuf *oldtexibuf, *ibuf; | ImBuf *oldtexibuf, *ibuf; | ||||
| int imbflag, destx, desty, srcx, srcy, w, h, x1, y1, x2, y2; | int destx, desty, srcx, srcy, w, h, x1, y1, x2, y2; | ||||
| /* create brush image buffer if it didn't exist yet */ | /* create brush image buffer if it didn't exist yet */ | ||||
| imbflag = (cache->use_float) ? IB_rectfloat : IB_rect; | eImBufFlags imbflag = (cache->use_float) ? IB_rectfloat : IB_rect; | ||||
| if (!cache->ibuf) { | if (!cache->ibuf) { | ||||
| cache->ibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag); | cache->ibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag); | ||||
| } | } | ||||
| ibuf = cache->ibuf; | ibuf = cache->ibuf; | ||||
| /* create new texture image buffer with coordinates relative to old */ | /* create new texture image buffer with coordinates relative to old */ | ||||
| oldtexibuf = cache->texibuf; | oldtexibuf = cache->texibuf; | ||||
| cache->texibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag); | cache->texibuf = IMB_allocImBuf(diameter, diameter, 32, imbflag); | ||||
| ▲ Show 20 Lines • Show All 1,544 Lines • Show Last 20 Lines | |||||