Blender V5.0
ED_paint.hh File Reference
#include "DNA_view3d_enums.h"
#include <cstdint>

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)

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_begin_with_image_all_udims (const char *name, Image *image, ImageUser *iuser)
void ED_image_undo_push (Image *image, ImBuf *ibuf, ImageUser *iuser, ImageUndoStep *us)
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)
Value:
#define ED_IMAGE_UNDO_TILE_SIZE
Definition ED_paint.hh:114
#define ED_IMAGE_UNDO_TILE_BITS
Definition ED_paint.hh:113
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52

Definition at line 115 of file ED_paint.hh.

Referenced by project_paint_build_proj_ima(), project_paint_face_init(), project_paint_uvpixel_init(), and ubuf_from_image_no_tiles().

◆ 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 99 of file editors/sculpt_paint/paint_canvas.cc.

References C, 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 74 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 69 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()

◆ 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 1121 of file image_undo.cc.

References image_undo_push_begin(), and name.

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()

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

◆ ED_image_undo_push_begin_with_image_all_udims()

void ED_image_undo_push_begin_with_image_all_udims ( const char * name,
Image * image,
ImageUser * iuser )

◆ 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 1103 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()

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

◆ ED_imapaint_clear_partial_redraw()

◆ ED_imapaint_dirty_region()

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

◆ 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 839 of file paint_vertex.cc.

References C, 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 1567 of file paint_weight.cc.

References C, CTX_data_active_object(), and ED_object_wpaintmode_exit_ex().

◆ ED_object_wpaintmode_exit_ex()

◆ ED_operatormacros_paint()

void ED_operatormacros_paint ( )

◆ ED_operatortypes_paint()

void ED_operatortypes_paint ( )

Definition at line 969 of file paint_ops.cc.

References blender::ed::sculpt_paint::BRUSH_OT_asset_activate(), blender::ed::sculpt_paint::BRUSH_OT_asset_delete(), blender::ed::sculpt_paint::BRUSH_OT_asset_edit_metadata(), blender::ed::sculpt_paint::BRUSH_OT_asset_load_preview(), blender::ed::sculpt_paint::BRUSH_OT_asset_revert(), blender::ed::sculpt_paint::BRUSH_OT_asset_save(), blender::ed::sculpt_paint::BRUSH_OT_asset_save_as(), 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_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(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_all(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_lasso_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_line_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_masked(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_polyline_gesture(), PAINT_OT_image_from_view(), PAINT_OT_image_paint(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_box_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_lasso_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_line_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_polyline_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_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(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_filter(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_invert(), 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()

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 )

◆ ED_paint_shading_color_override()

◆ ED_paintcurve_undo_push_begin()

◆ ED_paintcurve_undo_push_end()

◆ ED_paintcurve_undosys_type()