Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include <stdlib.h>
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "DNA_brush_types.h"
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "ED_image.h"
#include "ED_paint.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "curves_sculpt_intern.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include <stddef.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | StencilControlData |
Macros | |
#define | PIXEL_MARGIN 5 |
Enumerations | |
enum | StencilControlMode { STENCIL_TRANSLATE , STENCIL_SCALE , STENCIL_ROTATE } |
enum | StencilTextureMode { STENCIL_PRIMARY = 0 , STENCIL_SECONDARY = 1 } |
enum | StencilConstraint { STENCIL_CONSTRAINT_X = 1 , STENCIL_CONSTRAINT_Y = 2 } |
Variables | |
static const ePaintMode | brush_select_paint_modes [] |
#define PIXEL_MARGIN 5 |
enum StencilConstraint |
Enumerator | |
---|---|
STENCIL_CONSTRAINT_X | |
STENCIL_CONSTRAINT_Y |
Definition at line 982 of file paint_ops.c.
enum StencilControlMode |
Enumerator | |
---|---|
STENCIL_TRANSLATE | |
STENCIL_SCALE | |
STENCIL_ROTATE |
Definition at line 971 of file paint_ops.c.
enum StencilTextureMode |
Enumerator | |
---|---|
STENCIL_PRIMARY | |
STENCIL_SECONDARY |
Definition at line 977 of file paint_ops.c.
|
static |
Definition at line 50 of file paint_ops.c.
References BKE_brush_add(), BKE_id_copy(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_get_active_from_context(), BKE_paint_object_mode_from_paintmode(), BKE_paintmode_get_active_from_context(), C, CTX_data_main(), Brush::id, id_us_min(), and OPERATOR_FINISHED.
Referenced by BRUSH_OT_add().
|
static |
Definition at line 161 of file paint_ops.c.
References blender::compositor::area(), bScreen::areabase, BKE_brush_add(), BKE_brush_init_gpencil_settings(), BKE_gpencil_brush_preset_set(), BKE_id_copy(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_get_active_from_context(), BLI_str_tolower_ascii(), BLI_strncpy(), BLI_toupper_ascii(), C, CTX_data_main(), CTX_data_mode_enum(), CTX_MODE_PAINT_GPENCIL, CTX_MODE_SCULPT_GPENCIL, CTX_MODE_VERTEX_GPENCIL, CTX_MODE_WEIGHT_GPENCIL, CTX_wm_screen(), bToolRef_Runtime::data_block, gpencil_get_brush_preset_from_tool(), Brush::id, id_us_min(), LISTBASE_FOREACH, NULL, OB_MODE_PAINT_GPENCIL, OB_MODE_SCULPT_GPENCIL, OB_MODE_VERTEX_GPENCIL, OB_MODE_WEIGHT_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, bToolRef::runtime, and SPACE_VIEW3D.
Referenced by BRUSH_OT_add_gpencil().
|
static |
Definition at line 835 of file paint_ops.c.
References BKE_brush_add(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_get_tool_enum_from_paintmode(), BKE_paint_invalidate_overlay_all(), BKE_paintmode_get_active_from_context(), brush_tool(), brush_tool_cycle(), brush_tool_set(), brush_tool_toggle(), C, Brush::id, id_us_min(), MAX_NAME, NA_EDITED, NC_BRUSH, NULL, Paint_Runtime::ob_mode, RNA_enum_name_from_value(), Paint::runtime, SNPRINTF, Brush::toggle_brush, Paint_Runtime::tool_offset, WM_main_add_notifier(), and WM_toolsystem_ref_set_by_id().
Referenced by brush_select_exec().
|
static |
Definition at line 71 of file paint_ops.c.
References brush_add_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 239 of file paint_ops.c.
References brush_add_gpencil_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 746 of file paint_ops.c.
References brush_reset_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 303 of file paint_ops.c.
References brush_scale_size_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, RNA_def_float(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1217 of file paint_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, stencil_control_cancel(), stencil_control_invoke(), stencil_control_modal(), stencil_control_poll(), STENCIL_PRIMARY, STENCIL_ROTATE, STENCIL_SCALE, STENCIL_SECONDARY, and STENCIL_TRANSLATE.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1308 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, stencil_control_poll(), and stencil_fit_image_aspect_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1363 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, stencil_control_poll(), and stencil_reset_transform_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 724 of file paint_ops.c.
References BKE_brush_sculpt_reset(), BKE_paint_brush(), BKE_paint_get_active_from_context(), C, CTX_data_active_object(), Object::mode, NA_EDITED, NC_BRUSH, OB_MODE_SCULPT, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by BRUSH_OT_reset().
|
static |
Definition at line 253 of file paint_ops.c.
References blender::math::abs(), BKE_brush_size_get(), BKE_brush_size_set(), BKE_brush_unprojected_radius_get(), BKE_brush_unprojected_radius_set(), BKE_paint_brush(), BKE_paint_get_active_from_context(), C, CTX_data_scene(), Brush::gpencil_settings, max_ii(), NA_EDITED, NC_BRUSH, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), scene, size(), Brush::size, and WM_main_add_notifier().
Referenced by BRUSH_OT_scale_size().
|
static |
Definition at line 896 of file paint_ops.c.
References ARRAY_SIZE, BKE_paint_get_active_from_paintmode(), BKE_paint_get_tool_enum_from_paintmode(), BKE_paint_get_tool_prop_id_from_paintmode(), brush_generic_tool_set(), brush_select_paint_modes, C, CTX_data_main(), CTX_data_scene(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PAINT_MODE_INVALID, wmOperator::ptr, RNA_boolean_get(), RNA_enum_name_from_value(), RNA_property_enum_get(), RNA_property_is_set(), RNA_struct_find_property(), and scene.
Referenced by PAINT_OT_brush_select().
|
static |
Definition at line 760 of file paint_ops.c.
Referenced by brush_generic_tool_set(), brush_tool_cycle(), and brush_tool_toggle().
|
static |
Definition at line 770 of file paint_ops.c.
References BKE_paint_toolslots_brush_get(), brush_tool(), Main::brushes, ListBase::first, Brush::id, ID::next, NULL, Brush::ob_mode, Paint_Runtime::ob_mode, Paint::runtime, and Paint_Runtime::tool_offset.
Referenced by brush_generic_tool_set(), and brush_tool_toggle().
Definition at line 765 of file paint_ops.c.
Referenced by brush_generic_tool_set().
|
static |
Definition at line 813 of file paint_ops.c.
References brush_tool(), brush_tool_cycle(), NULL, Paint::runtime, Brush::toggle_brush, and Paint_Runtime::tool_offset.
Referenced by brush_generic_tool_set().
void ED_keymap_paint | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1491 of file paint_ops.c.
References CURVES_SCULPT_mode_poll(), 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().
Definition at line 1383 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().
Definition at line 1399 of file paint_ops.c.
References BRUSH_OT_add(), BRUSH_OT_add_gpencil(), BRUSH_OT_curve_preset(), BRUSH_OT_reset(), BRUSH_OT_scale_size(), BRUSH_OT_stencil_control(), BRUSH_OT_stencil_fit_image_aspect(), BRUSH_OT_stencil_reset_transform(), PAINT_OT_add_simple_uvs(), PAINT_OT_add_texture_paint_slot(), PAINT_OT_brush_colors_flip(), PAINT_OT_brush_select(), PAINT_OT_face_select_all(), PAINT_OT_face_select_hide(), PAINT_OT_face_select_linked(), PAINT_OT_face_select_linked_pick(), PAINT_OT_face_vert_reveal(), PAINT_OT_grab_clone(), PAINT_OT_hide_show(), PAINT_OT_image_from_view(), PAINT_OT_image_paint(), PAINT_OT_mask_box_gesture(), PAINT_OT_mask_flood_fill(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), PAINT_OT_project_image(), PAINT_OT_sample_color(), PAINT_OT_texture_paint_toggle(), PAINT_OT_vert_select_all(), PAINT_OT_vert_select_hide(), PAINT_OT_vert_select_ungrouped(), PAINT_OT_vertex_color_brightness_contrast(), PAINT_OT_vertex_color_from_weight(), PAINT_OT_vertex_color_hsv(), PAINT_OT_vertex_color_invert(), PAINT_OT_vertex_color_levels(), PAINT_OT_vertex_color_set(), PAINT_OT_vertex_color_smooth(), PAINT_OT_vertex_paint(), PAINT_OT_vertex_paint_toggle(), PAINT_OT_weight_from_bones(), PAINT_OT_weight_gradient(), PAINT_OT_weight_paint(), PAINT_OT_weight_paint_toggle(), PAINT_OT_weight_sample(), PAINT_OT_weight_sample_group(), PAINT_OT_weight_set(), PAINTCURVE_OT_add_point(), PAINTCURVE_OT_cursor(), PAINTCURVE_OT_delete_point(), PAINTCURVE_OT_draw(), PAINTCURVE_OT_new(), PAINTCURVE_OT_select(), PAINTCURVE_OT_slide(), PALETTE_OT_color_add(), PALETTE_OT_color_delete(), PALETTE_OT_color_move(), PALETTE_OT_extract_from_image(), PALETTE_OT_join(), PALETTE_OT_new(), PALETTE_OT_sort(), SCULPT_OT_uv_sculpt_stroke(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
|
static |
Definition at line 85 of file paint_ops.c.
References CTX_MODE_PAINT_GPENCIL, CTX_MODE_SCULPT_GPENCIL, CTX_MODE_VERTEX_GPENCIL, CTX_MODE_WEIGHT_GPENCIL, bToolRef_Runtime::data_block, GP_BRUSH_PRESET_CLONE_STROKE, GP_BRUSH_PRESET_DRAW_WEIGHT, GP_BRUSH_PRESET_ERASER_SOFT, GP_BRUSH_PRESET_FILL_AREA, GP_BRUSH_PRESET_GRAB_STROKE, GP_BRUSH_PRESET_PENCIL, GP_BRUSH_PRESET_PINCH_STROKE, GP_BRUSH_PRESET_PUSH_STROKE, GP_BRUSH_PRESET_RANDOMIZE_STROKE, GP_BRUSH_PRESET_SMOOTH_STROKE, GP_BRUSH_PRESET_STRENGTH_STROKE, GP_BRUSH_PRESET_THICKNESS_STROKE, GP_BRUSH_PRESET_TINT, GP_BRUSH_PRESET_TWIST_STROKE, GP_BRUSH_PRESET_UNKNOWN, GP_BRUSH_PRESET_VERTEX_AVERAGE, GP_BRUSH_PRESET_VERTEX_BLUR, GP_BRUSH_PRESET_VERTEX_DRAW, GP_BRUSH_PRESET_VERTEX_REPLACE, GP_BRUSH_PRESET_VERTEX_SMEAR, bToolRef::runtime, and STREQ.
Referenced by brush_add_gpencil_exec().
|
static |
Definition at line 933 of file paint_ops.c.
References ARRAY_SIZE, BKE_paint_get_tool_enum_from_paintmode(), BKE_paint_get_tool_prop_id_from_paintmode(), brush_select_exec(), brush_select_paint_modes, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_enum(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 360 of file paint_ops.c.
References Palette::active_color, BKE_brush_color_get(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BKE_palette_color_add(), BLI_listbase_count(), Paint::brush, C, color, Palette::colors, copy_v3_v3(), CTX_data_scene(), ELEM, OPERATOR_FINISHED, PAINT_MODE_SCULPT, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, PAINT_MODE_VERTEX, PAINT_MODE_WEIGHT, Paint::palette, scene, Brush::weight, and zero_v3().
Referenced by PALETTE_OT_color_add().
|
static |
Definition at line 404 of file paint_ops.c.
References Palette::active_color, BKE_paint_get_active_from_context(), BKE_palette_color_remove(), BLI_findlink(), C, color, Palette::colors, OPERATOR_FINISHED, and Paint::palette.
Referenced by PALETTE_OT_color_delete().
|
static |
Definition at line 613 of file paint_ops.c.
References Palette::active_color, BKE_paint_get_active_from_context(), BLI_assert, BLI_findlink(), BLI_listbase_link_move(), C, Palette::colors, ELEM, NA_EDITED, NC_BRUSH, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Paint::palette, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by PALETTE_OT_color_move().
|
static |
Definition at line 445 of file paint_ops.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_palette_from_hash(), BKE_reportf(), BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_int_new(), C, col, color, CTX_data_main(), CTX_wm_space_image(), image(), SpaceImage::image, IMB_sampleImageAtLocation(), SpaceImage::iuser, lock, NULL, OPERATOR_FINISHED, POINTER_FROM_INT, pow(), wmOperator::ptr, ImBuf::rect, wmOperator::reports, rgb_to_cpack(), RNA_int_get(), RPT_INFO, threshold, ImBuf::x, and ImBuf::y.
Referenced by PALETTE_OT_extract_from_image().
Definition at line 432 of file paint_ops.c.
References BKE_image_has_ibuf(), C, CTX_wm_space_data(), CTX_wm_space_image(), image(), SpaceImage::image, SpaceImage::iuser, NULL, SPACE_IMAGE, and SpaceLink::spacetype.
Referenced by PALETTE_OT_extract_from_image().
|
static |
Definition at line 658 of file paint_ops.c.
References BKE_libblock_find_name(), BKE_paint_get_active_from_context(), BKE_palette_color_add(), BKE_palette_color_remove(), BLI_listbase_count(), C, color, Palette::colors, copy_v3_v3(), CTX_data_main(), ListBase::first, ID_PAL, LISTBASE_FOREACH, MAX_ID_NAME, NA_EDITED, NC_BRUSH, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Paint::palette, wmOperator::ptr, PaletteColor::rgb, RNA_string_get(), PaletteColor::value, and WM_event_add_notifier().
Referenced by PALETTE_OT_join().
|
static |
Definition at line 321 of file paint_ops.c.
References BKE_paint_get_active_from_context(), BKE_paint_palette_set(), BKE_palette_add(), C, CTX_data_main(), and OPERATOR_FINISHED.
Referenced by PALETTE_OT_new().
|
static |
Definition at line 390 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_color_add_exec(), palette_poll(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 417 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_color_delete_exec(), palette_poll(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 634 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_color_move_exec(), palette_poll(), wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 493 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_extract_img_exec(), palette_extract_img_poll(), wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 706 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MAX_ID_NAME, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_join_exec(), palette_poll(), wmOperatorType::poll, RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 334 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and palette_new_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 587 of file paint_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, palette_poll(), palette_sort_exec(), wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
Definition at line 348 of file paint_ops.c.
References BKE_paint_get_active_from_context(), C, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, NULL, and Paint::palette.
Referenced by PALETTE_OT_color_add(), PALETTE_OT_color_delete(), PALETTE_OT_color_move(), PALETTE_OT_join(), and PALETTE_OT_sort().
|
static |
Definition at line 515 of file paint_ops.c.
References BKE_paint_get_active_from_context(), BKE_palette_color_add(), BKE_palette_color_remove(), BKE_palette_sort_hsv(), BKE_palette_sort_luminance(), BKE_palette_sort_svh(), BKE_palette_sort_vhs(), BLI_listbase_count(), C, color, Palette::colors, copy_v3_v3(), ListBase::first, tPaletteColorHSV::h, LISTBASE_FOREACH, MEM_calloc_arrayN, MEM_SAFE_FREE, NA_EDITED, NC_BRUSH, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Paint::palette, wmOperator::ptr, tPaletteColorHSV::rgb, PaletteColor::rgb, rgb_to_hsv(), RNA_enum_get(), tPaletteColorHSV::s, t, type, v, tPaletteColorHSV::v, tPaletteColorHSV::value, and WM_event_add_notifier().
Referenced by PALETTE_OT_sort().
|
static |
Definition at line 1092 of file paint_ops.c.
References add_v2_v2v2(), angle(), StencilControlData::area_size, atan2f, CLAMP, clamp_v2(), StencilControlData::constrain_mode, copy_v2_v2(), StencilControlData::dim_target, float(), StencilControlData::init_angle, StencilControlData::init_mouse, StencilControlData::init_rot, StencilControlData::init_sdim, StencilControlData::init_spos, len, len_v2(), StencilControlData::lenorig, M_PI, StencilControlData::mode, PIXEL_MARGIN, StencilControlData::pos_target, StencilControlData::rot_target, STENCIL_CONSTRAINT_X, STENCIL_CONSTRAINT_Y, STENCIL_ROTATE, STENCIL_SCALE, STENCIL_TRANSLATE, and sub_v2_v2v2().
Referenced by stencil_control_modal().
|
static |
Definition at line 1084 of file paint_ops.c.
References wmOperator::customdata, MEM_freeN, and stencil_restore().
Referenced by BRUSH_OT_stencil_control(), and stencil_control_modal().
|
static |
Definition at line 1038 of file paint_ops.c.
References StencilControlData::area_size, BKE_paint_brush(), BKE_paint_get_active_from_context(), StencilControlData::br, MTex::brush_map_mode, C, copy_v2_v2(), CTX_wm_region(), wmOperator::customdata, StencilControlData::init_mouse, StencilControlData::launch_event, mask(), StencilControlData::mask, Brush::mask_mtex, MEM_mallocN, StencilControlData::mode, Brush::mtex, MTEX_MAP_MODE_STENCIL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_enum_get(), stencil_set_target(), wmEvent::type, ARegion::winx, ARegion::winy, WM_event_add_modal_handler(), and WM_userdef_event_type_from_keymap_type().
Referenced by BRUSH_OT_stencil_control().
|
static |
Definition at line 1145 of file paint_ops.c.
References C, StencilControlData::constrain_mode, CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), EVT_ESCKEY, EVT_XKEY, EVT_YKEY, KM_PRESS, KM_RELEASE, StencilControlData::launch_event, MEM_freeN, MOUSEMOVE, wmEvent::mval, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, STENCIL_CONSTRAINT_X, STENCIL_CONSTRAINT_Y, stencil_control_calculate(), stencil_control_cancel(), wmEvent::type, wmEvent::val, and WM_event_add_notifier().
Referenced by BRUSH_OT_stencil_control().
Definition at line 1200 of file paint_ops.c.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), MTex::brush_map_mode, C, Brush::mask_mtex, Brush::mtex, MTEX_MAP_MODE_STENCIL, and paint_supports_texture().
Referenced by BRUSH_OT_stencil_control(), BRUSH_OT_stencil_fit_image_aspect(), and BRUSH_OT_stencil_reset_transform().
|
static |
Definition at line 1252 of file paint_ops.c.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), C, ED_image_get_uv_aspect(), Tex::extend, fabsf, Tex::ima, Brush::mask_mtex, Brush::mask_stencil_dimension, Brush::mtex, NC_WINDOW, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), MTex::size, sqrtf, Brush::stencil_dimension, tex, MTex::tex, TEX_IMAGE, TEX_REPEAT, Tex::type, WM_event_add_notifier(), Tex::xrepeat, and Tex::yrepeat.
Referenced by BRUSH_OT_stencil_fit_image_aspect().
|
static |
Definition at line 1329 of file paint_ops.c.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), C, Brush::mask_mtex, Brush::mask_stencil_dimension, Brush::mask_stencil_pos, Brush::mtex, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), MTex::rot, Brush::stencil_dimension, Brush::stencil_pos, and WM_event_add_notifier().
Referenced by BRUSH_OT_stencil_reset_transform().
|
static |
Definition at line 1077 of file paint_ops.c.
References copy_v2_v2(), StencilControlData::dim_target, StencilControlData::init_rot, StencilControlData::init_sdim, StencilControlData::init_spos, StencilControlData::pos_target, and StencilControlData::rot_target.
Referenced by stencil_control_cancel().
|
static |
Definition at line 1006 of file paint_ops.c.
References atan2f, StencilControlData::br, copy_v2_v2(), StencilControlData::dim_target, StencilControlData::init_angle, StencilControlData::init_mouse, StencilControlData::init_rot, StencilControlData::init_sdim, StencilControlData::init_spos, len_v2(), StencilControlData::lenorig, StencilControlData::mask, Brush::mask_mtex, Brush::mask_stencil_dimension, Brush::mask_stencil_pos, Brush::mtex, StencilControlData::pos_target, MTex::rot, StencilControlData::rot_target, Brush::stencil_dimension, Brush::stencil_pos, and sub_v2_v2v2().
Referenced by stencil_control_invoke().
|
static |
Definition at line 884 of file paint_ops.c.
Referenced by brush_select_exec(), and PAINT_OT_brush_select().