Blender  V3.3
Macros | Typedefs | Functions
ED_paint.h File Reference
#include "DNA_view3d_enums.h"

Go to the source code of this file.

Macros

#define ED_IMAGE_UNDO_TILE_BITS   6
 
#define ED_IMAGE_UNDO_TILE_SIZE   (1 << ED_IMAGE_UNDO_TILE_BITS)
 
#define ED_IMAGE_UNDO_TILE_NUMBER(size)    (((size) + ED_IMAGE_UNDO_TILE_SIZE - 1) >> ED_IMAGE_UNDO_TILE_BITS)
 

Typedefs

typedef struct PaintTileMap PaintTileMap
 

Functions

void ED_operatortypes_paint (void)
 
void ED_operatormacros_paint (void)
 
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, struct ImageUser *iuser, int x, int y, int w, int h, bool find_old)
 
void ED_imapaint_bucket_fill (struct bContext *C, float color[3], struct wmOperator *op, const int mouse[2])
 
void ED_paint_data_warning (struct ReportList *reports, bool uvs, bool mat, bool tex, bool stencil)
 
bool ED_paint_proj_mesh_data_check (struct Scene *scene, struct Object *ob, bool *uvs, bool *mat, bool *tex, bool *stencil)
 
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, struct ImageUser *iuser)
 
void ED_image_undo_push_end (void)
 
void ED_image_undo_restore (struct UndoStep *us)
 
void ED_image_undosys_type (struct UndoType *ut)
 
voidED_image_paint_tile_find (PaintTileMap *paint_tile_map, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate)
 
voidED_image_paint_tile_push (PaintTileMap *paint_tile_map, struct Image *image, struct ImBuf *ibuf, struct ImBuf **tmpibuf, struct ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool **r_valid, bool use_thread_lock, bool find_prev)
 
void ED_image_paint_tile_lock_init (void)
 
void ED_image_paint_tile_lock_end (void)
 
struct PaintTileMapED_image_paint_tile_map_get (void)
 
void ED_paintcurve_undo_push_begin (const char *name)
 
void ED_paintcurve_undo_push_end (struct bContext *C)
 
void ED_paintcurve_undosys_type (struct UndoType *ut)
 
eV3DShadingColorType ED_paint_shading_color_override (struct bContext *C, const struct PaintModeSettings *settings, struct Object *ob, eV3DShadingColorType orig_color_type)
 
bool ED_paint_tool_use_canvas (struct bContext *C, struct bToolRef *tref)
 
void ED_paint_tool_update_sticky_shading_color (struct bContext *C, struct Object *ob)
 

Macro Definition Documentation

◆ ED_IMAGE_UNDO_TILE_BITS

#define ED_IMAGE_UNDO_TILE_BITS   6

Definition at line 104 of file ED_paint.h.

◆ ED_IMAGE_UNDO_TILE_NUMBER

#define ED_IMAGE_UNDO_TILE_NUMBER (   size)     (((size) + ED_IMAGE_UNDO_TILE_SIZE - 1) >> ED_IMAGE_UNDO_TILE_BITS)

Definition at line 106 of file ED_paint.h.

◆ ED_IMAGE_UNDO_TILE_SIZE

#define ED_IMAGE_UNDO_TILE_SIZE   (1 << ED_IMAGE_UNDO_TILE_BITS)

Definition at line 105 of file ED_paint.h.

Typedef Documentation

◆ PaintTileMap

typedef struct PaintTileMap PaintTileMap

Definition at line 1 of file ED_paint.h.

Function Documentation

◆ ED_image_paint_tile_find()

void* ED_image_paint_tile_find ( PaintTileMap paint_tile_map,
struct Image image,
struct ImBuf ibuf,
struct ImageUser iuser,
int  x_tile,
int  y_tile,
unsigned short **  r_mask,
bool  validate 
)

◆ ED_image_paint_tile_lock_end()

void ED_image_paint_tile_lock_end ( void  )

Definition at line 69 of file image_undo.cc.

References BLI_spin_end(), and paint_tiles_lock.

Referenced by project_paint_end().

◆ ED_image_paint_tile_lock_init()

void ED_image_paint_tile_lock_init ( void  )

Definition at line 64 of file image_undo.cc.

References BLI_spin_init(), and paint_tiles_lock.

Referenced by proj_paint_state_thread_init().

◆ ED_image_paint_tile_map_get()

struct PaintTileMap* ED_image_paint_tile_map_get ( void  )

◆ ED_image_paint_tile_push()

void* ED_image_paint_tile_push ( PaintTileMap paint_tile_map,
struct Image image,
struct ImBuf ibuf,
struct ImBuf **  tmpibuf,
struct ImageUser iuser,
int  x_tile,
int  y_tile,
unsigned short **  r_mask,
bool **  r_valid,
bool  use_thread_lock,
bool  find_prev 
)

◆ ED_image_undo_push_begin()

void ED_image_undo_push_begin ( const char *  name,
int  paint_mode 
)

The caller is responsible for running ED_image_undo_push_end, failure to do so causes an invalid state for the undo system.

Definition at line 1095 of file image_undo.cc.

References image_undo_push_begin().

Referenced by ED_imapaint_bucket_fill(), sculpt_stroke_test_start(), texture_paint_camera_project_exec(), and blender::ed::sculpt_paint::image::ops::paint::texture_paint_init().

◆ ED_image_undo_push_begin_with_image()

void ED_image_undo_push_begin_with_image ( const char *  name,
struct Image image,
struct ImBuf ibuf,
struct ImageUser iuser 
)

◆ ED_image_undo_push_end()

void ED_image_undo_push_end ( void  )

◆ ED_image_undo_restore()

void ED_image_undo_restore ( struct UndoStep us)

Restore painting image to previous state. Used for anchored and drag-dot style brushes.

Definition at line 1077 of file image_undo.cc.

References ptile_invalidate_map(), and ptile_restore_runtime_map().

Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step().

◆ ED_image_undosys_type()

void ED_image_undosys_type ( struct UndoType ut)

◆ ED_imapaint_bucket_fill()

void ED_imapaint_bucket_fill ( struct bContext C,
float  color[3],
struct wmOperator op,
const int  mouse[2] 
)

◆ ED_imapaint_clear_partial_redraw()

void ED_imapaint_clear_partial_redraw ( void  )

◆ ED_imapaint_dirty_region()

void ED_imapaint_dirty_region ( struct Image ima,
struct ImBuf ibuf,
struct ImageUser iuser,
int  x,
int  y,
int  w,
int  h,
bool  find_old 
)

◆ ED_keymap_paint()

void ED_keymap_paint ( struct wmKeyConfig keyconf)

◆ ED_operatormacros_paint()

void ED_operatormacros_paint ( void  )

◆ ED_operatortypes_paint()

void ED_operatortypes_paint ( void  )

Definition at line 1399 of file paint_ops.c.

References BRUSH_OT_add(), BRUSH_OT_add_gpencil(), BRUSH_OT_curve_preset(), BRUSH_OT_reset(), BRUSH_OT_scale_size(), BRUSH_OT_stencil_control(), BRUSH_OT_stencil_fit_image_aspect(), BRUSH_OT_stencil_reset_transform(), PAINT_OT_add_simple_uvs(), PAINT_OT_add_texture_paint_slot(), PAINT_OT_brush_colors_flip(), PAINT_OT_brush_select(), PAINT_OT_face_select_all(), PAINT_OT_face_select_hide(), PAINT_OT_face_select_linked(), PAINT_OT_face_select_linked_pick(), PAINT_OT_face_vert_reveal(), PAINT_OT_grab_clone(), PAINT_OT_hide_show(), PAINT_OT_image_from_view(), PAINT_OT_image_paint(), PAINT_OT_mask_box_gesture(), PAINT_OT_mask_flood_fill(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), PAINT_OT_project_image(), PAINT_OT_sample_color(), PAINT_OT_texture_paint_toggle(), PAINT_OT_vert_select_all(), PAINT_OT_vert_select_hide(), PAINT_OT_vert_select_ungrouped(), PAINT_OT_vertex_color_brightness_contrast(), PAINT_OT_vertex_color_from_weight(), PAINT_OT_vertex_color_hsv(), PAINT_OT_vertex_color_invert(), PAINT_OT_vertex_color_levels(), PAINT_OT_vertex_color_set(), PAINT_OT_vertex_color_smooth(), PAINT_OT_vertex_paint(), PAINT_OT_vertex_paint_toggle(), PAINT_OT_weight_from_bones(), PAINT_OT_weight_gradient(), PAINT_OT_weight_paint(), PAINT_OT_weight_paint_toggle(), PAINT_OT_weight_sample(), PAINT_OT_weight_sample_group(), PAINT_OT_weight_set(), PAINTCURVE_OT_add_point(), PAINTCURVE_OT_cursor(), PAINTCURVE_OT_delete_point(), PAINTCURVE_OT_draw(), PAINTCURVE_OT_new(), PAINTCURVE_OT_select(), PAINTCURVE_OT_slide(), PALETTE_OT_color_add(), PALETTE_OT_color_delete(), PALETTE_OT_color_move(), PALETTE_OT_extract_from_image(), PALETTE_OT_join(), PALETTE_OT_new(), PALETTE_OT_sort(), SCULPT_OT_uv_sculpt_stroke(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ ED_paint_data_warning()

void ED_paint_data_warning ( struct ReportList reports,
bool  uvs,
bool  mat,
bool  tex,
bool  stencil 
)

◆ ED_paint_proj_mesh_data_check()

bool ED_paint_proj_mesh_data_check ( struct Scene scene,
struct Object ob,
bool uvs,
bool mat,
bool tex,
bool stencil 
)

◆ ED_paint_shading_color_override()

eV3DShadingColorType ED_paint_shading_color_override ( struct bContext C,
const struct PaintModeSettings settings,
struct Object ob,
eV3DShadingColorType  orig_color_type 
)

Color type of an object can be overridden in sculpt/paint mode.

Referenced by workbench_color_type_get().

◆ ED_paint_tool_update_sticky_shading_color()

void ED_paint_tool_update_sticky_shading_color ( struct bContext C,
struct Object ob 
)

◆ ED_paint_tool_use_canvas()

bool ED_paint_tool_use_canvas ( struct bContext C,
struct bToolRef tref 
)

Does the given tool use a paint canvas.

When #tref isn't given the active tool from the context is used.

Definition at line 83 of file editors/sculpt_paint/paint_canvas.cc.

References C, bToolRef::idname, paint_tool_uses_canvas(), and WM_toolsystem_ref_from_context().

Referenced by ED_paint_shading_color_override().

◆ ED_paintcurve_undo_push_begin()

void ED_paintcurve_undo_push_begin ( const char *  name)

◆ ED_paintcurve_undo_push_end()

void ED_paintcurve_undo_push_end ( struct bContext C)

◆ ED_paintcurve_undosys_type()

void ED_paintcurve_undosys_type ( struct UndoType ut)