|
Blender
V2.93
|
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) |
| 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) |
| void * | ED_image_paint_tile_find (struct ListBase *paint_tiles, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate) |
| void * | ED_image_paint_tile_push (struct ListBase *paint_tiles, 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 ListBase * | ED_image_paint_tile_list_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) |
| #define ED_IMAGE_UNDO_TILE_BITS 6 |
Definition at line 97 of file ED_paint.h.
| #define ED_IMAGE_UNDO_TILE_NUMBER | ( | size | ) | (((size) + ED_IMAGE_UNDO_TILE_SIZE - 1) >> ED_IMAGE_UNDO_TILE_BITS) |
Definition at line 99 of file ED_paint.h.
| #define ED_IMAGE_UNDO_TILE_SIZE (1 << ED_IMAGE_UNDO_TILE_BITS) |
Definition at line 98 of file ED_paint.h.
| void* ED_image_paint_tile_find | ( | struct ListBase * | paint_tiles, |
| struct Image * | image, | ||
| struct ImBuf * | ibuf, | ||
| struct ImageUser * | iuser, | ||
| int | x_tile, | ||
| int | y_tile, | ||
| unsigned short ** | r_mask, | ||
| bool | validate | ||
| ) |
Definition at line 151 of file image_undo.c.
References ED_IMAGE_UNDO_TILE_SIZE, LISTBASE_FOREACH, MEM_callocN, NULL, square_i(), and ImageUser::tile.
Referenced by ED_image_paint_tile_push(), and paint_2d_do_making_brush().
| struct ListBase* ED_image_paint_tile_list_get | ( | void | ) |
Definition at line 1027 of file image_undo.c.
References BKE_undosys_stack_init_or_active_with_type(), BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, ED_undo_stack_get(), ImageUndoStep::paint_mode, PAINT_MODE_TEXTURE_2D, ImageUndoStep::paint_tiles, and UndoStack::step_init.
Referenced by ED_imapaint_dirty_region(), paint_2d_do_making_brush(), and project_paint_undo_subtiles().
| void ED_image_paint_tile_lock_end | ( | void | ) |
Definition at line 81 of file image_undo.c.
References BLI_spin_end(), and paint_tiles_lock.
Referenced by project_paint_end().
| void ED_image_paint_tile_lock_init | ( | void | ) |
Definition at line 76 of file image_undo.c.
References BLI_spin_init(), and paint_tiles_lock.
Referenced by proj_paint_state_thread_init().
| void* ED_image_paint_tile_push | ( | struct ListBase * | paint_tiles, |
| 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 | ||
| ) |
Definition at line 181 of file image_undo.c.
References BLI_addtail(), BLI_spin_lock(), BLI_spin_unlock(), data, ED_image_paint_tile_find(), ED_IMAGE_UNDO_TILE_SIZE, PaintTile::fp, PaintTile::ibuf, PaintTile::image, IMB_rectcpy(), imbuf_alloc_temp_tile(), PaintTile::iuser, PaintTile::mask, MEM_callocN, NULL, paint_tiles_lock, PaintTile::pt, PaintTile::rect, ImBuf::rect_float, ImageUser::scene, square_i(), SWAP, PaintTile::uint, PaintTile::use_float, PaintTile::valid, PaintTile::x_tile, and PaintTile::y_tile.
Referenced by ED_imapaint_dirty_region(), and project_paint_undo_subtiles().
| 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 1066 of file image_undo.c.
References image_undo_push_begin().
Referenced by ED_imapaint_bucket_fill(), texture_paint_camera_project_exec(), and texture_paint_init().
| void ED_image_undo_push_begin_with_image | ( | const char * | name, |
| struct Image * | image, | ||
| struct ImBuf * | ibuf, | ||
| struct ImageUser * | iuser | ||
| ) |
Definition at line 1071 of file image_undo.c.
References BKE_image_get_tile, BKE_UNDOSYS_TYPE_IMAGE, BLI_assert, ED_undo_stack_get(), ImageUndoStep::handles, image_undo_push_begin(), NULL, PAINT_MODE_TEXTURE_2D, UndoImageBuf::post, UndoStep::prev, ImageUndoStep::step, UndoStack::step_active, ImageUser::tile, UndoImageBuf::tiles, UndoImageBuf::tiles_len, UndoStep::type, ubuf_from_image_all_tiles(), ubuf_lookup_from_reference(), uhandle_ensure(), uhandle_ensure_ubuf(), and UndoImageTile::users.
Referenced by image_flip_exec(), image_invert_exec(), and image_scale_exec().
| void ED_image_undo_push_end | ( | void | ) |
Definition at line 1103 of file image_undo.c.
References BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), ED_undo_stack_get(), NULL, and WM_file_tag_modified().
Referenced by ED_imapaint_bucket_fill(), image_flip_exec(), image_invert_exec(), image_scale_exec(), paint_stroke_done(), and texture_paint_camera_project_exec().
| void ED_image_undo_restore | ( | struct UndoStep * | us | ) |
Definition at line 1044 of file image_undo.c.
References ptile_invalidate_list(), and ptile_restore_runtime_list().
Referenced by paint_stroke_update_step().
| void ED_image_undosys_type | ( | struct UndoType * | ut | ) |
Definition at line 993 of file image_undo.c.
References UndoType::flags, image_undosys_foreach_ID_ref(), image_undosys_poll(), image_undosys_step_decode(), image_undosys_step_encode(), image_undosys_step_encode_init(), image_undosys_step_free(), UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_foreach_ID_ref, UndoType::step_free, and UndoType::step_size.
Referenced by ED_undosys_type_init().
| void ED_imapaint_bucket_fill | ( | struct bContext * | C, |
| float | color[3], | ||
| struct wmOperator * | op, | ||
| const int | mouse[2] | ||
| ) |
Definition at line 1328 of file paint_image.c.
References C, CTX_wm_space_image(), DEG_id_tag_update(), ED_image_undo_push_begin(), ED_image_undo_push_end(), Image::id, SpaceImage::image, wmOperatorType::name, NULL, paint_2d_bucket_fill(), PAINT_MODE_TEXTURE_2D, and wmOperator::type.
Referenced by drop_color_invoke().
| void ED_imapaint_clear_partial_redraw | ( | void | ) |
Definition at line 104 of file paint_image.c.
References imapaintpartial.
Referenced by image_flip_exec(), image_invert_exec(), image_scale_exec(), paint_2d_bucket_fill(), paint_2d_gradient_fill(), and paint_2d_redraw().
| 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 | ||
| ) |
Definition at line 122 of file paint_image.c.
References BKE_image_mark_dirty(), ED_image_paint_tile_list_get(), ED_image_paint_tile_push(), ImagePaintPartialRedraw::enabled, imapaint_region_tiles(), imapaintpartial, IMB_freeImBuf(), IMB_rectclip(), max_ii(), min_ii(), NULL, w(), x, ImagePaintPartialRedraw::x1, ImagePaintPartialRedraw::x2, y, ImagePaintPartialRedraw::y1, and ImagePaintPartialRedraw::y2.
Referenced by paint_2d_bucket_fill(), paint_2d_gradient_fill(), and paint_2d_op().
| void ED_keymap_paint | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 1362 of file paint_ops.c.
References facemask_paint_poll(), image_texture_paint_poll(), paint_curve_poll(), paint_stroke_modal_keymap(), wmKeyMap::poll, sculpt_expand_modal_keymap(), SCULPT_mode_poll(), vert_paint_poll(), vertex_paint_mode_poll(), weight_paint_mode_poll(), WM_keymap_ensure(), and WM_modalkeymap_assign().
Referenced by ED_spacetypes_keymap().
| void ED_operatormacros_paint | ( | void | ) |
Definition at line 1256 of file paint_ops.c.
References wmOperatorType::description, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
| void ED_operatortypes_paint | ( | void | ) |
Definition at line 1272 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_select_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_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().
| void ED_paint_data_warning | ( | struct ReportList * | reports, |
| bool | uvs, | ||
| bool | mat, | ||
| bool | tex, | ||
| bool | stencil | ||
| ) |
Definition at line 6323 of file paint_image_proj.c.
References BKE_reportf(), RPT_WARNING, and tex.
Referenced by texture_paint_camera_project_exec(), and texture_paint_init().
| bool ED_paint_proj_mesh_data_check | ( | struct Scene * | scene, |
| struct Object * | ob, | ||
| bool * | uvs, | ||
| bool * | mat, | ||
| bool * | tex, | ||
| bool * | stencil | ||
| ) |
Definition at line 6336 of file paint_image_proj.c.
References BKE_mesh_from_object(), BKE_object_material_get(), BKE_paint_brush(), BKE_texpaint_slot_refresh_cache(), BLI_assert, ImagePaintSettings::canvas, CD_MLOOPUV, CustomData_number_of_layers(), ImagePaintSettings::flag, ID_IS_LINKED, TexPaintSlot::ima, IMAGEPAINT_MISSING_MATERIAL, IMAGEPAINT_MISSING_STENCIL, IMAGEPAINT_MISSING_TEX, IMAGEPAINT_MISSING_UVS, IMAGEPAINT_MODE_IMAGE, IMAGEPAINT_MODE_MATERIAL, IMAGEPAINT_PROJECT_LAYER_STENCIL, Brush::imagepaint_tool, ToolSettings::imapaint, Mesh::ldata, ImagePaintSettings::missing_data, ImagePaintSettings::mode, NULL, OB_MESH, ImagePaintSettings::paint, Material::paint_active_slot, PAINT_TOOL_MASK, scene, ImagePaintSettings::stencil, tex, Material::texpaintslot, Scene::toolsettings, Object::totcol, and Object::type.
Referenced by add_simple_uvs_exec(), ED_editors_init_for_undo(), ED_object_texture_paint_mode_enter_ex(), material_slot_add_exec(), material_slot_remove_exec(), material_slot_remove_unused_exec(), mesh_uv_texture_add_exec(), mesh_uv_texture_remove_exec(), proj_paint_add_slot(), scene_changed(), texture_paint_camera_project_exec(), and texture_paint_init().
| void ED_paintcurve_undo_push_begin | ( | const char * | name | ) |
Definition at line 173 of file paint_curve_undo.c.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_PAINTCURVE, C, ED_undo_stack_get(), and NULL.
Referenced by paintcurve_delete_point_exec(), paintcurve_point_add(), paintcurve_point_select(), and paintcurve_slide_modal().
| void ED_paintcurve_undo_push_end | ( | struct bContext * | C | ) |
Definition at line 180 of file paint_curve_undo.c.
References BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), C, ED_undo_stack_get(), NULL, and WM_file_tag_modified().
Referenced by paintcurve_delete_point_exec(), paintcurve_point_add(), paintcurve_point_select(), and paintcurve_slide_modal().
| void ED_paintcurve_undosys_type | ( | struct UndoType * | ut | ) |
Definition at line 151 of file paint_curve_undo.c.
References UndoType::flags, UndoType::name, paintcurve_undosys_foreach_ID_ref(), paintcurve_undosys_poll(), paintcurve_undosys_step_decode(), paintcurve_undosys_step_encode(), paintcurve_undosys_step_encode_init(), paintcurve_undosys_step_free(), UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_foreach_ID_ref, UndoType::step_free, and UndoType::step_size.
Referenced by ED_undosys_type_init().