Blender V4.3
ED_paint.hh 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)
 

Functions

void ED_operatortypes_paint ()
 
void ED_operatormacros_paint ()
 
void ED_keymap_paint (wmKeyConfig *keyconf)
 
void ED_imapaint_clear_partial_redraw ()
 
void ED_imapaint_dirty_region (Image *ima, ImBuf *ibuf, ImageUser *iuser, int x, int y, int w, int h, bool find_old)
 
void ED_imapaint_bucket_fill (bContext *C, const float color[3], wmOperator *op, const int mouse[2])
 
void ED_paint_data_warning (ReportList *reports, bool has_uvs, bool has_mat, bool has_tex, bool has_stencil)
 
bool ED_paint_proj_mesh_data_check (Scene &scene, Object &ob, bool *r_has_uvs, bool *r_has_mat, bool *r_has_tex, bool *r_has_stencil)
 
void ED_image_undo_push_begin (const char *name, PaintMode paint_mode)
 
void ED_image_undo_push_begin_with_image (const char *name, Image *image, ImBuf *ibuf, ImageUser *iuser)
 
void ED_image_undo_push_end ()
 
void ED_image_undo_restore (UndoStep *us)
 
void ED_image_undosys_type (UndoType *ut)
 
void * 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)
 
void * ED_image_paint_tile_push (PaintTileMap *paint_tile_map, Image *image, ImBuf *ibuf, ImBuf **tmpibuf, 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 ED_image_paint_tile_lock_end ()
 
PaintTileMapED_image_paint_tile_map_get ()
 
void ED_paintcurve_undo_push_begin (const char *name)
 
void ED_paintcurve_undo_push_end (bContext *C)
 
void ED_paintcurve_undosys_type (UndoType *ut)
 
eV3DShadingColorType ED_paint_shading_color_override (bContext *C, const PaintModeSettings *settings, Object &ob, eV3DShadingColorType orig_color_type)
 
bool ED_image_paint_brush_type_use_canvas (bContext *C, bToolRef *tref)
 
void ED_image_paint_brush_type_update_sticky_shading_color (bContext *C, Object *ob)
 
void ED_object_vpaintmode_enter_ex (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
 
void ED_object_vpaintmode_enter (bContext *C, Depsgraph &depsgraph)
 
void ED_object_wpaintmode_enter_ex (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
 
void ED_object_wpaintmode_enter (bContext *C, Depsgraph &depsgraph)
 
void ED_object_vpaintmode_exit_ex (Object &ob)
 
void ED_object_vpaintmode_exit (bContext *C)
 
void ED_object_wpaintmode_exit_ex (Object &ob)
 
void ED_object_wpaintmode_exit (bContext *C)
 
void ED_object_texture_paint_mode_enter_ex (Main &bmain, Scene &scene, Depsgraph &depsgraph, Object &ob)
 
void ED_object_texture_paint_mode_enter (bContext *C)
 
void ED_object_texture_paint_mode_exit_ex (Main &bmain, Scene &scene, Object &ob)
 
void ED_object_texture_paint_mode_exit (bContext *C)
 

Macro Definition Documentation

◆ ED_IMAGE_UNDO_TILE_BITS

◆ ED_IMAGE_UNDO_TILE_NUMBER

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

◆ ED_IMAGE_UNDO_TILE_SIZE

Function Documentation

◆ ED_image_paint_brush_type_update_sticky_shading_color()

◆ ED_image_paint_brush_type_use_canvas()

bool ED_image_paint_brush_type_use_canvas ( bContext * C,
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 98 of file editors/sculpt_paint/paint_canvas.cc.

References bToolRef::idname, image_paint_brush_uses_canvas(), image_paint_tool_uses_canvas(), and WM_toolsystem_ref_from_context().

Referenced by ED_paint_shading_color_override().

◆ ED_image_paint_tile_find()

◆ ED_image_paint_tile_lock_end()

void ED_image_paint_tile_lock_end ( )

Definition at line 70 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 ( )

Definition at line 65 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()

◆ ED_image_paint_tile_push()

◆ ED_image_undo_push_begin()

void ED_image_undo_push_begin ( const char * name,
PaintMode 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 1119 of file image_undo.cc.

References image_undo_push_begin().

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

◆ ED_image_undo_push_begin_with_image()

◆ ED_image_undo_push_end()

◆ ED_image_undo_restore()

void ED_image_undo_restore ( UndoStep * us)

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

Definition at line 1101 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()

◆ ED_imapaint_bucket_fill()

◆ ED_imapaint_clear_partial_redraw()

◆ ED_imapaint_dirty_region()

◆ ED_keymap_paint()

◆ ED_object_texture_paint_mode_enter()

void ED_object_texture_paint_mode_enter ( bContext * C)

◆ ED_object_texture_paint_mode_enter_ex()

◆ ED_object_texture_paint_mode_exit()

void ED_object_texture_paint_mode_exit ( bContext * C)

◆ ED_object_texture_paint_mode_exit_ex()

◆ ED_object_vpaintmode_enter()

void ED_object_vpaintmode_enter ( bContext * C,
Depsgraph & depsgraph )

◆ ED_object_vpaintmode_enter_ex()

void ED_object_vpaintmode_enter_ex ( Main & bmain,
Depsgraph & depsgraph,
Scene & scene,
Object & ob )

◆ ED_object_vpaintmode_exit()

void ED_object_vpaintmode_exit ( bContext * C)

Definition at line 783 of file paint_vertex.cc.

References CTX_data_active_object(), and ED_object_vpaintmode_exit_ex().

◆ ED_object_vpaintmode_exit_ex()

◆ ED_object_wpaintmode_enter()

void ED_object_wpaintmode_enter ( bContext * C,
Depsgraph & depsgraph )

◆ ED_object_wpaintmode_enter_ex()

void ED_object_wpaintmode_enter_ex ( Main & bmain,
Depsgraph & depsgraph,
Scene & scene,
Object & ob )

◆ ED_object_wpaintmode_exit()

void ED_object_wpaintmode_exit ( bContext * C)

Definition at line 1574 of file paint_weight.cc.

References CTX_data_active_object(), and ED_object_wpaintmode_exit_ex().

◆ ED_object_wpaintmode_exit_ex()

◆ ED_operatormacros_paint()

◆ ED_operatortypes_paint()

void ED_operatortypes_paint ( )

Definition at line 969 of file paint_ops.cc.

References BRUSH_OT_curve_preset(), BRUSH_OT_scale_size(), BRUSH_OT_sculpt_curves_falloff_preset(), 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_face_select_all(), PAINT_OT_face_select_hide(), PAINT_OT_face_select_less(), PAINT_OT_face_select_linked(), PAINT_OT_face_select_linked_pick(), PAINT_OT_face_select_loop(), PAINT_OT_face_select_more(), PAINT_OT_face_vert_reveal(), PAINT_OT_grab_clone(), PAINT_OT_image_from_view(), PAINT_OT_image_paint(), 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_less(), PAINT_OT_vert_select_linked(), PAINT_OT_vert_select_linked_pick(), PAINT_OT_vert_select_more(), 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_grab(), SCULPT_OT_uv_sculpt_pinch(), SCULPT_OT_uv_sculpt_relax(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ ED_paint_data_warning()

void ED_paint_data_warning ( ReportList * reports,
bool has_uvs,
bool has_mat,
bool has_tex,
bool has_stencil )

◆ ED_paint_proj_mesh_data_check()

◆ ED_paint_shading_color_override()

◆ ED_paintcurve_undo_push_begin()

◆ ED_paintcurve_undo_push_end()

◆ ED_paintcurve_undosys_type()