Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "DNA_brush_types.h"
#include "DNA_color_types.h"
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_image.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "NOD_texture.h"
#include "WM_api.h"
#include "wm_cursors.h"
#include "IMB_imbuf_types.h"
#include "ED_image.h"
#include "ED_view3d.h"
#include "DEG_depsgraph.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "GPU_texture.h"
#include "UI_resources.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
Go to the source code of this file.
Classes | |
struct | TexSnapshot |
struct | CursorSnapshot |
struct | LoadTexData |
struct | PaintCursorContext |
Typedefs | |
typedef struct TexSnapshot | TexSnapshot |
typedef struct CursorSnapshot | CursorSnapshot |
typedef struct LoadTexData | LoadTexData |
typedef enum PaintCursorDrawingType | PaintCursorDrawingType |
typedef struct PaintCursorContext | PaintCursorContext |
Enumerations | |
enum | PaintCursorDrawingType { PAINT_CURSOR_CURVE , PAINT_CURSOR_2D , PAINT_CURSOR_3D } |
Variables | |
static TexSnapshot | primary_snap = {0} |
static TexSnapshot | secondary_snap = {0} |
static CursorSnapshot | cursor_snap = {0} |
typedef struct CursorSnapshot CursorSnapshot |
typedef struct LoadTexData LoadTexData |
typedef struct PaintCursorContext PaintCursorContext |
typedef enum PaintCursorDrawingType PaintCursorDrawingType |
typedef struct TexSnapshot TexSnapshot |
Enumerator | |
---|---|
PAINT_CURSOR_CURVE | |
PAINT_CURSOR_2D | |
PAINT_CURSOR_3D |
Definition at line 1195 of file paint_cursor.c.
|
static |
Definition at line 1024 of file paint_cursor.c.
References copy_v3_v3(), ED_view3d_project_v3(), imm_draw_circle_fill_3d(), mul_m4_v3(), and size().
Referenced by cursor_draw_point_with_symmetry(), cursor_draw_tiling_preview(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_pose_brush_origins_draw(), and paint_cursor_preview_boundary_data_pivot_draw().
|
static |
Definition at line 1086 of file paint_cursor.c.
References angle(), cursor_draw_point_screen_space(), cursor_draw_tiling_preview(), ELEM, flip_v3_v3(), M_PI, mul_m4_v3(), Object::obmat, r, Sculpt::radial_symm, rotate_m4(), SCULPT_mesh_symmetry_xyz_get(), and unit_m4().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1041 of file paint_cursor.c.
References BKE_object_boundbox_get(), copy_v3_v3(), copy_v3_v3_int(), cursor_draw_point_screen_space(), Object::obmat, Sculpt::paint, PAINT_TILE_X, Paint::symmetry_flags, Paint::tile_offset, and BoundBox::vec.
Referenced by cursor_draw_point_with_symmetry().
BLI_INLINE void draw_bezier_handle_lines | ( | uint | pos, |
const float | sel_col[4], | ||
BezTriple * | bez | ||
) |
Definition at line 872 of file paint_cursor.c.
References BezTriple::f1, BezTriple::f2, BezTriple::f3, GPU_line_width(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2fv(), pos, and BezTriple::vec.
Referenced by paint_draw_curve_cursor().
BLI_INLINE void draw_rect_point | ( | uint | pos, |
const float | sel_col[4], | ||
const float | handle_col[4], | ||
const float * | co, | ||
float | width, | ||
bool | selected | ||
) |
Definition at line 847 of file paint_cursor.c.
References GPU_line_width(), imm_draw_box_wire_2d(), immUniformColor4f(), immUniformColor4fv(), pos, w(), and width.
Referenced by paint_draw_curve_cursor().
BLI_INLINE void draw_tri_point | ( | uint | pos, |
const float | sel_col[4], | ||
const float | pivot_col[4], | ||
float * | co, | ||
float | width, | ||
bool | selected | ||
) |
Definition at line 813 of file paint_cursor.c.
References GPU_line_width(), GPU_PRIM_LINE_LOOP, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2fv(), pos, w(), and width.
Referenced by paint_draw_curve_cursor().
Definition at line 1941 of file paint_cursor.c.
References BKE_paint_invalidate_overlay_all(), NULL, Paint::paint_cursor, paint_draw_cursor(), RGN_TYPE_ANY, SPACE_TYPE_ANY, and WM_paint_cursor_activate().
|
static |
Definition at line 236 of file paint_cursor.c.
References BKE_brush_size_get(), BKE_image_pool_free(), BKE_image_pool_new(), BKE_paint_get_overlay_flags(), BKE_paint_reset_overlay_invalid(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), MTex::brush_map_mode, buffer, col, data, bNodeTree::execdata, GPU_DATA_UBYTE, GPU_R8, GPU_RGBA8, GPU_texture_create_2d(), GPU_texture_free(), GPU_texture_swizzle_set(), GPU_texture_update(), init, load_tex_task_cb_ex(), make_tex_snap(), Brush::mask_mtex, MEM_freeN, MEM_mallocN, Brush::mtex, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_VIEW, Tex::nodetree, ntreeTexBeginExecTree(), ntreeTexEndExecTree(), NULL, TexSnapshot::old_col, TexSnapshot::old_size, overlay_flags, TexSnapshot::overlay_texture, PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY, PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY, blender::compositor::pool, primary_snap, r, MTex::rot, same_tex_snap(), ViewContext::scene, secondary_snap, size(), and MTex::tex.
Referenced by paint_draw_tex_overlay().
|
static |
Definition at line 395 of file paint_cursor.c.
References BKE_brush_size_get(), BKE_curvemapping_init(), BKE_paint_get_overlay_flags(), BKE_paint_reset_overlay_invalid(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), buffer, cursor_snap, Brush::curve, CursorSnapshot::curve_preset, Brush::curve_preset, data, GPU_DATA_UBYTE, GPU_R8, GPU_texture_create_2d(), GPU_texture_free(), GPU_texture_swizzle_set(), GPU_texture_update(), init, load_tex_cursor_task_cb(), MEM_freeN, MEM_mallocN, NULL, overlay_flags, CursorSnapshot::overlay_texture, PAINT_OVERLAY_INVALID_CURVE, r, ViewContext::scene, size(), CursorSnapshot::size, and CursorSnapshot::zoom.
Referenced by paint_draw_cursor_overlay().
|
static |
Definition at line 363 of file paint_cursor.c.
References BKE_brush_curve_strength_clamped(), buffer, data, float(), len, size(), sqrtf, x, and y.
Referenced by load_tex_cursor().
|
static |
Definition at line 140 of file paint_cursor.c.
References angle(), atan2f, BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BLI_task_parallel_thread_id(), MTex::brush_map_mode, buffer, CLAMP, col, cosf, data, ELEM, float(), Tex::ima, ColorSpace::index, Tex::iuser, len, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, NULL, paint_get_tex_pixel(), paint_get_tex_pixel_col(), blender::compositor::pool, ImBuf::rect_colorspace, ImBuf::rect_float, ViewContext::region, usdtokens::rgba(), sinf, size(), sqrtf, MTex::tex, TEX_IMAGE, Brush::texture_sample_bias, blender::threading::enumerable_thread_specific_utils::thread_id, Tex::type, ARegion::winx, ARegion::winy, x, and y.
Referenced by load_tex().
|
static |
Definition at line 119 of file paint_cursor.c.
References ViewContext::region, snap(), ARegion::winx, and ARegion::winy.
Referenced by load_tex().
|
static |
Definition at line 1849 of file paint_cursor.c.
References PaintCursorContext::alpha_overlay_drawn, PaintCursorContext::brush, PaintCursorContext::mode, paint_draw_alpha_overlay(), PaintCursorContext::ups, PaintCursorContext::vc, PaintCursorContext::x, PaintCursorContext::y, and PaintCursorContext::zoomx.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1250 of file paint_cursor.c.
References Brush::add_col, BKE_brush_sculpt_has_secondary_color(), BKE_brush_size_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), PaintCursorContext::brush, BRUSH_CURVE, BRUSH_DIR_IN, PaintCursorContext::C, C, copy_v3_fl(), copy_v3_v3(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), PaintCursorContext::cursor_type, PaintCursorContext::depsgraph, SculptSession::draw_faded_cursor, UnifiedPaintSettings::draw_inverted, ED_view3d_viewcontext_init(), PaintCursorContext::final_radius, Brush::flag, float(), get_imapaint_zoom(), PaintCursorContext::is_stroke_active, max_ff(), PaintCursorContext::mode, NULL, ViewContext::obact, PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PaintCursorContext::paint, PAINT_brush_tool_poll(), PAINT_CURSOR_2D, PAINT_CURSOR_3D, PAINT_CURSOR_CURVE, paint_use_2d_cursor(), PaintCursorContext::region, ARegion::regiontype, RGN_TYPE_WINDOW, PaintCursorContext::scene, Object::sculpt, PaintCursorContext::ss, UnifiedPaintSettings::stroke_active, Brush::sub_col, Scene::toolsettings, PaintCursorContext::translation, ToolSettings::unified_paint_settings, PaintCursorContext::ups, PaintCursorContext::vc, PaintCursorContext::win, PaintCursorContext::wm, x, PaintCursorContext::x, PaintCursorContext::y, y, and PaintCursorContext::zoomx.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1724 of file paint_cursor.c.
References BLI_assert, PaintCursorContext::brush, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, PaintCursorContext::C, SculptSession::cache, Brush::cloth_force_falloff_type, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, CTX_wm_view3d(), PaintCursorContext::depsgraph, ED_view3d_draw_setup_view(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), PaintCursorContext::is_multires, len_v3v3(), PaintCursorContext::mode, NULL, ViewContext::obact, Object::obmat, PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PAINT_MODE_SCULPT, PaintCursorContext::pos, StrokeCache::radius, red, PaintCursorContext::region, PaintCursorContext::scene, SCULPT_cloth_plane_falloff_preview_draw(), SCULPT_cloth_simulation_limits_draw(), sculpt_geometry_preview_lines_draw(), SCULPT_multiplane_scrape_preview_draw(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), Brush::sculpt_tool, SCULPT_TOOL_CLOTH, SCULPT_TOOL_GRAB, SCULPT_TOOL_MULTIPLANE_SCRAPE, PaintCursorContext::ss, StrokeCache::true_initial_location, StrokeCache::true_initial_normal, StrokeCache::true_location, PaintCursorContext::vc, PaintCursorContext::win, ARegion::winrct, PaintCursorContext::wm, wmViewport(), and wmWindowViewport().
Referenced by paint_cursor_draw_3D_view_brush_cursor().
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().
|
static |
Definition at line 1801 of file paint_cursor.c.
References PaintCursorContext::is_stroke_active, PaintCursorContext::mode, paint_cursor_cursor_draw_3d_view_brush_cursor_active(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_sculpt_session_update_and_init(), paint_draw_legacy_3D_view_brush_cursor(), PAINT_MODE_SCULPT, and PaintCursorContext::ss.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1560 of file paint_cursor.c.
References PaintCursorContext::alpha_overlay_drawn, BKE_sculpt_update_object_for_edit(), PaintCursorContext::brush, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_GRAB_ACTIVE_VERTEX, PaintCursorContext::C, Brush::cloth_simulation_area_type, CTX_wm_view3d(), cursor_draw_point_screen_space(), cursor_draw_point_with_symmetry(), PaintCursorContext::depsgraph, ED_view3d_draw_setup_view(), SculptSession::expand_cache, Brush::falloff_shape, Brush::flag, GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), immUniformColor3fvAlpha(), ExpandCache::initial_active_vertex, PaintCursorContext::is_cursor_over_mesh, PaintCursorContext::is_multires, len_v3v3(), PaintCursorContext::location, NULL, ViewContext::obact, Object::obmat, PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PAINT_brush_tool_poll(), paint_cursor_draw_main_inactive_cursor(), paint_cursor_drawing_setup_cursor_space(), paint_cursor_pose_brush_origins_draw(), paint_cursor_pose_brush_segments_draw(), paint_cursor_preview_boundary_data_pivot_draw(), paint_cursor_preview_boundary_data_update(), paint_cursor_update_object_space_radius(), paint_draw_3D_view_inactive_brush_cursor(), paint_draw_legacy_3D_view_brush_cursor(), PAINT_FALLOFF_SHAPE_TUBE, PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, PaintCursorContext::prev_active_vertex_index, PaintCursorContext::radius, PaintCursorContext::region, PaintCursorContext::scene, SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_boundary_edges_preview_draw(), SCULPT_boundary_pivot_line_preview_draw(), SCULPT_cloth_simulation_limits_draw(), sculpt_geometry_preview_lines_draw(), SCULPT_geometry_preview_lines_update(), SCULPT_layer_brush_height_preview_draw(), SCULPT_pose_ik_chain_free(), SCULPT_pose_ik_chain_init(), Brush::sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLOTH, SCULPT_TOOL_GRAB, SCULPT_TOOL_LAYER, SCULPT_TOOL_POSE, SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_co_get(), PaintCursorContext::sd, PaintCursorContext::ss, PaintCursorContext::vc, PaintCursorContext::win, ARegion::winrct, PaintCursorContext::wm, wmViewport(), and wmWindowViewport().
Referenced by paint_cursor_draw_3D_view_brush_cursor().
|
static |
Definition at line 1482 of file paint_cursor.c.
References Brush::alpha, PaintCursorContext::brush, clamp_f(), GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PaintCursorContext::pos, and PaintCursorContext::radius.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1469 of file paint_cursor.c.
References copy_m4_m4(), GPU_matrix_mul, PaintCursorContext::location, PaintCursorContext::normal, ViewContext::obact, Object::obmat, quat_to_mat4(), rotation_between_vecs_to_quat(), translate_m4(), and PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1821 of file paint_cursor.c.
References RegionView3D::rflag, ViewContext::rv3d, RV3D_NAVIGATING, and PaintCursorContext::vc.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1827 of file paint_cursor.c.
References PaintCursorContext::brush, ELEM, Paint::flags, Brush::imagepaint_tool, PaintCursorContext::mode, PaintCursorContext::paint, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, PAINT_SHOW_BRUSH, and PAINT_TOOL_FILL.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1509 of file paint_cursor.c.
References cursor_draw_point_screen_space(), immUniformColor4f(), SculptPoseIKChainSegment::initial_orig, ViewContext::obact, Object::obmat, PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, PaintCursorContext::region, SculptPoseIKChain::segments, PaintCursorContext::ss, SculptPoseIKChain::tot_segments, and PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1494 of file paint_cursor.c.
References GPU_line_width(), GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immVertex3fv(), SculptPoseIKChainSegment::initial_head, SculptPoseIKChainSegment::initial_orig, PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, SculptPoseIKChain::segments, PaintCursorContext::ss, and SculptPoseIKChain::tot_segments.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1523 of file paint_cursor.c.
References SculptSession::boundary_preview, cursor_draw_point_screen_space(), immUniformColor4f(), ViewContext::obact, Object::obmat, SculptBoundary::pivot_vertex, PaintCursorContext::pos, PaintCursorContext::region, SCULPT_vertex_co_get(), PaintCursorContext::ss, and PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1540 of file paint_cursor.c.
References SculptSession::active_vertex_index, BKE_sculpt_update_object_for_edit(), SculptSession::boundary_preview, PaintCursorContext::brush, PaintCursorContext::depsgraph, ViewContext::obact, PaintCursorContext::radius, SCULPT_boundary_data_free(), SCULPT_boundary_data_init(), PaintCursorContext::ss, and PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
Definition at line 1891 of file paint_cursor.c.
References GPU_blend(), GPU_BLEND_NONE, GPU_line_smooth(), and immUnbindProgram().
Referenced by paint_draw_cursor().
|
static |
Definition at line 1354 of file paint_cursor.c.
References SculptSession::active_vertex_index, BKE_brush_size_set(), BKE_brush_use_locked_size(), BKE_pbvh_type(), BLI_assert, PaintCursorContext::brush, PaintCursorContext::C, C, copy_v3_v3(), CTX_data_tool_settings(), Brush::falloff_shape, PaintCursorContext::is_cursor_over_mesh, PaintCursorContext::is_multires, UnifiedPaintSettings::last_hit, UnifiedPaintSettings::last_location, PaintCursorContext::location, SculptCursorGeometryInfo::location, PaintCursorContext::mode, PaintCursorContext::normal, SculptCursorGeometryInfo::normal, NULL, paint_cursor_update_pixel_radius(), paint_cursor_update_unprojected_radius(), PAINT_FALLOFF_SHAPE_SPHERE, PAINT_MODE_SCULPT, SculptSession::pbvh, PBVH_GRIDS, PaintCursorContext::pixel_radius, PaintCursorContext::prev_active_vertex_index, PaintCursorContext::region, scene, PaintCursorContext::scene, PaintCursorContext::scene_space_location, ToolSettings::sculpt, SCULPT_cursor_geometry_info_update(), PaintCursorContext::sd, PaintCursorContext::ss, UnifiedPaintSettings::stroke_active, PaintCursorContext::ups, PaintCursorContext::vc, ARegion::winrct, PaintCursorContext::x, rcti::xmin, PaintCursorContext::y, and rcti::ymin.
Referenced by paint_cursor_draw_3D_view_brush_cursor().
|
static |
Definition at line 1871 of file paint_cursor.c.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immVertexFormat(), and PaintCursorContext::pos.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1881 of file paint_cursor.c.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immVertexFormat(), and PaintCursorContext::pos.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1860 of file paint_cursor.c.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, copy_v2_fl2(), UnifiedPaintSettings::draw_anchored, PaintCursorContext::final_radius, PaintCursorContext::region, PaintCursorContext::translation, PaintCursorContext::ups, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1458 of file paint_cursor.c.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), PaintCursorContext::brush, PaintCursorContext::location, paint_calc_object_space_radius(), PaintCursorContext::radius, PaintCursorContext::scene, and PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1330 of file paint_cursor.c.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_paint_brush(), PaintCursorContext::C, copy_v3_v3(), CTX_data_tool_settings(), PaintCursorContext::is_cursor_over_mesh, PaintCursorContext::location, mul_m4_v3(), ViewContext::obact, Object::obmat, PaintCursorContext::paint, Sculpt::paint, PaintCursorContext::pixel_radius, project_brush_radius(), PaintCursorContext::scene, PaintCursorContext::scene_space_location, ToolSettings::sculpt, and PaintCursorContext::vc.
Referenced by paint_cursor_sculpt_session_update_and_init().
|
static |
Definition at line 1839 of file paint_cursor.c.
References PaintCursorContext::brush, paint_calculate_rake_rotation(), UnifiedPaintSettings::stroke_active, PaintCursorContext::translation, and PaintCursorContext::ups.
Referenced by paint_draw_cursor().
|
static |
Definition at line 989 of file paint_cursor.c.
References UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_unprojected_radius_set(), BKE_brush_use_locked_size(), BKE_brush_use_size_pressure(), BRUSH_ANCHORED, UnifiedPaintSettings::draw_anchored, Brush::flag, paint_calc_object_space_radius(), ViewContext::scene, UnifiedPaintSettings::size_pressure_value, and UnifiedPaintSettings::stroke_active.
Referenced by paint_cursor_sculpt_session_update_and_init().
|
static |
Definition at line 1406 of file paint_cursor.c.
References BKE_brush_use_size_pressure(), PaintCursorContext::brush, PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_2d(), immUniformColor3fvAlpha(), PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PaintCursorContext::pos, UnifiedPaintSettings::size_pressure_value, UnifiedPaintSettings::stroke_active, PaintCursorContext::translation, and PaintCursorContext::ups.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1440 of file paint_cursor.c.
References Brush::alpha, PaintCursorContext::brush, clamp_f(), PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PaintCursorContext::pos, and PaintCursorContext::translation.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 760 of file paint_cursor.c.
References BKE_paint_get_overlay_flags(), col, ELEM, GPU_blend(), GPU_blend_get(), GPU_depth_test(), GPU_depth_test_get(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), paint_draw_cursor_overlay(), paint_draw_tex_overlay(), PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D, PAINT_MODE_VERTEX, PAINT_MODE_WEIGHT, PAINT_OVERLAY_OVERRIDE_CURSOR, PAINT_OVERLAY_OVERRIDE_PRIMARY, PAINT_OVERLAY_OVERRIDE_SECONDARY, ViewContext::region, ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by paint_cursor_check_and_draw_alpha_overlays().
Definition at line 1898 of file paint_cursor.c.
References PaintCursorContext::brush, C, PaintCursorContext::cursor_type, PAINT_CURSOR_2D, PAINT_CURSOR_3D, paint_cursor_check_and_draw_alpha_overlays(), paint_cursor_context_init(), PAINT_CURSOR_CURVE, paint_cursor_draw_3D_view_brush_cursor(), paint_cursor_is_3d_view_navigating(), paint_cursor_is_brush_cursor_enabled(), paint_cursor_restore_drawing_state(), paint_cursor_setup_2D_drawing(), paint_cursor_setup_3D_drawing(), paint_cursor_update_anchored_location(), paint_cursor_update_rake_rotation(), paint_draw_2D_view_brush_cursor(), paint_draw_curve_cursor(), paint_update_mouse_cursor(), PaintCursorContext::vc, x, and y.
Referenced by ED_paint_cursor_start().
|
static |
Definition at line 678 of file paint_cursor.c.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_use_size_pressure(), BRUSH_OVERLAY_CURSOR, center, copy_v2_v2(), Brush::cursor_overlay_alpha, cursor_snap, UnifiedPaintSettings::draw_anchored, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_color_mask(), GPU_COMP_F32, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_1f(), GPU_matrix_translate_2f(), GPU_matrix_translate_2fv(), GPU_PRIM_TRI_FAN, GPU_SAMPLER_CLAMP_BORDER, GPU_SAMPLER_FILTER, GPU_SHADER_2D_IMAGE_COLOR, GPU_texture_unbind(), GPU_vertformat_attr_add(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immBindTextureSampler(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), load_tex_cursor(), mul_v4_fl(), Brush::overlay_flags, CursorSnapshot::overlay_texture, pos, quad, ViewContext::scene, UnifiedPaintSettings::size_pressure_value, UnifiedPaintSettings::stroke_active, UNPACK3, x, and y.
Referenced by paint_draw_alpha_overlay().
|
static |
Definition at line 908 of file paint_cursor.c.
References PaintCurvePoint::bez, BKE_curve_forward_diff_bezier(), data, draw_bezier_handle_lines(), draw_rect_point(), draw_tri_point(), BezTriple::f1, BezTriple::f2, BezTriple::f3, float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_PRIM_LINE_STRIP, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4f(), immVertex2fv(), immVertexFormat(), Brush::paint_curve, PAINT_CURVE_NUM_SEGMENTS, PaintCurve::points, pos, ViewContext::region, SPACE_VIEW3D, TH_PAINT_CURVE_HANDLE, TH_PAINT_CURVE_PIVOT, TH_VERTEX_SELECT, PaintCurve::tot_points, UI_GetThemeColorType4fv(), v, BezTriple::vec, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1429 of file paint_cursor.c.
References PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), PaintCursorContext::outline_alpha, PaintCursorContext::outline_col, PaintCursorContext::pos, and PaintCursorContext::translation.
Referenced by paint_cursor_draw_3D_view_brush_cursor(), and paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 528 of file paint_cursor.c.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_use_size_pressure(), BLI_rcti_size_x(), BLI_rcti_size_y(), MTex::brush_map_mode, BRUSH_OVERLAY_PRIMARY, BRUSH_OVERLAY_SECONDARY, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, center, col, copy_v3_v3(), UnifiedPaintSettings::draw_anchored, ELEM, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_color_mask(), GPU_COMP_F32, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_rotate_2d(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_matrix_translate_2fv(), GPU_PRIM_TRI_FAN, GPU_SAMPLER_CLAMP_BORDER, GPU_SAMPLER_FILTER, GPU_SAMPLER_REPEAT, GPU_SHADER_2D_IMAGE_COLOR, GPU_texture_unbind(), GPU_vertformat_attr_add(), if(), Brush::imagepaint_tool, immAttr2f(), immBegin(), immBindBuiltinProgram(), immBindTextureSampler(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), load_tex(), Brush::mask_mtex, Brush::mask_overlay_alpha, Brush::mask_stencil_dimension, Brush::mask_stencil_pos, Brush::mtex, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_VIEW, mul_v4_fl(), Brush::overlay_flags, TexSnapshot::overlay_texture, PAINT_MODE_TEXTURE_3D, PAINT_TOOL_DRAW, pos, primary_snap, quad, RAD2DEGF, ViewContext::region, MTex::rot, ViewContext::scene, secondary_snap, UnifiedPaintSettings::size_pressure_value, state, Brush::stencil_dimension, Brush::stencil_pos, UnifiedPaintSettings::stroke_active, MTex::tex, Brush::texture_overlay_alpha, ARegion::winrct, x, and y.
Referenced by paint_draw_alpha_overlay().
|
static |
Definition at line 1401 of file paint_cursor.c.
References PaintCursorContext::win, WM_CURSOR_PAINT, and WM_cursor_set().
Referenced by paint_draw_cursor().
|
static |
Definition at line 1187 of file paint_cursor.c.
References PAINT_MODE_TEXTURE_3D.
Referenced by paint_cursor_context_init().
|
static |
Definition at line 481 of file paint_cursor.c.
References add_v3_v3v3(), BLI_assert, cross_v3_v3v3(), ED_view3d_global_to_vector(), ED_view3d_project_float_global(), fabsf, len_v2v2(), mul_v3_fl(), normalize_v3(), offset, ViewContext::region, ViewContext::rv3d, V3D_PROJ_RET_OK, V3D_PROJ_TEST_NOP, and view.
Referenced by paint_cursor_update_pixel_radius().
|
static |
Definition at line 107 of file paint_cursor.c.
References MTex::brush_map_mode, col, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, ViewContext::region, snap(), ARegion::winx, and ARegion::winy.
Referenced by load_tex().
|
static |
Definition at line 1123 of file paint_cursor.c.
References BKE_pbvh_type(), BRUSH_GRAB_ACTIVE_VERTEX, SculptSession::deform_modifiers_active, Brush::flag, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_depth_test_get(), GPU_line_width(), GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immVertex3fv(), SculptSession::pbvh, PBVH_FACES, SculptSession::preview_vert_index_count, SculptSession::preview_vert_index_list, and SCULPT_vertex_co_for_grab_active_get().
Referenced by paint_cursor_cursor_draw_3d_view_brush_cursor_active(), and paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1168 of file paint_cursor.c.
References GPU_line_width(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), Brush::height, imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), translate_m4(), and unit_m4().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 86 of file paint_cursor.c.
Referenced by load_tex_cursor(), paint_cursor_delete_textures(), paint_draw_cursor_overlay(), and v3d_cursor_eventstate_save_xy().
|
static |
Definition at line 84 of file paint_cursor.c.
Referenced by load_tex(), paint_cursor_delete_textures(), and paint_draw_tex_overlay().
|
static |
Definition at line 85 of file paint_cursor.c.
Referenced by load_tex(), paint_cursor_delete_textures(), and paint_draw_tex_overlay().