Blender
V3.3
|
#include "BKE_paint.h"
#include "BLI_compiler_compat.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "DNA_scene_types.h"
Go to the source code of this file.
Classes | |
struct | CoNo |
struct | WPaintVGroupIndex |
struct | ImagePaintPartialRedraw |
struct | CurveMaskCache |
Caching structure for curve mask. More... | |
struct | BlurKernel |
Macros | |
#define | PAINT_CURVE_NUM_SEGMENTS 40 |
Typedefs | |
typedef struct CoNo | CoNo |
typedef bool(* | StrokeGetLocation) (struct bContext *C, float location[3], const float mouse[2], bool force_original) |
typedef bool(* | StrokeTestStart) (struct bContext *C, struct wmOperator *op, const float mouse[2]) |
typedef void(* | StrokeUpdateStep) (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke, struct PointerRNA *itemptr) |
typedef void(* | StrokeRedraw) (const struct bContext *C, struct PaintStroke *stroke, bool final) |
typedef void(* | StrokeDone) (const struct bContext *C, struct PaintStroke *stroke) |
typedef void(* | VPaintTransform_Callback) (const float col[3], const void *user_data, float r_col[3]) |
typedef struct ImagePaintPartialRedraw | ImagePaintPartialRedraw |
typedef struct CurveMaskCache | CurveMaskCache |
Caching structure for curve mask. More... | |
typedef enum BrushStrokeMode | BrushStrokeMode |
Enumerations | |
enum | { WPAINT_GRADIENT_TYPE_LINEAR , WPAINT_GRADIENT_TYPE_RADIAL } |
enum | eWPaintFlag { WPAINT_ENSURE_MIRROR = (1 << 0) } |
enum | BrushStrokeMode { BRUSH_STROKE_NORMAL , BRUSH_STROKE_INVERT , BRUSH_STROKE_SMOOTH } |
enum | PartialVisAction { PARTIALVIS_HIDE , PARTIALVIS_SHOW } |
enum | PartialVisArea { PARTIALVIS_INSIDE , PARTIALVIS_OUTSIDE , PARTIALVIS_ALL , PARTIALVIS_MASKED } |
enum | PaintMaskFloodMode { PAINT_MASK_FLOOD_VALUE , PAINT_MASK_FLOOD_VALUE_INVERSE , PAINT_MASK_INVERT } |
#define PAINT_CURVE_NUM_SEGMENTS 40 |
Definition at line 510 of file paint_intern.h.
typedef enum BrushStrokeMode BrushStrokeMode |
typedef struct CurveMaskCache CurveMaskCache |
Caching structure for curve mask.
When 2d painting images the curve mask is used as an input.
typedef struct ImagePaintPartialRedraw ImagePaintPartialRedraw |
typedef void(* StrokeDone) (const struct bContext *C, struct PaintStroke *stroke) |
Definition at line 59 of file paint_intern.h.
typedef bool(* StrokeGetLocation) (struct bContext *C, float location[3], const float mouse[2], bool force_original) |
Definition at line 49 of file paint_intern.h.
Definition at line 58 of file paint_intern.h.
typedef bool(* StrokeTestStart) (struct bContext *C, struct wmOperator *op, const float mouse[2]) |
Definition at line 53 of file paint_intern.h.
typedef void(* StrokeUpdateStep) (struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke, struct PointerRNA *itemptr) |
Definition at line 54 of file paint_intern.h.
typedef void(* VPaintTransform_Callback) (const float col[3], const void *user_data, float r_col[3]) |
Definition at line 121 of file paint_intern.h.
anonymous enum |
Enumerator | |
---|---|
WPAINT_GRADIENT_TYPE_LINEAR | |
WPAINT_GRADIENT_TYPE_RADIAL |
Definition at line 129 of file paint_intern.h.
enum BrushStrokeMode |
Enumerator | |
---|---|
BRUSH_STROKE_NORMAL | |
BRUSH_STROKE_INVERT | |
BRUSH_STROKE_SMOOTH |
Definition at line 448 of file paint_intern.h.
enum eWPaintFlag |
Enumerator | |
---|---|
WPAINT_ENSURE_MIRROR |
Definition at line 157 of file paint_intern.h.
enum PaintMaskFloodMode |
Enumerator | |
---|---|
PAINT_MASK_FLOOD_VALUE | |
PAINT_MASK_FLOOD_VALUE_INVERSE | |
PAINT_MASK_INVERT |
Definition at line 472 of file paint_intern.h.
enum PartialVisAction |
Enumerator | |
---|---|
PARTIALVIS_HIDE | |
PARTIALVIS_SHOW |
Definition at line 456 of file paint_intern.h.
enum PartialVisArea |
Enumerator | |
---|---|
PARTIALVIS_INSIDE | |
PARTIALVIS_OUTSIDE | |
PARTIALVIS_ALL | |
PARTIALVIS_MASKED |
Definition at line 461 of file paint_intern.h.
void BRUSH_OT_curve_preset | ( | struct wmOperatorType * | ot | ) |
Definition at line 580 of file paint_utils.c.
References BLT_I18NCONTEXT_ID_CURVE_LEGACY, brush_curve_preset_exec(), brush_curve_preset_poll(), CURVE_PRESET_LINE, CURVE_PRESET_MAX, CURVE_PRESET_ROOT, CURVE_PRESET_ROUND, CURVE_PRESET_SHARP, CURVE_PRESET_SMOOTH, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, NULL, ot, wmOperatorType::poll, RNA_def_enum(), RNA_def_property_translation_context(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
struct VertProjHandle* ED_vpaint_proj_handle_create | ( | struct Depsgraph * | depsgraph, |
struct Scene * | scene, | ||
struct Object * | ob, | ||
struct CoNo ** | r_vcosnos | ||
) |
Definition at line 163 of file paint_vertex_proj.c.
References Object::data, depsgraph, VertProjHandle::dists_sq, MEM_mallocN, NULL, VertProjHandle::ob, scene, VertProjHandle::scene, Mesh::totvert, VertProjHandle::use_update, VertProjHandle::vcosnos, and vpaint_proj_dm_map_cosnos_init().
Referenced by vpaint_init_vpaint().
void ED_vpaint_proj_handle_free | ( | struct VertProjHandle * | vp_handle | ) |
Definition at line 205 of file paint_vertex_proj.c.
References VertProjHandle::dists_sq, MEM_freeN, VertProjHandle::use_update, and VertProjHandle::vcosnos.
Referenced by vpaint_free_vpaintdata().
void ED_vpaint_proj_handle_update | ( | struct Depsgraph * | depsgraph, |
struct VertProjHandle * | vp_handle, | ||
struct ARegion * | region, | ||
const float | mval_fl[2] | ||
) |
Definition at line 195 of file paint_vertex_proj.c.
References depsgraph, VertProjHandle::use_update, and vpaint_proj_dm_map_cosnos_update().
weight | Typically the current weight: MDeformWeight.weight |
Definition at line 265 of file paint_vertex_weight_utils.c.
References IMB_BLEND_ADD, IMB_BLEND_COLORDODGE, IMB_BLEND_DARKEN, IMB_BLEND_DIFFERENCE, IMB_BLEND_EXCLUSION, IMB_BLEND_HARDLIGHT, IMB_BLEND_LIGHTEN, IMB_BLEND_MIX, IMB_BLEND_MUL, IMB_BLEND_OVERLAY, IMB_BLEND_SCREEN, IMB_BLEND_SOFTLIGHT, IMB_BLEND_SUB, wval_add(), wval_blend(), wval_colordodge(), wval_darken(), wval_difference(), wval_exclusion(), wval_hardlight(), wval_lighten(), wval_mul(), wval_overlay(), wval_screen(), wval_softlight(), and wval_sub().
Referenced by gradientVert_update(), and wpaint_blend().
bool ED_wpaint_ensure_data | ( | struct bContext * | C, |
struct ReportList * | reports, | ||
enum eWPaintFlag | flag, | ||
struct WPaintVGroupIndex * | vgroup_index | ||
) |
Ensure we have data on wpaint start, add if needed.
Definition at line 40 of file paint_vertex_weight_utils.c.
References WPaintVGroupIndex::active, BKE_mesh_from_object(), BKE_modifiers_is_deformed_by_armature(), BKE_object_defgroup_add(), BKE_object_defgroup_add_name(), BKE_object_defgroup_data_create(), BKE_object_defgroup_find_name(), BKE_object_defgroup_list(), BKE_object_is_in_editmode(), BKE_pose_channel_find_name(), BKE_report(), BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), C, CTX_data_active_object(), CTX_data_main(), Object::data, DEG_relations_tag_update(), Mesh::dvert, ED_wpaint_mirror_vgroup_ensure(), Mesh::id, ME_USING_MIRROR_X_VERTEX_GROUPS, WPaintVGroupIndex::mirror, bPoseChannel::name, Bone::name, NC_GEOM, ND_DATA, NULL, Object::pose, RPT_WARNING, Mesh::totpoly, Mesh::vertex_group_active_index, WM_event_add_notifier(), and WPAINT_ENSURE_MIRROR.
Referenced by paint_weight_gradient_exec(), paint_weight_gradient_invoke(), weight_paint_set_exec(), and wpaint_stroke_test_start().
int ED_wpaint_mirror_vgroup_ensure | ( | struct Object * | ob, |
int | vgroup_active | ||
) |
Return -1 when invalid.
Definition at line 122 of file paint_vertex_weight_utils.c.
References BKE_object_defgroup_list(), BKE_object_defgroup_name_index(), BKE_object_defgroup_new(), BLI_findlink(), BLI_listbase_count(), BLI_string_flip_side_name(), MAXBONENAME, and bDeformGroup::name.
Referenced by ED_wpaint_ensure_data(), and weight_paint_set().
Definition at line 998 of file paint_image.cc.
References BKE_paint_select_face_test(), C, and CTX_data_active_object().
Referenced by ED_keymap_paint(), PAINT_OT_face_select_all(), PAINT_OT_face_select_hide(), PAINT_OT_face_select_linked(), and PAINT_OT_face_select_linked_pick().
BLI_INLINE void flip_qt | ( | float | quat[4], |
const ePaintSymmetryFlags | symm | ||
) |
Definition at line 442 of file paint_intern.h.
References flip_qt_qt().
Referenced by SCULPT_flip_quat_by_symm_area().
BLI_INLINE void flip_qt_qt | ( | float | out[4], |
const float | in[4], | ||
const ePaintSymmetryFlags | symm | ||
) |
Definition at line 414 of file paint_intern.h.
References angle(), axis_angle_normalized_to_quat(), normalize_v3(), usdtokens::out(), PAINT_SYMM_X, PAINT_SYMM_Y, PAINT_SYMM_Z, and quat_to_axis_angle().
Referenced by flip_qt(), and SCULPT_cache_calc_brushdata_symm().
BLI_INLINE void flip_v3 | ( | float | v[3], |
const ePaintSymmetryFlags | symm | ||
) |
Definition at line 437 of file paint_intern.h.
References flip_v3_v3(), and v.
Referenced by calc_sculpt_plane(), SCULPT_calc_brush_plane(), SCULPT_flip_v3_by_symm_area(), and update_sculpt_normal().
BLI_INLINE void flip_v3_v3 | ( | float | out[3], |
const float | in[3], | ||
const ePaintSymmetryFlags | symm | ||
) |
Uses symm to selectively flip any axis of a coordinate.
Definition at line 392 of file paint_intern.h.
References usdtokens::out(), PAINT_SYMM_X, PAINT_SYMM_Y, and PAINT_SYMM_Z.
Referenced by calc_overlap(), cursor_draw_point_with_symmetry(), flip_v3(), SCULPT_brush_strength_factor(), sculpt_brush_test_clipping(), SCULPT_cache_calc_brushdata_symm(), SCULPT_do_boundary_brush(), sculpt_expand_get_vertex_index_for_symmetry_pass(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_flip_for_symmetry_pass(), sculpt_gesture_is_effected_lasso(), sculpt_gesture_trim_apply_for_symmetry_pass(), SCULPT_is_vertex_inside_brush_radius_symm(), sculpt_pose_brush_is_vertex_inside_brush_radius(), and sculpt_transform_radius_elastic().
Definition at line 404 of file paint_image.cc.
References blender::compositor::area(), C, CTX_wm_area(), CTX_wm_region(), ED_space_image_get_zoom(), SpaceImage::mode, SI_MODE_PAINT, and SPACE_IMAGE.
Referenced by paint_cursor_context_init(), and paint_stroke_new().
struct ImagePaintPartialRedraw* get_imapaintpartial | ( | void | ) |
Definition at line 79 of file paint_image.cc.
References imapaintpartial.
Definition at line 993 of file paint_image.cc.
References C, ED_image_tools_paint_poll(), and texture_paint_poll().
Referenced by ED_keymap_paint().
void imapaint_image_update | ( | struct SpaceImage * | sima, |
struct Image * | image, | ||
struct ImBuf * | ibuf, | ||
struct ImageUser * | iuser, | ||
short | texpaint | ||
) |
Definition at line 144 of file paint_image.cc.
References BKE_image_update_gputexture(), BLI_rcti_is_empty(), BLI_rcti_size_x(), BLI_rcti_size_y(), ImagePaintPartialRedraw::dirty_region, IB_MIPMAP_INVALID, image(), imapaintpartial, IMB_partial_display_buffer_update_delayed(), SpaceImage::lock, ImBuf::mipmap, ImBuf::userflags, w(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by paint_2d_bucket_fill(), paint_2d_gradient_fill(), paint_2d_redraw(), and project_image_refresh_tagged().
void imapaint_region_tiles | ( | struct ImBuf * | ibuf, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
int * | tx, | ||
int * | ty, | ||
int * | tw, | ||
int * | th | ||
) |
Definition at line 96 of file paint_image.cc.
References ED_IMAGE_UNDO_TILE_BITS, IMB_rectclip(), w(), x, and y.
Referenced by ED_imapaint_dirty_region(), and paint_2d_op().
Definition at line 1008 of file paint_image.cc.
References BKE_paint_select_elem_test(), C, and CTX_data_active_object().
Referenced by PAINT_OT_weight_set().
void paint_2d_bucket_fill | ( | const struct bContext * | C, |
const float | color[3], | ||
struct Brush * | br, | ||
const float | mouse_init[2], | ||
const float | mouse_final[2], | ||
void * | ps | ||
) |
This function expects linear space color values.
void paint_2d_gradient_fill | ( | const struct bContext * | C, |
struct Brush * | br, | ||
const float | mouse_init[2], | ||
const float | mouse_final[2], | ||
void * | ps | ||
) |
void* paint_2d_new_stroke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
int | mode | ||
) |
Definition at line 1542 of file paint_image_2d.c.
References BKE_image_acquire_ibuf(), BKE_image_has_packedfile(), BKE_image_release_ibuf(), BKE_paint_brush(), BKE_report(), ImagePaintState::blend, Brush::blend, BLI_listbase_count(), ImagePaintState::blurkernel, ImagePaintState::brush, brush_painter_2d_new(), BRUSH_STROKE_INVERT, C, ImagePaintTile::canvas, ImBuf::channels, CTX_data_scene(), CTX_wm_region(), CTX_wm_space_image(), ListBase::first, ImagePaintState::image, SpaceImage::image, Brush::imagepaint_tool, ToolSettings::imapaint, ImagePaintTile::iuser, SpaceImage::iuser, MEM_callocN, MEM_freeN, NULL, ImagePaintState::num_tiles, ImagePaintSettings::paint, PAINT2D_TILE_READY, paint_2d_canvas_set(), paint_brush_init_tex(), paint_new_blur_kernel(), PAINT_TOOL_SOFTEN, ImagePaintState::painter, ImagePaintTile::radius_fac, wmOperator::reports, RPT_WARNING, Image::rr, scene, ImagePaintState::scene, ImagePaintState::sima, ImagePaintTile::size, ImagePaintTile::state, ImagePaintState::symmetry, Paint::symmetry_flags, tile, ImageUser::tile, ImagePaintState::tiles, Image::tiles, ImagePaintState::tool, Scene::toolsettings, ImagePaintTile::uv_origin, ImagePaintState::v2d, ARegion::v2d, ImBuf::x, ImBuf::y, and zero_v2().
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_new_stroke().
void paint_2d_stroke | ( | void * | ps, |
const float | prev_mval[2], | ||
const float | mval[2], | ||
bool | eraser, | ||
float | pressure, | ||
float | distance, | ||
float | size | ||
) |
Definition at line 1452 of file paint_image_2d.c.
References ImagePaintState::blend, Brush::blend, BrushPainter::brush, ImagePaintState::brush, brush_painter_2d_refresh_cache(), brush_painter_2d_require_imbuf(), BrushPainter::cache_invert, ImagePaintTile::canvas, ImBuf::colormanage_flag, copy_v2_v2(), blender::math::distance(), BrushPainter::firsttouch, IMB_BLEND_ERASE_ALPHA, IMB_COLORMANAGE_IS_DATA, is_inside_tile(), NULL, ImagePaintState::num_tiles, paint_2d_ensure_tile_canvas(), paint_2d_op(), paint_2d_uv_to_coord(), PAINT_TILE_X, PAINT_TILE_Y, ImagePaintState::painter, ImBuf::rect_float, size(), ImagePaintTile::size, sub_v2_v2v2(), ImagePaintState::symmetry, tile, ImagePaintState::tiles, UI_view2d_region_to_view(), and ImagePaintState::v2d.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_stroke().
Definition at line 1669 of file paint_image_2d.c.
References ImagePaintState::brush, brush_painter_cache_2d_free(), ImagePaintTile::cache, MEM_freeN, ImagePaintState::num_tiles, paint_2d_canvas_free(), paint_brush_exit_tex(), ImagePaintState::painter, and ImagePaintState::tiles.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_stroke_done().
void paint_brush_color_get | ( | struct Scene * | scene, |
struct Brush * | br, | ||
bool | color_correction, | ||
bool | invert, | ||
float | distance, | ||
float | pressure, | ||
float | color[3], | ||
struct ColorManagedDisplay * | display | ||
) |
Definition at line 332 of file paint_image.cc.
References BKE_brush_color_get(), BKE_brush_secondary_color_get(), BKE_colorband_evaluate(), BRUSH_GRADIENT_PRESSURE, BRUSH_GRADIENT_SPACING_CLAMP, BRUSH_GRADIENT_SPACING_REPEAT, BRUSH_USE_GRADIENT, color, copy_v3_v3(), blender::math::distance(), Brush::flag, Brush::gradient, Brush::gradient_spacing, Brush::gradient_stroke_mode, IMB_colormanagement_display_to_scene_linear_v3(), IMB_colormanagement_scene_linear_to_srgb_v3(), invert(), and scene.
Referenced by brush_painter_imbuf_new(), brush_painter_imbuf_update(), and paint_proj_stroke_ps().
Definition at line 390 of file paint_image.cc.
References bNodeTree::execdata, Brush::mask_mtex, Brush::mtex, Tex::nodetree, ntreeTexEndExecTree(), and MTex::tex.
Referenced by paint_2d_stroke_done(), and paint_proj_stroke_done().
Definition at line 374 of file paint_image.cc.
References Brush::mask_mtex, Brush::mtex, Tex::nodetree, ntreeTexBeginExecTree(), and MTex::tex.
Referenced by paint_2d_new_stroke(), and paint_proj_new_stroke().
Definition at line 1676 of file paint_stroke.c.
References blender::compositor::area(), BKE_paint_brush(), BKE_paint_get_active_from_context(), C, CTX_data_active_object(), CTX_wm_area(), CTX_wm_region(), bToolRef_Runtime::data_block, ELEM, ARegion::regiontype, RGN_TYPE_WINDOW, bToolRef::runtime, SPACE_IMAGE, and SPACE_VIEW3D.
Referenced by paint_cursor_context_init(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_stroke_modal(), and SCULPT_poll().
float paint_calc_object_space_radius | ( | struct ViewContext * | vc, |
const float | center[3], | ||
float | pixel_radius | ||
) |
Definition at line 130 of file paint_utils.c.
References center, ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), fabsf, len_v3(), mat4_to_scale(), mul_v3_m4v3(), ViewContext::obact, Object::obmat, ViewContext::region, and ViewContext::rv3d.
Referenced by ED_sculpt_update_modal_transform(), paint_cursor_update_object_space_radius(), paint_cursor_update_unprojected_radius(), paint_space_stroke_spacing(), SCULPT_cursor_geometry_info_update(), sculpt_gesture_trim_calculate_depth(), sculpt_update_cache_variants(), and vwpaint_update_cache_variants().
void paint_calc_redraw_planes | ( | float | planes[4][4], |
const struct ARegion * | region, | ||
struct Object * | ob, | ||
const struct rcti * | screen_rect | ||
) |
Get four planes in object-space that describe the projection of screen_rect from screen into object-space (essentially converting a 2D screens-space bounding box into four 3D planes).
Referenced by ED_sculpt_redraw_planes_get().
bool paint_convert_bb_to_rect | ( | struct rcti * | rect, |
const float | bb_min[3], | ||
const float | bb_max[3], | ||
const struct ARegion * | region, | ||
struct RegionView3D * | rv3d, | ||
struct Object * | ob | ||
) |
Convert the object-space axis-aligned bounding box (expressed as its minimum and maximum corners) into a screen-space rectangle, returns zero if the result is empty.
Referenced by SCULPT_get_redraw_rect().
Delete overlay cursor textures to preserve memory and invalidate all overlay flags.
Definition at line 88 of file paint_cursor.c.
References BKE_paint_invalidate_overlay_all(), cursor_snap, GPU_texture_free(), TexSnapshot::overlay_texture, CursorSnapshot::overlay_texture, primary_snap, and secondary_snap.
Referenced by ED_object_sculptmode_exit_ex(), ED_space_image_paint_update(), ed_vwpaintmode_exit_generic(), and toggle_paint_cursor().
void paint_curve_mask_cache_free_data | ( | CurveMaskCache * | curve_mask_cache | ) |
Definition at line 152 of file paint_image_2d_curve_mask.cc.
References blender::ed::sculpt_paint::curve_mask_free(), and blender::ed::sculpt_paint::sampled_curve_free().
Referenced by brush_painter_cache_2d_free().
void paint_curve_mask_cache_update | ( | CurveMaskCache * | curve_mask_cache, |
const struct Brush * | brush, | ||
int | diameter, | ||
float | radius, | ||
const float | cursor_position[2] | ||
) |
Definition at line 40 of file paint_curve.c.
References BKE_paint_get_active_from_context(), Paint::brush, BRUSH_CURVE, C, CTX_data_active_object(), CTX_wm_region_view3d(), CTX_wm_space_image(), Brush::flag, Object::mode, SpaceImage::mode, OB_MODE_ALL_PAINT, OB_MODE_SCULPT_CURVES, and SI_MODE_PAINT.
Referenced by ED_keymap_paint(), PAINTCURVE_OT_add_point(), PAINTCURVE_OT_cursor(), PAINTCURVE_OT_delete_point(), PAINTCURVE_OT_draw(), PAINTCURVE_OT_new(), PAINTCURVE_OT_select(), PAINTCURVE_OT_slide(), paintcurve_undosys_poll(), and paintcurve_undosys_step_encode().
void paint_delete_blur_kernel | ( | BlurKernel * | kernel | ) |
Definition at line 240 of file paint_image.cc.
References kernel, and MEM_freeN.
Referenced by paint_2d_canvas_free(), paint_new_blur_kernel(), and project_paint_end().
float paint_get_tex_pixel | ( | const struct MTex * | mtex, |
float | u, | ||
float | v, | ||
struct ImagePool * | pool, | ||
int | thread | ||
) |
Referenced by load_tex_task_cb_ex(), and SCULPT_brush_strength_factor().
void paint_get_tex_pixel_col | ( | const struct MTex * | mtex, |
float | u, | ||
float | v, | ||
float | rgba[4], | ||
struct ImagePool * | pool, | ||
int | thread, | ||
bool | convert, | ||
struct ColorSpace * | colorspace | ||
) |
Referenced by load_tex_task_cb_ex().
BlurKernel* paint_new_blur_kernel | ( | struct Brush * | br, |
bool | proj | ||
) |
Paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging. Can be extended to other blur kernels later,
Definition at line 171 of file paint_image.cc.
References Brush::blur_kernel_radius, Brush::blur_mode, exp(), kernel, KERNEL_BOX, KERNEL_GAUSSIAN, MEM_mallocN, paint_delete_blur_kernel(), and type.
Referenced by paint_2d_new_stroke(), and project_state_init().
void PAINT_OT_add_simple_uvs | ( | struct wmOperatorType * | ot | ) |
Definition at line 6928 of file paint_image_proj.c.
References add_simple_uvs_exec(), add_simple_uvs_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINT_OT_add_texture_paint_slot | ( | struct wmOperatorType * | ot | ) |
Definition at line 6808 of file paint_image_proj.c.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, wmOperatorType::description, ED_operator_object_active_editable_mesh(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, IMA_DEF_NAME, IMA_GENTYPE_BLANK, wmOperatorType::invoke, layer_type_items, MAX_NAME, wmOperatorType::name, NULL, OPTYPE_UNDO, ot, PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE, PAINT_CANVAS_SOURCE_IMAGE, wmOperatorType::poll, PROP_COLOR_GAMMA, PROP_HIDDEN, PROP_PIXEL, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_enum(), RNA_def_float_color(), RNA_def_int(), RNA_def_property_flag(), RNA_def_property_float_array_default(), RNA_def_property_subtype(), RNA_def_string(), rna_enum_image_generated_type_items, wmOperatorType::srna, texture_paint_add_texture_paint_slot_exec(), texture_paint_add_texture_paint_slot_invoke(), texture_paint_add_texture_paint_slot_ui(), and wmOperatorType::ui.
Referenced by ED_operatortypes_paint().
void PAINT_OT_brush_colors_flip | ( | struct wmOperatorType * | ot | ) |
Definition at line 946 of file paint_image.cc.
References brush_colors_flip_exec(), brush_colors_flip_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINT_OT_face_select_all | ( | struct wmOperatorType * | ot | ) |
Definition at line 658 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, face_select_all_exec(), facemask_paint_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_paint().
void PAINT_OT_face_select_hide | ( | struct wmOperatorType * | ot | ) |
Definition at line 737 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, face_select_hide_exec(), facemask_paint_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_face_select_linked | ( | struct wmOperatorType * | ot | ) |
Definition at line 613 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, facemask_paint_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_select_linked_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINT_OT_face_select_linked_pick | ( | struct wmOperatorType * | ot | ) |
Definition at line 634 of file paint_utils.c.
References wmOperatorType::description, facemask_paint_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_select_linked_pick_invoke(), wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_face_vert_reveal | ( | struct wmOperatorType * | ot | ) |
Definition at line 800 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, face_vert_reveal_exec(), face_vert_reveal_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_grab_clone | ( | struct wmOperatorType * | ot | ) |
Definition at line 545 of file paint_image.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, grab_clone_cancel(), grab_clone_exec(), grab_clone_invoke(), grab_clone_modal(), wmOperatorType::idname, image_paint_2d_clone_poll(), wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float_vector(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_hide_show | ( | struct wmOperatorType * | ot | ) |
Definition at line 405 of file paint_hide.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, hide_show_exec(), hide_show_invoke(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, ot, PARTIALVIS_ALL, PARTIALVIS_HIDE, PARTIALVIS_INSIDE, PARTIALVIS_MASKED, PARTIALVIS_OUTSIDE, PARTIALVIS_SHOW, wmOperatorType::poll, RNA_def_enum(), SCULPT_mode_poll_view3d(), wmOperatorType::srna, WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_paint().
void PAINT_OT_image_from_view | ( | struct wmOperatorType * | ot | ) |
Definition at line 6288 of file paint_image_proj.c.
References wmOperatorType::description, wmOperatorType::exec, FILE_MAX, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, ot, wmOperatorType::poll, RNA_def_string_file_name(), wmOperatorType::srna, texture_paint_image_from_view_exec(), and texture_paint_image_from_view_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_image_paint | ( | struct wmOperatorType * | ot | ) |
Definition at line 512 of file paint_image_ops_paint.cc.
References wmOperatorType::cancel, wmOperatorType::description, ED_image_tools_paint_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, ot, blender::ed::sculpt_paint::image::ops::paint::paint_cancel(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), blender::ed::sculpt_paint::image::ops::paint::paint_modal(), paint_stroke_operator_properties(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_box_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1672 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, paint_mask_gesture_box_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_flood_fill | ( | struct wmOperatorType * | ot | ) |
Definition at line 187 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mask_flood_fill_exec(), mode_items, wmOperatorType::name, NULL, OPTYPE_REGISTER, ot, PAINT_MASK_FLOOD_VALUE, wmOperatorType::poll, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_lasso_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1651 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, paint_mask_gesture_lasso_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_line_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1693 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, paint_mask_gesture_line_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_CURSOR_EDIT, WM_gesture_straightline_active_side_invoke(), WM_gesture_straightline_oneshot_modal(), and WM_operator_properties_gesture_straightline().
Referenced by ED_operatortypes_paint().
void PAINT_OT_project_image | ( | struct wmOperatorType * | ot | ) |
Definition at line 6144 of file paint_image_proj.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::prop, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), RNA_image_itemf(), wmOperatorType::srna, texture_paint_camera_project_exec(), and WM_enum_search_invoke().
Referenced by ED_operatortypes_paint().
void PAINT_OT_sample_color | ( | struct wmOperatorType * | ot | ) |
Definition at line 726 of file paint_image.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int_vector(), RNA_def_property_flag(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), sample_color_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_texture_paint_toggle | ( | struct wmOperatorType * | ot | ) |
Definition at line 889 of file paint_image.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, texture_paint_toggle_exec(), and texture_paint_toggle_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vert_select_all | ( | struct wmOperatorType * | ot | ) |
Definition at line 681 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vert_paint_poll(), vert_select_all_exec(), and WM_operator_properties_select_all().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vert_select_hide | ( | struct wmOperatorType * | ot | ) |
Definition at line 761 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, vert_paint_poll(), and vert_select_hide_exec().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vert_select_ungrouped | ( | struct wmOperatorType * | ot | ) |
Definition at line 711 of file paint_utils.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, vert_paint_poll(), and vert_select_ungrouped_exec().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_brightness_contrast | ( | struct wmOperatorType * | ot | ) |
Definition at line 354 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, max, min, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float(), RNA_def_property_ui_range(), wmOperatorType::srna, vertex_color_brightness_contrast_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_from_weight | ( | struct wmOperatorType * | ot | ) |
Definition at line 134 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vertex_paint_from_weight_exec(), and vertex_weight_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_hsv | ( | struct wmOperatorType * | ot | ) |
Definition at line 413 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, vertex_color_hsv_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_invert | ( | struct wmOperatorType * | ot | ) |
Definition at line 454 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vertex_color_invert_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_levels | ( | struct wmOperatorType * | ot | ) |
Definition at line 493 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, vertex_color_levels_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_set | ( | struct wmOperatorType * | ot | ) |
Definition at line 4190 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vertex_color_set_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_color_smooth | ( | struct wmOperatorType * | ot | ) |
Definition at line 241 of file paint_vertex_color_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vertex_color_smooth_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_paint | ( | struct wmOperatorType * | ot | ) |
Definition at line 4010 of file paint_vertex.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_UNDO, ot, paint_stroke_operator_properties(), wmOperatorType::poll, vertex_paint_poll(), vpaint_cancel(), vpaint_exec(), vpaint_invoke(), and vpaint_modal().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_paint_toggle | ( | struct wmOperatorType * | ot | ) |
Definition at line 2756 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mode_toggle_poll_test(), wmOperatorType::poll, and vpaint_mode_toggle_exec().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_from_bones | ( | struct wmOperatorType * | ot | ) |
Definition at line 119 of file paint_vertex_weight_ops.c.
References ARM_GROUPS_AUTO, ARM_GROUPS_ENVELOPE, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, weight_from_bones_exec(), weight_from_bones_poll(), and WM_menu_invoke().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_gradient | ( | struct wmOperatorType * | ot | ) |
Definition at line 896 of file paint_vertex_weight_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_weight_gradient_exec(), paint_weight_gradient_invoke(), paint_weight_gradient_modal(), wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, weight_paint_poll_ignore_tool(), WM_CURSOR_EDIT, WM_gesture_straightline_cancel(), WM_operator_properties_gesture_straightline(), WPAINT_GRADIENT_TYPE_LINEAR, and WPAINT_GRADIENT_TYPE_RADIAL.
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_paint | ( | struct wmOperatorType * | ot | ) |
Definition at line 2683 of file paint_vertex.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_UNDO, ot, paint_stroke_operator_properties(), wmOperatorType::poll, weight_paint_poll(), wpaint_cancel(), wpaint_exec(), wpaint_invoke(), and wpaint_modal().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_paint_toggle | ( | struct wmOperatorType * | ot | ) |
Definition at line 1512 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mode_toggle_poll_test(), wmOperatorType::poll, and wpaint_mode_toggle_exec().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_sample | ( | struct wmOperatorType * | ot | ) |
Definition at line 267 of file paint_vertex_weight_ops.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, weight_paint_mode_poll(), and weight_sample_invoke().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_sample_group | ( | struct wmOperatorType * | ot | ) |
Definition at line 397 of file paint_vertex_weight_ops.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), wmOperatorType::srna, weight_paint_mode_poll(), weight_paint_sample_enum_itemf(), weight_sample_group_exec(), and WM_menu_invoke().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_set | ( | struct wmOperatorType * | ot | ) |
Definition at line 536 of file paint_vertex_weight_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mask_paint_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and weight_paint_set_exec().
Referenced by ED_operatortypes_paint().
void* paint_proj_new_stroke | ( | struct bContext * | C, |
struct Object * | ob, | ||
const float | mouse[2], | ||
int | mode | ||
) |
Definition at line 5884 of file paint_image_proj.c.
References ARRAY_SIZE, BKE_brush_size_get(), BKE_brush_size_set(), BKE_mesh_from_object(), BKE_paint_brush(), BLI_assert, ProjStrokeHandle::brush, BRUSH_STROKE_INVERT, C, count_bits_i(), CTX_data_scene(), Brush::imagepaint_tool, ToolSettings::imapaint, ProjStrokeHandle::is_clone_cursor_pick, ProjPaintState::is_shared_user, ProjPaintState::me_eval, MEM_callocN, MEM_freeN, mesh, NULL, ProjPaintState::ob, ProjStrokeHandle::orig_brush_size, ImagePaintSettings::paint, paint_brush_init_tex(), paint_proj_begin_clone(), PAINT_SYMM_X, PAINT_SYMM_Y, PAINT_SYMM_Z, PAINT_TOOL_CLONE, PAINT_TOOL_FILL, pow_i(), PROJ_PAINT_STATE_SHARED_MEMCPY, PROJ_SRC_VIEW, PROJ_SRC_VIEW_FILL, project_image_refresh_tagged(), project_paint_begin(), project_state_init(), ProjStrokeHandle::ps_views, ProjStrokeHandle::ps_views_tot, scene, ProjStrokeHandle::scene, ProjPaintState::source, Mesh::symmetry, ProjStrokeHandle::symmetry_flags, ProjPaintState::tool, Scene::toolsettings, view3d_operator_needs_opengl(), x, y, and z.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ProjectionPaintMode::paint_new_stroke().
void paint_proj_stroke | ( | const struct bContext * | C, |
void * | ps_handle_p, | ||
const float | prev_pos[2], | ||
const float | pos[2], | ||
bool | eraser, | ||
float | pressure, | ||
float | distance, | ||
float | size | ||
) |
Definition at line 6003 of file paint_image_proj.c.
References BKE_brush_size_set(), ProjStrokeHandle::brush, ProjStrokeHandle::is_clone_cursor_pick, MEM_freeN, ProjStrokeHandle::orig_brush_size, paint_brush_exit_tex(), PROJ_PAINT_STATE_SHARED_CLEAR, project_paint_end(), ProjStrokeHandle::ps_views, ProjStrokeHandle::ps_views_tot, scene, and ProjStrokeHandle::scene.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ProjectionPaintMode::paint_stroke_done().
void paint_sample_color | ( | struct bContext * | C, |
struct ARegion * | region, | ||
int | x, | ||
int | y, | ||
bool | texpaint_proj, | ||
bool | palette | ||
) |
Used for both 3D view and image window.
Definition at line 374 of file paint_utils.c.
References Palette::active_color, bilinear_interpolation_color_wrap(), BKE_brush_color_set(), BKE_image_acquire_ibuf(), BKE_image_get_tile_from_pos(), BKE_image_release_ibuf(), BKE_imageuser_default(), BKE_object_material_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_palette(), BKE_paint_palette_set(), BKE_palette_add(), BKE_palette_color_add(), BKE_texpaint_slot_refresh_cache(), BLI_listbase_count(), C, ImagePaintSettings::canvas, CD_MASK_BAREMESH, CD_MASK_ORIGINDEX, CD_MLOOPUV, CLAMP, color, Palette::colors, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), CTX_wm_view3d(), CustomData_has_layer(), Object::data, DEG_get_evaluated_object(), depsgraph, ED_space_image_color_sample(), ED_view3d_viewcontext_init(), fmodf, ImageUser::framenr, GPU_DATA_FLOAT, GPU_frontbuffer_read_pixels(), TexPaintSlot::ima, IMA_SRC_TILED, image(), IMAGEPAINT_MODE_MATERIAL, ToolSettings::imapaint, imapaint_pick_face(), imapaint_pick_uv(), interp(), TexPaintSlot::interp, ImagePaintSettings::interp, linearrgb_to_srgb_v3_v3(), MPoly::mat_nr, mesh_get_eval_final(), ImagePaintSettings::mode, nearest_interpolation_color_wrap(), NULL, OBACT, Material::paint_active_slot, CustomData_MeshMasks::pmask, ImBuf::rect, ImBuf::rect_float, rgb_uchar_to_float(), usdtokens::rgba(), scene, SHD_INTERP_CLOSEST, SHD_INTERP_LINEAR, straight_to_premul_v4(), Material::texpaintslot, ImageUser::tile, Scene::toolsettings, Mesh::totpoly, v, view3d_operator_needs_opengl(), ARegion::winrct, ARegion::winx, ARegion::winy, x, ImBuf::x, rcti::xmin, y, ImBuf::y, and rcti::ymin.
Referenced by sample_color_exec(), sample_color_invoke(), and sample_color_modal().
bool paint_space_stroke_enabled | ( | struct Brush * | br, |
enum ePaintMode | mode | ||
) |
Returns zero if the stroke dots should not be spaced, non-zero otherwise.
Definition at line 1021 of file paint_stroke.c.
References BRUSH_SPACE, curves_sculpt_brush_uses_spacing(), Brush::curves_sculpt_tool, Brush::flag, PAINT_MODE_SCULPT_CURVES, paint_supports_dynamic_size(), SCULPT_is_cloth_deform_brush(), Brush::sculpt_tool, and SCULPT_TOOL_CLOTH.
Referenced by paint_stroke_modal().
void paint_stroke_cancel | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
struct PaintStroke * | stroke | ||
) |
Definition at line 1641 of file paint_stroke.c.
References C, and stroke_done().
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_cancel(), paint_stroke_modal(), sculpt_brush_stroke_cancel(), blender::ed::sculpt_paint::sculpt_curves_stroke_cancel(), vpaint_cancel(), and wpaint_cancel().
float paint_stroke_distance_get | ( | struct PaintStroke * | stroke | ) |
Definition at line 1666 of file paint_stroke.c.
References PaintStroke::stroke_distance.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), and sculpt_stroke_update_step().
int paint_stroke_exec | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
struct PaintStroke * | stroke | ||
) |
Definition at line 1611 of file paint_stroke.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, RNA_END, RNA_float_get_array(), RNA_property_collection_lookup_int(), RNA_struct_find_property(), stroke_done(), PaintStroke::stroke_started, PaintStroke::test_start, and PaintStroke::update_step.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_exec(), sculpt_brush_stroke_exec(), vpaint_exec(), and wpaint_exec().
bool paint_stroke_flipped | ( | struct PaintStroke * | stroke | ) |
Definition at line 1656 of file paint_stroke.c.
References PaintStroke::pen_flip.
void paint_stroke_free | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
struct PaintStroke * | stroke | ||
) |
bool paint_stroke_inverted | ( | struct PaintStroke * | stroke | ) |
Definition at line 1661 of file paint_stroke.c.
References BRUSH_STROKE_INVERT, and PaintStroke::stroke_mode.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_bucket_fill().
int paint_stroke_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event, | ||
struct PaintStroke ** | stroke_p | ||
) |
struct wmKeyMap* paint_stroke_modal_keymap | ( | struct wmKeyConfig * | keyconf | ) |
Called in paint_ops.c, on each regeneration of key-maps.
Definition at line 1131 of file paint_stroke.c.
References wmKeyMap::modal_items, EnumPropertyItem::name, PAINT_STROKE_MODAL_CANCEL, WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by ED_keymap_paint().
void* paint_stroke_mode_data | ( | struct PaintStroke * | stroke | ) |
Definition at line 1651 of file paint_stroke.c.
References PaintStroke::mode_data.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_redraw(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), vpaint_stroke_done(), vpaint_stroke_update_step(), vpaint_stroke_update_step_intern(), wpaint_stroke_done(), and wpaint_stroke_update_step().
struct PaintStroke* paint_stroke_new | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
StrokeGetLocation | get_location, | ||
StrokeTestStart | test_start, | ||
StrokeUpdateStep | update_step, | ||
StrokeRedraw | redraw, | ||
StrokeDone | done, | ||
int | event_type | ||
) |
Definition at line 874 of file paint_stroke.c.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_brush_size_get(), BKE_curvemapping_init(), BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_set_overlay_override(), BKE_paintmode_get_active_from_context(), PaintStroke::brush, BRUSH_CURVE, BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, C, Paint::cavity_curve, UnifiedPaintSettings::colorspace, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region_view3d(), Brush::curve, depsgraph, UnifiedPaintSettings::do_linear_conversion, PaintStroke::done, ED_view3d_viewcontext_init(), PaintStroke::event_type, Brush::flag, Paint::flags, get_imapaint_zoom(), PaintStroke::get_location, Tex::ima, Tex::iuser, max_ff(), MEM_callocN, Brush::mtex, mul_v3_fl(), NULL, PaintStroke::original, UnifiedPaintSettings::overlap_factor, Brush::overlay_flags, paint_tool_raycast_original(), PAINT_USE_CAVITY_MASK, wmOperator::ptr, ImBuf::rect_colorspace, ImBuf::rect_float, PaintStroke::redraw, RegionView3D::rflag, RNA_enum_get(), RNA_enum_set(), RV3D_PAINTING, UnifiedPaintSettings::start_pixel_radius, UnifiedPaintSettings::stroke_active, PaintStroke::stroke_mode, PaintStroke::test_start, MTex::tex, TEX_IMAGE, Tex::type, ToolSettings::unified_paint_settings, PaintStroke::update_step, PaintStroke::ups, PaintStroke::vc, and PaintStroke::zoom_2d.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().
void paint_stroke_operator_properties | ( | struct wmOperatorType * | ot | ) |
Definition at line 188 of file paint_utils.c.
References BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_collection_runtime(), RNA_def_enum(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by PAINT_OT_image_paint(), PAINT_OT_vertex_paint(), PAINT_OT_weight_paint(), blender::ed::sculpt_paint::SCULPT_CURVES_OT_brush_stroke(), and SCULPT_OT_brush_stroke().
void paint_stroke_set_mode_data | ( | struct PaintStroke * | stroke, |
void * | mode_data | ||
) |
Definition at line 1671 of file paint_stroke.c.
References PaintStroke::mode_data.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_test_start(), vpaint_stroke_test_start(), and wpaint_stroke_test_start().
struct ViewContext* paint_stroke_view_context | ( | struct PaintStroke * | stroke | ) |
Definition at line 1646 of file paint_stroke.c.
References PaintStroke::vc.
Referenced by sculpt_update_cache_invariants(), and vwpaint_update_cache_invariants().
bool paint_supports_dynamic_size | ( | struct Brush * | br, |
enum ePaintMode | mode | ||
) |
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1059 of file paint_stroke.c.
References BRUSH_ANCHORED, BRUSH_USE_GRADIENT, Brush::flag, Brush::imagepaint_tool, PAINT_MODE_SCULPT, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, PAINT_TOOL_FILL, and sculpt_is_grab_tool().
Referenced by paint_brush_update(), paint_space_stroke_enabled(), sculpt_update_cache_variants(), and vwpaint_update_cache_variants().
bool paint_supports_dynamic_tex_coords | ( | struct Brush * | br, |
enum ePaintMode | mode | ||
) |
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1111 of file paint_stroke.c.
References BRUSH_ANCHORED, Brush::flag, PAINT_MODE_SCULPT, and sculpt_is_grab_tool().
Referenced by paint_brush_update().
bool paint_supports_jitter | ( | enum ePaintMode | mode | ) |
bool paint_supports_smooth_stroke | ( | struct Brush * | br, |
enum ePaintMode | mode | ||
) |
Definition at line 1085 of file paint_stroke.c.
References BRUSH_ANCHORED, BRUSH_DRAG_DOT, BRUSH_LINE, BRUSH_SMOOTH_STROKE, Brush::flag, PAINT_MODE_SCULPT, and sculpt_is_grab_tool().
Referenced by paint_smooth_stroke(), and paint_stroke_modal().
bool paint_supports_texture | ( | enum ePaintMode | mode | ) |
Definition at line 1104 of file paint_stroke.c.
References ELEM, PAINT_MODE_SCULPT, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, and PAINT_MODE_VERTEX.
Referenced by stencil_control_poll().
Definition at line 317 of file paint_image.cc.
References BRUSH_AIRBRUSH, BRUSH_ANCHORED, BRUSH_DRAG_DOT, MTex::brush_map_mode, BRUSH_USE_GRADIENT, ELEM, Brush::flag, Brush::imagepaint_tool, Brush::mtex, MTEX_MAP_MODE_3D, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, PAINT_TOOL_FILL, PAINT_TOOL_SMEAR, PAINT_TOOL_SOFTEN, and MTex::tex.
Referenced by paint_2d_canvas_set(), and project_state_init().
void PAINTCURVE_OT_add_point | ( | struct wmOperatorType * | ot | ) |
Definition at line 256 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_add_point_exec(), paintcurve_add_point_invoke(), wmOperatorType::poll, RNA_def_int_vector(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_cursor | ( | struct wmOperatorType * | ot | ) |
Definition at line 732 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, paint_curve_poll(), paintcurve_cursor_invoke(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_delete_point | ( | struct wmOperatorType * | ot | ) |
Definition at line 348 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_delete_point_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_draw | ( | struct wmOperatorType * | ot | ) |
Definition at line 689 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_draw_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_new | ( | struct wmOperatorType * | ot | ) |
Definition at line 158 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_new_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_select | ( | struct wmOperatorType * | ot | ) |
Definition at line 492 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_select_point_exec(), paintcurve_select_point_invoke(), wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int_vector(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINTCURVE_OT_slide | ( | struct wmOperatorType * | ot | ) |
Definition at line 638 of file paint_curve.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_slide_invoke(), paintcurve_slide_modal(), wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void SCULPT_OT_uv_sculpt_stroke | ( | struct wmOperatorType * | ot | ) |
Definition at line 786 of file sculpt_uv.c.
References BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, uv_sculpt_stroke_invoke(), uv_sculpt_stroke_modal(), and uv_sculpt_stroke_poll().
Referenced by ED_operatortypes_paint().
void set_imapaintpartial | ( | struct ImagePaintPartialRedraw * | ippr | ) |
Definition at line 84 of file paint_image.cc.
References imapaintpartial.
Referenced by project_image_refresh_tagged().
Definition at line 1003 of file paint_image.cc.
References BKE_paint_select_vert_test(), C, and CTX_data_active_object().
Referenced by ED_keymap_paint(), PAINT_OT_vert_select_all(), PAINT_OT_vert_select_hide(), and PAINT_OT_vert_select_ungrouped().
Returns true if vertex paint mode is active.
Definition at line 239 of file paint_vertex.cc.
References BKE_id_attributes_active_color_get(), C, CTX_data_active_object(), Object::data, Object::mode, and OB_MODE_VERTEX_PAINT.
Referenced by ED_keymap_paint(), PAINT_OT_vertex_color_brightness_contrast(), 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(), and vertex_paint_poll_ex().
Definition at line 269 of file paint_vertex.cc.
References C, and vertex_paint_poll_ex().
Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_vertex_paint().
Definition at line 274 of file paint_vertex.cc.
References C, and vertex_paint_poll_ex().
Referenced by sample_color_poll().
Definition at line 328 of file paint_vertex.cc.
References col, color2uint(), and scene.
Definition at line 279 of file paint_vertex.cc.
References C, CTX_data_active_object(), Object::data, Object::mode, and OB_MODE_WEIGHT_PAINT.
Referenced by ED_keymap_paint(), PAINT_OT_weight_sample(), and PAINT_OT_weight_sample_group().
Definition at line 304 of file paint_vertex.cc.
References C, and weight_paint_poll_ex().
Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_weight_paint().
Definition at line 309 of file paint_vertex.cc.
References C, and weight_paint_poll_ex().
Referenced by PAINT_OT_weight_gradient().