|
Blender V4.5
|
#include <variant>#include "BLI_array.hh"#include "BLI_bit_vector.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_vector_types.hh"#include "BLI_offset_indices.hh"#include "BLI_shared_cache.hh"#include "BLI_utility_mixins.hh"#include "BLI_vector.hh"#include "DNA_brush_enums.h"#include "DNA_meshdata_types.h"#include "DNA_object_enums.h"Go to the source code of this file.
Classes | |
| struct | SculptPoseIKChainPreview |
| struct | SculptVertexInfo |
| struct | SculptBoundaryPreview |
| struct | SculptFakeNeighbors |
| struct | SculptTopologyIslandCache |
| struct | PersistentMultiresData |
| struct | SculptSession |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| namespace | blender::bke::pbvh |
| namespace | blender::ed |
| namespace | blender::ed::sculpt_paint |
| namespace | blender::ed::sculpt_paint::expand |
| namespace | blender::ed::sculpt_paint::filter |
| namespace | blender::bke::object |
Macros | |
| #define | PAINT_OVERRIDE_MASK |
| #define | PAINT_SYMM_AREA_DEFAULT 0 |
| #define | PAINT_SYMM_AREAS 8 |
| #define | SCULPT_FACE_SET_NONE 0 |
Typedefs | |
| using | ActiveVert = std::variant<std::monostate, int, BMVert *> |
Enumerations | |
| enum class | PaintMode : int8_t { Sculpt = 0 , Vertex = 1 , Weight = 2 , Texture3D = 3 , Texture2D = 4 , GPencil = 6 , VertexGPencil = 7 , SculptGPencil = 8 , WeightGPencil = 9 , SculptCurves = 10 , Invalid = 11 } |
| enum | ePaintOverlayControlFlags { PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY = 1 , PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY = (1 << 2) , PAINT_OVERLAY_INVALID_CURVE = (1 << 3) , PAINT_OVERLAY_OVERRIDE_CURSOR = (1 << 4) , PAINT_OVERLAY_OVERRIDE_PRIMARY = (1 << 5) , PAINT_OVERLAY_OVERRIDE_SECONDARY = (1 << 6) } |
| enum | ePaintSymmetryAreas { PAINT_SYMM_AREA_X = (1 << 0) , PAINT_SYMM_AREA_Y = (1 << 1) , PAINT_SYMM_AREA_Z = (1 << 2) } |
Variables | |
| const uchar | PAINT_CURSOR_SCULPT [3] |
| const uchar | PAINT_CURSOR_VERTEX_PAINT [3] |
| const uchar | PAINT_CURSOR_WEIGHT_PAINT [3] |
| const uchar | PAINT_CURSOR_TEXTURE_PAINT [3] |
| const uchar | PAINT_CURSOR_SCULPT_CURVES [3] |
| const uchar | PAINT_CURSOR_PAINT_GREASE_PENCIL [3] |
| const uchar | PAINT_CURSOR_SCULPT_GREASE_PENCIL [3] |
| #define PAINT_OVERRIDE_MASK |
| #define PAINT_SYMM_AREA_DEFAULT 0 |
Defines 8 areas resulting of splitting the object space by the XYZ axis planes. This is used to flip or mirror transform values depending on where the vertex is and where the transform operation started to support XYZ symmetry on those operations in a predictable way.
Definition at line 134 of file BKE_paint.hh.
Referenced by SCULPT_get_vertex_symm_area().
| #define PAINT_SYMM_AREAS 8 |
Definition at line 143 of file BKE_paint.hh.
Referenced by blender::ed::sculpt_paint::pose::do_pose_brush(), and blender::ed::sculpt_paint::transform_matrices_init().
| #define SCULPT_FACE_SET_NONE 0 |
Definition at line 344 of file BKE_paint.hh.
Referenced by blender::ed::sculpt_paint::face_set::active_face_set_get(), blender::ed::sculpt_paint::expand::active_face_set_id_get(), blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::face_set::check_single_face_set(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), face_set_extract_invoke(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), blender::ed::sculpt_paint::expand::set_initial_components_for_mouse(), blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), and blender::ed::sculpt_paint::face_set::vert_has_face_set().
| using ActiveVert = std::variant<std::monostate, int, BMVert *> |
Definition at line 380 of file BKE_paint.hh.
Definition at line 115 of file BKE_paint.hh.
| enum ePaintSymmetryAreas |
| Enumerator | |
|---|---|
| PAINT_SYMM_AREA_X | |
| PAINT_SYMM_AREA_Y | |
| PAINT_SYMM_AREA_Z | |
Definition at line 136 of file BKE_paint.hh.
| Enumerator | |
|---|---|
| Sculpt | |
| Vertex | Vertex color. |
| Weight | |
| Texture3D | 3D view (projection painting). |
| Texture2D | Image space (2D painting). |
| GPencil | |
| VertexGPencil | |
| SculptGPencil | |
| WeightGPencil | |
| SculptCurves | |
| Invalid | Keep last. |
Definition at line 93 of file BKE_paint.hh.
| bool BKE_object_sculpt_use_dyntopo | ( | const Object * | object | ) |
| bool BKE_paint_always_hide_test | ( | const Object * | ob | ) |
Checks if face/vertex hiding is always applied in the current mode. Returns true in vertex/weight paint.
Definition at line 1630 of file paint.cc.
References Object::data, Object::mode, OB_MESH, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, and Object::type.
Referenced by face_vert_reveal_poll().
| void BKE_paint_blend_read_data | ( | BlendDataReader * | reader, |
| const Scene * | scene, | ||
| Paint * | paint ) |
Definition at line 1941 of file paint.cc.
References ToolSystemBrushBindings::active_brush_per_brush_type, BKE_asset_weak_reference_read(), BKE_curvemapping_blend_read(), BKE_paint_cavity_curve_preset(), BLO_read_string(), BLO_read_struct, BLO_read_struct_list, Paint::brush_asset_reference, Paint::cavity_curve, CURVE_PRESET_LINE, Paint::eraser_brush_asset_reference, LISTBASE_FOREACH, ToolSystemBrushBindings::main_brush_asset_reference, Paint::paint_cursor, paint_runtime_init(), Paint::tool_brush_bindings, and Scene::toolsettings.
Referenced by direct_link_paint_helper(), and scene_blend_read_data().
| void BKE_paint_blend_write | ( | BlendWriter * | writer, |
| Paint * | paint ) |
Definition at line 1909 of file paint.cc.
References ToolSystemBrushBindings::active_brush_per_brush_type, BKE_asset_weak_reference_write(), BKE_curvemapping_blend_write(), BLO_write_string(), BLO_write_struct_list, Paint::brush_asset_reference, Paint::cavity_curve, Paint::eraser_brush_asset_reference, LISTBASE_FOREACH, ToolSystemBrushBindings::main_brush_asset_reference, and Paint::tool_brush_bindings.
Referenced by scene_blend_write().
Definition at line 636 of file paint.cc.
References Paint::brush.
Referenced by BKE_paint_brushes_validate(), BKE_paint_invalidate_cursor_overlay(), BKE_paint_invalidate_overlay_tex(), blender::ed::sculpt_paint::brush_asset_delete_exec(), blender::ed::sculpt_paint::brush_asset_delete_invoke(), blender::ed::sculpt_paint::brush_asset_delete_poll(), blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_edit_metadata_poll(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::brush_asset_revert_poll(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_as_poll(), blender::ed::sculpt_paint::brush_asset_save_exec(), blender::ed::sculpt_paint::brush_asset_save_poll(), brush_colors_flip_exec(), brush_curve_preset_exec(), brush_curve_preset_poll(), blender::ed::sculpt_paint::brush_exit_tex(), brush_scale_size_exec(), brush_sculpt_curves_falloff_preset_exec(), brush_sculpt_curves_falloff_preset_poll(), blender::ed::sculpt_paint::brush_tool_get(), buttons_context_path_brush(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::trim::calculate_depth(), blender::ed::transform::calculateCenterActive(), blender::ed::transform::createTransPaintCurveVerts(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), ED_paint_proj_mesh_data_check(), ED_space_image_paint_curve(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ui::greasepencil::eyedropper_set_brush_color(), blender::ed::transform::flushTransPaintCurve(), blender::ed::sculpt_paint::GreasePencilFillOpData::from_context(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::grease_pencil_fill_init(), blender::ed::sculpt_paint::grease_pencil_fill_invoke(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), image_paint_brush(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_stroke(), blender::ed::transform::initTransInfo(), is_brush_related_tool(), blender::ed::greasepencil::keymap_grease_pencil_brush_stroke_poll(), blender::ed::greasepencil::keymap_grease_pencil_fill_tool_poll(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::new_selection_paint_operation(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), over_mesh(), paint_2d_new_stroke(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::paint_cursor_update_pixel_radius(), paint_curve_poll(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), paint_proj_new_stroke(), paint_sample_color(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), paint_weight_gradient_exec(), paintcurve_delete_point_exec(), paintcurve_new_exec(), paintcurve_point_add(), paintcurve_point_select(), paintcurve_slide_invoke(), paintcurve_undosys_poll(), paintcurve_undosys_step_encode(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::PaintOperationExecutor(), project_state_init(), sample_color_exec(), blender::ed::sculpt_paint::sample_color_invoke(), sample_color_invoke(), sample_color_modal(), blender::ed::sculpt_paint::sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), blender::ed::sculpt_paint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on(), stencil_control_invoke(), stencil_control_poll(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), blender::ed::sculpt_paint::stroke_done(), blender::ed::sculpt_paint::stroke_get_location_bvh(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), blender::ed::sculpt_paint::stroke_test_start(), blender::ed::greasepencil::stroke_trim_execute(), texture_get_from_context(), blender::ed::sculpt_paint::image::ops::paint::texture_paint_init(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on(), blender::ed::greasepencil::toggle_weight_tool_direction_exec(), blender::ed::greasepencil::toggle_weight_tool_direction_poll(), ui_do_but_COLOR(), blender::ed::sculpt_paint::vwpaint::update_cache_invariants(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), vertex_paint_poll_ex(), vpaint_stroke_test_start(), vpaint_stroke_update_step(), weight_paint_poll_ex(), weight_paint_set_exec(), blender::ed::greasepencil::weight_sample_invoke(), weight_sample_invoke(), wpaint_do_symmetrical_brush_actions(), wpaint_stroke_test_start(), and wpaint_stroke_update_step().
Definition at line 641 of file paint.cc.
References Paint::brush.
Referenced by blender::draw::overlay::MeshUVs::begin_sync(), brush_init_tex(), brush_strength(), brush_stroke_init(), blender::ed::sculpt_paint::vwpaint::brush_use_accumulate(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::expand::cache_initial_config_set(), blender::ed::sculpt_paint::calc_sculpt_normal(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_strips_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_displacement_eraser_brush(), blender::ed::sculpt_paint::brushes::do_displacement_smear_brush(), blender::ed::sculpt_paint::brushes::do_draw_brush(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_draw_sharp_brush(), blender::ed::sculpt_paint::brushes::do_draw_vector_displacement_brush(), blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), blender::ed::sculpt_paint::brushes::do_inflate_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::brushes::do_relax_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_rotate_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_snake_hook_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), blender::ed::sculpt_paint::brushes::do_thumb_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_draw_operator_invoke(), blender::ed::sculpt_paint::grease_pencil_sculpt_paint_invoke(), blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_invoke(), blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_invoke(), image_paint_brush_uses_canvas(), blender::ed::sculpt_paint::auto_mask::init_face_sets_masking(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_poll(), blender::ed::sculpt_paint::new_grow_shrink_operation(), blender::ed::sculpt_paint::new_pinch_operation(), blender::ed::sculpt_paint::brushes::offset_positions(), paint_and_tex_color_alpha_intern(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), palette_color_add_exec(), blender::ed::sculpt_paint::undo::restore_from_undo_step(), restore_from_undo_step_if_necessary(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), blender::ed::sculpt_paint::sculpt_brush_stroke_cancel(), sculpt_brush_type_name(), blender::ed::sculpt_paint::cloth::sculpt_cloth_ensure_constraints_in_simulation_area(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), SCULPT_do_paint_brush_image(), blender::ed::sculpt_paint::sculpt_fix_noise_tear(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::start_brush_operation(), stroke_undo_begin(), blender::ed::sculpt_paint::stroke_update_step(), update_brush_local_mat(), blender::ed::sculpt_paint::update_modal_transform(), blender::ed::sculpt_paint::update_sculpt_normal(), blender::ed::sculpt_paint::use_add_density_mode(), blender::ed::sculpt_paint::vwpaint::use_normal(), vpaint_blend(), vpaint_do_symmetrical_brush_actions(), vpaint_get_current_col(), wpaint_blend(), and wpaint_stroke_test_start().
| Brush * BKE_paint_brush_from_essentials | ( | Main * | bmain, |
| eObjectMode | ob_mode, | ||
| const char * | name ) |
Definition at line 776 of file paint.cc.
References blender::bke::asset_edit_id_from_weak_reference(), ID_BR, and paint_brush_asset_reference_from_essentials().
Referenced by blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended().
Check if brush brush may be set/activated for paint. Passing null for brush will return true.
Definition at line 646 of file paint.cc.
References Brush::ob_mode, Paint_Runtime::ob_mode, and Paint::runtime.
Referenced by BKE_paint_brush_set(), BKE_paint_brush_set(), and WM_toolsystem_activate_brush_and_tool().
| bool BKE_paint_brush_set | ( | Main * | bmain, |
| Paint * | paint, | ||
| const AssetWeakReference * | brush_asset_reference ) |
Version of BKE_paint_brush_set() that takes an asset reference instead of a brush, importing the brush if necessary.
Definition at line 665 of file paint.cc.
References blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_is_editable(), blender::bke::asset_edit_weak_reference_from_id(), BKE_paint_brush_poll(), BLI_assert, Paint::brush, Paint::brush_asset_reference, Brush::id, ID_BR, ID_IS_LINKED, and Main::is_locked_for_linking.
Referenced by BKE_paint_brushes_validate().
Activates brush for painting, and updates Paint.brush_asset_reference so the brush can be restored after file read. No change is done if BKE_paint_brush_poll() returns false.
Definition at line 701 of file paint.cc.
References asset_reference_create_from_brush(), BKE_paint_brush_poll(), Paint::brush, and Paint::brush_asset_reference.
Referenced by blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on(), toolsystem_brush_activate_from_toolref_for_object_paint(), and WM_toolsystem_activate_brush_and_tool().
Definition at line 1083 of file paint.cc.
References paint_brush_set_default_reference(), and paint_brush_update_from_asset_reference().
Referenced by BKE_paint_brushes_ensure(), BKE_paint_brushes_validate(), blender::ed::sculpt_paint::brush_asset_delete_exec(), and blender::ed::sculpt_paint::brush_asset_revert_exec().
Definition at line 1089 of file paint.cc.
References paint_brush_set_essentials_reference(), and paint_brush_update_from_asset_reference().
Referenced by blender::ed::sculpt_paint::smooth_brush_toggle_on(), and blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on().
| std::optional< AssetWeakReference > BKE_paint_brush_type_default_reference | ( | eObjectMode | ob_mode, |
| std::optional< int > | brush_type ) |
Definition at line 1017 of file paint.cc.
References blender::StringRefNull::c_str(), blender::StringRefBase::is_empty(), paint_brush_asset_reference_from_essentials(), and paint_brush_default_essentials_name_get().
Referenced by toolsystem_brush_activate_from_toolref_for_object_paint().
Make sure the active brush asset is available as active brush, importing it if necessary. If there is no user set active brush, the default one is used/imported from the essentials asset library.
It's good to avoid this until the user actually shows intentions to use brushes, to avoid unused brushes in files. E.g. use this when entering a paint mode, but not for versioning.
Also handles the active eraser brush asset.
Definition at line 1752 of file paint.cc.
References BKE_paint_brush_set_default(), BKE_paint_eraser_brush_set_default(), Paint::brush, Paint::brush_asset_reference, Paint::eraser_brush, Paint::eraser_brush_asset_reference, paint_brush_update_from_asset_reference(), and paint_eraser_brush_set_from_asset_reference().
Referenced by BKE_paint_init(), BKE_sculpt_toolsettings_data_ensure(), blender::ed::sculpt_paint::curves_sculptmode_enter(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), and blender::ed::greasepencil::vertexmode_toggle_exec().
| void BKE_paint_brushes_set_default_references | ( | ToolSettings * | ts | ) |
Definition at line 1054 of file paint.cc.
References ToolSettings::curves_sculpt, ToolSettings::gp_paint, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, CurvesSculpt::paint, GpPaint::paint, GpSculptPaint::paint, GpVertexPaint::paint, GpWeightPaint::paint, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, paint_brush_set_default_reference(), ToolSettings::sculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by update_paint_modes_for_brush_assets().
Definition at line 1109 of file paint.cc.
References BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_brush_set_default(), BKE_paint_eraser_brush(), BKE_paint_eraser_brush_set(), BKE_paint_eraser_brush_set_default(), Brush::ob_mode, Paint_Runtime::ob_mode, and Paint::runtime.
Referenced by ED_object_texture_paint_mode_enter_ex(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::sculpt_paint::sculpt_mode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), blender::ed::greasepencil::vertexmode_toggle_exec(), vpaint_mode_toggle_exec(), blender::ed::greasepencil::weightmode_toggle_exec(), and wpaint_mode_toggle_exec().
| bool BKE_paint_canvas_image_get | ( | PaintModeSettings * | settings, |
| Object * | ob, | ||
| Image ** | r_image, | ||
| ImageUser ** | r_image_user ) |
Definition at line 43 of file blenkernel/intern/paint_canvas.cc.
References PaintModeSettings::canvas_image, PaintModeSettings::canvas_source, blender::bke::paint::canvas::get_active_slot(), TexPaintSlot::ima, PaintModeSettings::image_user, TexPaintSlot::image_user, PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE, PAINT_CANVAS_SOURCE_IMAGE, and PAINT_CANVAS_SOURCE_MATERIAL.
Referenced by BKE_paint_canvas_key_get(), blender::ed::sculpt_paint::paint::image::ImageData::init_active_image(), and SCULPT_use_image_paint_brush().
| char * BKE_paint_canvas_key_get | ( | PaintModeSettings * | settings, |
| Object * | ob ) |
Create a key that can be used to compare with previous ones to identify changes. The resulting 'string' is owned by the caller.
Definition at line 110 of file blenkernel/intern/paint_canvas.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_paint_canvas_image_get(), BKE_paint_canvas_uvmap_layer_index_get(), BLI_strdup(), LISTBASE_FOREACH, ImageUser::tile, ImBuf::x, and ImBuf::y.
Referenced by sculpt_update_object().
| int BKE_paint_canvas_uvmap_layer_index_get | ( | const PaintModeSettings * | settings, |
| Object * | ob ) |
Definition at line 74 of file blenkernel/intern/paint_canvas.cc.
References PaintModeSettings::canvas_source, CD_PROP_FLOAT2, CustomData_get_active_layer_index(), CustomData_get_named_layer_index(), Object::data, blender::bke::paint::canvas::get_active_slot(), OB_MESH, PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE, PAINT_CANVAS_SOURCE_IMAGE, PAINT_CANVAS_SOURCE_MATERIAL, Object::type, and TexPaintSlot::uvname.
Referenced by BKE_paint_canvas_key_get().
| void BKE_paint_cavity_curve_preset | ( | Paint * | paint, |
| int | preset ) |
Definition at line 1636 of file paint.cc.
References BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_changed(), Paint::cavity_curve, CurveMapping::clipr, CurveMapping::cm, CUMA_EXTEND_EXTRAPOLATE, CURVEMAP_SLOPE_POSITIVE, CurveMapping::flag, and CurveMapping::preset.
Referenced by BKE_paint_blend_read_data(), and BKE_paint_init().
Called when copying scene settings, so even if 'src' and 'tar' are the same still do a id_us_plus(), rather than if we were copying between 2 existing scenes where a matching value should decrease the existing user count as with #paint_brush_set()
Definition at line 1809 of file paint.cc.
References ToolSystemBrushBindings::active_brush_per_brush_type, BKE_curvemapping_copy(), BLI_duplicatelist(), BLI_strdup(), Paint::brush, Paint::brush_asset_reference, Paint::cavity_curve, Paint::eraser_brush_asset_reference, flag, id_us_plus(), LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, ToolSystemBrushBindings::main_brush_asset_reference, Paint::palette, and Paint::tool_brush_bindings.
Referenced by BKE_toolsettings_copy().
| PaintCurve * BKE_paint_curve_add | ( | Main * | bmain, |
| const char * | name ) |
Definition at line 1337 of file paint.cc.
References BKE_id_new().
Referenced by paintcurve_for_brush_add().
| void BKE_paint_curve_clamp_endpoint_add_index | ( | PaintCurve * | pc, |
| int | add_index ) |
Definition at line 1357 of file paint.cc.
References PaintCurve::add_index, and PaintCurve::tot_points.
Referenced by paintcurve_delete_point_exec(), paintcurve_point_add(), paintcurve_point_select(), and paintcurve_slide_invoke().
| CurveMapping * BKE_paint_default_curve | ( | ) |
Definition at line 140 of file scene.cc.
References BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_init(), CurveMapping::clipr, CurveMapping::cm, CURVE_PRESET_LINE, and CURVEMAP_SLOPE_POSITIVE.
Referenced by blo_update_defaults_scene(), brush_blend_read_data(), do_init_default_jitter_curves_in_unified_paint_settings(), and scene_init_data().
| bool BKE_paint_ensure | ( | ToolSettings * | ts, |
| Paint ** | r_paint ) |
Call when entering each respective paint mode.
Definition at line 1675 of file paint.cc.
References BLI_assert, ToolSettings::curves_sculpt, data, DNA_struct_default_get, ELEM, Paint::flags, ToolSettings::gp_paint, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, MEM_callocN(), Paint_Runtime::ob_mode, ImagePaintSettings::paint, paint_runtime_init(), PAINT_SHOW_BRUSH, Paint::runtime, ToolSettings::sculpt, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_paint_ensure_from_paintmode(), BKE_sculpt_toolsettings_data_ensure(), blender::ed::sculpt_paint::curves_sculptmode_enter(), blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), blender::ed::greasepencil::vertexmode_toggle_exec(), and blender::ed::greasepencil::weightmode_toggle_exec().
Definition at line 317 of file paint.cc.
References BKE_paint_ensure(), ToolSettings::curves_sculpt, ToolSettings::gp_paint, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, GPencil, ToolSettings::imapaint, Invalid, Sculpt, ToolSettings::sculpt, SculptCurves, SculptGPencil, Texture2D, Texture3D, Scene::toolsettings, Vertex, VertexGPencil, ToolSettings::vpaint, Weight, WeightGPencil, and ToolSettings::wpaint.
Referenced by BKE_paint_init(), BLO_update_defaults_startup_blend(), do_versions_after_linking_280(), and toolsystem_brush_activate_from_toolref_for_object_paint().
Definition at line 1156 of file paint.cc.
References Paint::eraser_brush.
Referenced by BKE_paint_brushes_validate(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), and blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_begin().
Definition at line 1161 of file paint.cc.
References Paint::eraser_brush.
| Brush * BKE_paint_eraser_brush_from_essentials | ( | Main * | bmain, |
| eObjectMode | ob_mode, | ||
| const char * | name ) |
Definition at line 1191 of file paint.cc.
References blender::bke::asset_edit_id_from_weak_reference(), ID_BR, and paint_brush_asset_reference_from_essentials().
Definition at line 1166 of file paint.cc.
References blender::bke::asset_edit_weak_reference_from_id(), Paint::eraser_brush, Paint::eraser_brush_asset_reference, Brush::id, Brush::ob_mode, Paint_Runtime::ob_mode, and Paint::runtime.
Referenced by BKE_paint_brushes_validate().
Definition at line 1203 of file paint.cc.
References paint_brush_set_default_reference(), and paint_eraser_brush_set_from_asset_reference().
Referenced by BKE_paint_brushes_ensure(), and BKE_paint_brushes_validate().
Definition at line 1209 of file paint.cc.
References paint_eraser_brush_set_essentials_reference(), and paint_eraser_brush_set_from_asset_reference().
| void BKE_paint_face_set_overlay_color_get | ( | int | face_set, |
| int | seed, | ||
| uchar | r_color[4] ) |
Definition at line 2952 of file paint.cc.
References BLI_hash_int_01(), floorf, GOLDEN_RATIO_CONJUGATE, hsv_to_rgb(), rgba_float_to_uchar(), and seed.
Referenced by blender::draw::extract_sculpt_data_subdiv(), blender::draw::pbvh::fill_face_sets_grids(), blender::draw::pbvh::update_face_sets_bmesh(), and blender::draw::pbvh::update_face_sets_mesh().
| void BKE_paint_free | ( | Paint * | paint | ) |
Definition at line 1791 of file paint.cc.
References ToolSystemBrushBindings::active_brush_per_brush_type, BKE_curvemapping_free(), Paint::brush_asset_reference, Paint::cavity_curve, Paint::eraser_brush_asset_reference, LISTBASE_FOREACH_MUTABLE, ToolSystemBrushBindings::main_brush_asset_reference, Paint_Runtime::previous_active_brush_reference, Paint::runtime, and Paint::tool_brush_bindings.
Referenced by BKE_toolsettings_free().
Definition at line 428 of file paint.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), ToolSettings::curves_sculpt, ToolSettings::gp_paint, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, ToolSettings::imapaint, Object::mode, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, CurvesSculpt::paint, GpPaint::paint, GpSculptPaint::paint, GpVertexPaint::paint, GpWeightPaint::paint, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, ToolSettings::sculpt, Scene::toolsettings, ToolSettings::vpaint, and ToolSettings::wpaint.
Referenced by BKE_paint_get_active_from_context(), BKE_paint_invalidate_cursor_overlay(), BKE_paint_invalidate_overlay_tex(), buttons_context_path_brush(), and blender::ed::transform::calculateCenterActive().
Definition at line 467 of file paint.cc.
References BKE_paint_get_active(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), ToolSettings::imapaint, Object::mode, SpaceImage::mode, OB_MODE_EDIT, ImagePaintSettings::paint, SI_MODE_PAINT, and Scene::toolsettings.
Referenced by blender::ed::sculpt_paint::brush_asset_activate_exec(), blender::ed::sculpt_paint::brush_asset_delete_exec(), blender::ed::sculpt_paint::brush_asset_delete_invoke(), blender::ed::sculpt_paint::brush_asset_delete_poll(), blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_edit_metadata_invoke(), blender::ed::sculpt_paint::brush_asset_edit_metadata_poll(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::brush_asset_revert_poll(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_as_invoke(), blender::ed::sculpt_paint::brush_asset_save_as_poll(), blender::ed::sculpt_paint::brush_asset_save_exec(), blender::ed::sculpt_paint::brush_asset_save_poll(), brush_colors_flip_exec(), brush_curve_preset_exec(), brush_curve_preset_poll(), brush_scale_size_exec(), brush_sculpt_curves_falloff_preset_exec(), brush_sculpt_curves_falloff_preset_poll(), blender::ed::sculpt_paint::brush_tool_get(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::expand::cache_initial_config_set(), blender::ed::transform::createTransPaintCurveVerts(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::transform::flushTransPaintCurve(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_draw_operator_invoke(), blender::ed::sculpt_paint::grease_pencil_sculpt_paint_invoke(), blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_invoke(), image_paint_brush_uses_canvas(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_stroke(), blender::ed::transform::initTransInfo(), is_brush_related_tool(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), paint_2d_new_stroke(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_cursor_context_init(), paint_curve_poll(), blender::ed::sculpt_paint::paint_draw_line_cursor(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), paint_sample_color(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), paintcurve_delete_point_exec(), paintcurve_new_exec(), paintcurve_point_add(), paintcurve_point_select(), paintcurve_slide_invoke(), paintcurve_undosys_poll(), paintcurve_undosys_step_encode(), palette_color_add_exec(), palette_color_delete_exec(), palette_color_move_exec(), palette_join_exec(), palette_new_exec(), palette_poll(), palette_sort_exec(), project_state_init(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), blender::draw::sculpt_batches_get_ex(), stencil_control_invoke(), stencil_control_poll(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), blender::ed::sculpt_paint::stroke_get_location_bvh(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), blender::ed::greasepencil::stroke_trim_execute(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on(), blender::ed::greasepencil::toggle_weight_tool_direction_exec(), blender::ed::greasepencil::toggle_weight_tool_direction_poll(), ui_do_but_COLOR(), and blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn().
Definition at line 365 of file paint.cc.
References ToolSettings::curves_sculpt, ToolSettings::gp_paint, ToolSettings::gp_sculptpaint, ToolSettings::gp_vertexpaint, ToolSettings::gp_weightpaint, GPencil, ToolSettings::imapaint, Invalid, CurvesSculpt::paint, GpPaint::paint, GpSculptPaint::paint, GpVertexPaint::paint, GpWeightPaint::paint, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, Sculpt, ToolSettings::sculpt, SculptCurves, SculptGPencil, Texture2D, Texture3D, Scene::toolsettings, Vertex, VertexGPencil, ToolSettings::vpaint, Weight, WeightGPencil, and ToolSettings::wpaint.
Referenced by BKE_paint_init(), blender::ed::sculpt_paint::curves_sculptmode_enter(), blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), blender::ed::greasepencil::sculptmode_toggle_exec(), toolsystem_brush_activate_from_toolref_for_object_paint(), toolsystem_brush_clear_paint_reference(), blender::ed::greasepencil::vertexmode_toggle_exec(), and blender::ed::greasepencil::weightmode_toggle_exec().
| std::optional< int > BKE_paint_get_brush_type_from_obmode | ( | const Brush * | brush, |
| eObjectMode | ob_mode ) |
Definition at line 1280 of file paint.cc.
References Brush::curves_sculpt_brush_type, Brush::gpencil_brush_type, Brush::gpencil_sculpt_brush_type, Brush::gpencil_vertex_brush_type, Brush::gpencil_weight_brush_type, Brush::image_brush_type, OB_MODE_EDIT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, Brush::sculpt_brush_type, Brush::vertex_brush_type, and Brush::weight_brush_type.
Referenced by brush_asset_metadata_ensure().
| std::optional< int > BKE_paint_get_brush_type_from_paintmode | ( | const Brush * | brush, |
| PaintMode | mode ) |
Definition at line 1308 of file paint.cc.
References Brush::curves_sculpt_brush_type, GPencil, Brush::gpencil_brush_type, Brush::gpencil_sculpt_brush_type, Brush::gpencil_vertex_brush_type, Brush::gpencil_weight_brush_type, Brush::image_brush_type, Invalid, Sculpt, Brush::sculpt_brush_type, SculptCurves, SculptGPencil, Texture2D, Texture3D, Vertex, Brush::vertex_brush_type, VertexGPencil, Weight, Brush::weight_brush_type, and WeightGPencil.
Referenced by WM_toolsystem_activate_brush_and_tool().
Definition at line 1252 of file paint.cc.
References GPencil, Invalid, offsetof, Sculpt, SculptCurves, SculptGPencil, Texture2D, Texture3D, Vertex, VertexGPencil, Weight, and WeightGPencil.
| ePaintOverlayControlFlags BKE_paint_get_overlay_flags | ( | ) |
Definition at line 289 of file paint.cc.
References overlay_flags.
Referenced by blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), and blender::ed::sculpt_paint::paint_draw_alpha_overlay().
| const EnumPropertyItem * BKE_paint_get_tool_enum_from_paintmode | ( | PaintMode | mode | ) |
Definition at line 400 of file paint.cc.
References GPencil, Invalid, rna_enum_brush_curves_sculpt_brush_type_items, rna_enum_brush_gpencil_sculpt_types_items, rna_enum_brush_gpencil_types_items, rna_enum_brush_gpencil_vertex_types_items, rna_enum_brush_gpencil_weight_types_items, rna_enum_brush_image_brush_type_items, rna_enum_brush_sculpt_brush_type_items, rna_enum_brush_vertex_brush_type_items, rna_enum_brush_weight_brush_type_items, Sculpt, SculptCurves, SculptGPencil, Texture2D, Texture3D, Vertex, VertexGPencil, Weight, and WeightGPencil.
Referenced by brush_type_identifier_get().
| void BKE_paint_init | ( | Main * | bmain, |
| Scene * | sce, | ||
| PaintMode | mode, | ||
| const uchar | col[3], | ||
| bool | ensure_brushes = true ) |
| ensure_brushes | Call BKE_paint_brushes_ensure(). |
Definition at line 1769 of file paint.cc.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_paint_brushes_ensure(), BKE_paint_cavity_curve_preset(), BKE_paint_ensure_from_paintmode(), BKE_paint_get_active_from_paintmode(), Paint::cavity_curve, col, copy_v3_v3_uchar(), CURVE_PRESET_LINE, UnifiedPaintSettings::last_stroke_valid, Paint::paint_cursor_col, Scene::toolsettings, ToolSettings::unified_paint_settings, and zero_v3().
Referenced by ED_object_texture_paint_mode_enter_ex(), ED_space_image_paint_update(), blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), and blender::ed::greasepencil::weightmode_toggle_exec().
| void BKE_paint_invalidate_cursor_overlay | ( | Scene * | scene, |
| ViewLayer * | view_layer, | ||
| CurveMapping * | curve ) |
Definition at line 270 of file paint.cc.
References BKE_paint_brush(), BKE_paint_get_active(), Brush::curve, overlay_flags, and PAINT_OVERLAY_INVALID_CURVE.
Referenced by brush_curve_preset_exec(), and ui_do_but_CURVE().
| void BKE_paint_invalidate_overlay_all | ( | ) |
Definition at line 283 of file paint.cc.
References overlay_flags, PAINT_OVERLAY_INVALID_CURVE, PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY, and PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY.
Referenced by ED_paint_cursor_start(), and paint_cursor_delete_textures().
Definition at line 250 of file paint.cc.
References BKE_paint_brush(), BKE_paint_get_active(), Brush::mask_mtex, Brush::mtex, overlay_flags, PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY, PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY, and MTex::tex.
Referenced by texture_changed().
| eObjectMode BKE_paint_object_mode_from_paintmode | ( | PaintMode | mode | ) |
Definition at line 1653 of file paint.cc.
References GPencil, Invalid, OB_MODE_OBJECT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Sculpt, SculptCurves, Texture2D, Texture3D, Vertex, and Weight.
Definition at line 1343 of file paint.cc.
References Paint::palette.
Referenced by paint_sample_color().
Definition at line 1348 of file paint.cc.
References id_us_min(), id_us_plus(), and Paint::palette.
Referenced by BKE_gpencil_palette_ensure(), blender::ui::greasepencil::eyedropper_add_palette_color(), paint_sample_color(), and palette_new_exec().
| void BKE_paint_previous_asset_reference_clear | ( | Paint * | paint | ) |
Definition at line 1104 of file paint.cc.
References Paint_Runtime::previous_active_brush_reference, and Paint::runtime.
Referenced by blender::ed::sculpt_paint::brush_asset_activate_exec(), and toolsystem_brush_clear_paint_reference().
| void BKE_paint_previous_asset_reference_set | ( | Paint * | paint, |
| AssetWeakReference && | asset_weak_reference ) |
Definition at line 1095 of file paint.cc.
References Paint_Runtime::previous_active_brush_reference, and Paint::runtime.
Referenced by blender::ed::sculpt_paint::brush_asset_activate_exec().
| blender::float3 BKE_paint_randomize_color | ( | const BrushColorJitterSettings & | color_jitter, |
| const blender::float3 & | initial_hsv_jitter, | ||
| const float | distance, | ||
| const float | pressure, | ||
| const blender::float3 & | color ) |
Definition at line 1853 of file paint.cc.
References BKE_curvemapping_evaluateF(), BRUSH_COLOR_JITTER_USE_HUE_AT_STROKE, BRUSH_COLOR_JITTER_USE_HUE_RAND_PRESS, BRUSH_COLOR_JITTER_USE_SAT_AT_STROKE, BRUSH_COLOR_JITTER_USE_SAT_RAND_PRESS, BRUSH_COLOR_JITTER_USE_VAL_AT_STROKE, BRUSH_COLOR_JITTER_USE_VAL_RAND_PRESS, BrushColorJitterSettings::curve_hue_jitter, BrushColorJitterSettings::curve_sat_jitter, BrushColorJitterSettings::curve_val_jitter, distance(), BrushColorJitterSettings::flag, hsv_to_rgb_v(), BrushColorJitterSettings::hue, blender::math::interpolate(), blender::noise::perlin(), rgb_to_hsv_v(), BrushColorJitterSettings::saturation, and BrushColorJitterSettings::value.
Referenced by blender::ed::sculpt_paint::color::do_paint_brush_task(), get_brush_color(), paint_brush_color_get(), and blender::ed::greasepencil::randomize_color().
| void BKE_paint_reset_overlay_invalid | ( | ePaintOverlayControlFlags | flag | ) |
Definition at line 312 of file paint.cc.
References flag, and overlay_flags.
Referenced by blender::ed::sculpt_paint::load_tex(), and blender::ed::sculpt_paint::load_tex_cursor().
| bool BKE_paint_select_elem_test | ( | const Object * | ob | ) |
used to check if selection is possible (when we don't care if its face or vert)
Definition at line 1624 of file paint.cc.
References BKE_paint_select_face_test(), BKE_paint_select_grease_pencil_test(), and BKE_paint_select_vert_test().
Referenced by face_vert_reveal_poll(), mask_paint_poll(), view3d_circle_select_exec(), view3d_select_exec(), and view3d_selectable_data().
| bool BKE_paint_select_face_test | ( | const Object * | ob | ) |
Return true when in vertex/weight/texture paint + face-select mode?
Definition at line 1599 of file paint.cc.
References Object::data, ME_EDIT_PAINT_FACE_SEL, Object::mode, OB_MESH, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, and Object::type.
Referenced by BKE_paint_select_elem_test(), facemask_paint_poll(), blender::bke::object_get_datamask(), validate_object_select_id(), view3d_box_select_exec(), view3d_calc_minmax_selected(), view3d_circle_select_exec(), view3d_lasso_select(), and view3d_select_exec().
| bool BKE_paint_select_grease_pencil_test | ( | const Object * | ob | ) |
Return true when in grease pencil sculpt mode.
Definition at line 1613 of file paint.cc.
References Object::data, Object::mode, OB_GREASE_PENCIL, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_VERTEX_GREASE_PENCIL, and Object::type.
Referenced by BKE_paint_select_elem_test(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), and view3d_select_exec().
| bool BKE_paint_select_vert_test | ( | const Object * | ob | ) |
Return true when in vertex/weight paint + vertex-select mode?
Definition at line 1606 of file paint.cc.
References Object::data, ME_EDIT_PAINT_VERT_SEL, Object::mode, OB_MESH, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, and Object::type.
Referenced by BKE_paint_select_elem_test(), face_vert_reveal_exec(), vert_paint_poll(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), and view3d_select_exec().
| void BKE_paint_set_overlay_override | ( | eOverlayFlags | flag | ) |
Definition at line 294 of file paint.cc.
References BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE, BRUSH_OVERLAY_OVERRIDE_MASK, BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE, BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE, overlay_flags, PAINT_OVERLAY_OVERRIDE_CURSOR, PAINT_OVERLAY_OVERRIDE_PRIMARY, PAINT_OVERLAY_OVERRIDE_SECONDARY, and PAINT_OVERRIDE_MASK.
Referenced by blender::ed::sculpt_paint::paint_stroke_free(), and blender::ed::sculpt_paint::paint_stroke_new().
Definition at line 1841 of file paint.cc.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, copy_v3_v3(), UnifiedPaintSettings::last_stroke_valid, mul_v3_v3fl(), Scene::toolsettings, and ToolSettings::unified_paint_settings.
Referenced by view3d_calc_minmax_selected(), and view3d_orbit_calc_center().
| bool BKE_paint_use_unified_color | ( | const ToolSettings * | tool_settings, |
| const Paint * | paint ) |
Definition at line 592 of file paint.cc.
References UnifiedPaintSettings::flag, Paint_Runtime::ob_mode, OB_MODE_PAINT_GREASE_PENCIL, Paint::runtime, UNIFIED_PAINT_COLOR, and ToolSettings::unified_paint_settings.
Referenced by BKE_brush_color_get(), BKE_brush_color_jitter_get_settings(), BKE_brush_color_set(), BKE_brush_secondary_color_get(), and brush_colors_flip_exec().
Definition at line 496 of file paint.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), GPencil, Invalid, Object::mode, SpaceImage::mode, OB_GREASE_PENCIL, OB_MODE_EDIT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, Sculpt, SculptCurves, SculptGPencil, SI_MODE_PAINT, Texture2D, Texture3D, Object::type, Vertex, VertexGPencil, Weight, and WeightGPencil.
Referenced by brush_type_matches_active_tool(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), image_undosys_step_encode(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::paint_stroke_curve_end(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), paintcurve_cursor_invoke(), paintcurve_draw_exec(), palette_color_add_exec(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), stencil_control_poll(), ui_apply_but_undo(), blender::ed::sculpt_paint::undo::use_multires_mesh(), and WM_toolsystem_activate_brush_and_tool().
Definition at line 552 of file paint.cc.
References CTX_MODE_PAINT_GPENCIL_LEGACY, CTX_MODE_PAINT_GREASE_PENCIL, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_MODE_SCULPT_GPENCIL_LEGACY, CTX_MODE_SCULPT_GREASE_PENCIL, CTX_MODE_VERTEX_GPENCIL_LEGACY, CTX_MODE_VERTEX_GREASE_PENCIL, CTX_MODE_WEIGHT_GPENCIL_LEGACY, CTX_MODE_WEIGHT_GREASE_PENCIL, GPencil, Invalid, bToolRef::mode, Sculpt, SculptCurves, SculptGPencil, SI_MODE_PAINT, SPACE_IMAGE, bToolRef::space_type, SPACE_VIEW3D, Texture2D, Texture3D, Vertex, VertexGPencil, Weight, and WeightGPencil.
Referenced by brush_type_matches_active_tool(), toolsystem_brush_activate_from_toolref_for_object_paint(), and toolsystem_brush_clear_paint_reference().
Definition at line 1384 of file paint.cc.
References BKE_id_new().
Referenced by BKE_gpencil_palette_ensure(), BKE_palette_from_hash(), blender::ui::greasepencil::eyedropper_add_palette_color(), paint_sample_color(), and palette_new_exec().
| void BKE_palette_clear | ( | Palette * | palette | ) |
Definition at line 1378 of file paint.cc.
References Palette::active_color, BLI_freelistN(), and Palette::colors.
| PaletteColor * BKE_palette_color_add | ( | Palette * | palette | ) |
Definition at line 1390 of file paint.cc.
References BLI_addtail(), Palette::colors, and MEM_callocN().
Referenced by BKE_gpencil_palette_ensure(), BKE_palette_from_hash(), blender::ui::greasepencil::eyedropper_add_palette_color(), paint_sample_color(), palette_color_add_exec(), palette_join_exec(), and palette_sort_exec().
| void BKE_palette_color_remove | ( | Palette * | palette, |
| PaletteColor * | color ) |
Remove color from palette. Must be certain color is inside the palette!
Definition at line 1362 of file paint.cc.
References Palette::active_color, BLI_listbase_count_at_most(), BLI_listbase_is_empty(), BLI_remlink(), Palette::colors, and MEM_freeN().
Referenced by palette_color_delete_exec(), palette_join_exec(), palette_sort_exec(), and ui_do_but_COLOR().
Definition at line 1537 of file paint.cc.
References b, BKE_palette_add(), BKE_palette_color_add(), BKE_palette_sort_hsv(), BLI_ghash_len(), BLI_ghashIterator_getValue(), col, copy_v3_v3(), cpack_to_rgb(), GHASH_ITER, tPaletteColorHSV::h, i, linearrgb_to_srgb_v3_v3(), MEM_calloc_arrayN(), MEM_SAFE_FREE, POINTER_AS_INT, PaletteColor::rgb, tPaletteColorHSV::rgb, rgb_to_hsv(), tPaletteColorHSV::s, tPaletteColorHSV::v, and v.
Referenced by palette_extract_img_exec().
| bool BKE_palette_is_empty | ( | const Palette * | palette | ) |
Definition at line 1397 of file paint.cc.
References BLI_listbase_is_empty(), and Palette::colors.
| void BKE_palette_sort_hsv | ( | tPaletteColorHSV * | color_array, |
| int | totcol ) |
Definition at line 1434 of file paint.cc.
References palettecolor_compare_hsv().
Referenced by BKE_palette_from_hash(), and palette_sort_exec().
| void BKE_palette_sort_luminance | ( | tPaletteColorHSV * | color_array, |
| int | totcol ) |
Definition at line 1531 of file paint.cc.
References palettecolor_compare_luminance().
Referenced by palette_sort_exec().
| void BKE_palette_sort_svh | ( | tPaletteColorHSV * | color_array, |
| int | totcol ) |
Definition at line 1471 of file paint.cc.
References palettecolor_compare_svh().
Referenced by palette_sort_exec().
| void BKE_palette_sort_vhs | ( | tPaletteColorHSV * | color_array, |
| int | totcol ) |
Definition at line 1508 of file paint.cc.
References palettecolor_compare_vhs().
Referenced by palette_sort_exec().
| void BKE_sculpt_cavity_curves_ensure | ( | Sculpt * | sd | ) |
Definition at line 2733 of file paint.cc.
References Sculpt::automasking_cavity_curve, Sculpt::automasking_cavity_curve_op, and BKE_sculpt_default_cavity_curve().
Referenced by BKE_sculpt_toolsettings_data_ensure(), and scene_blend_read_data().
| void BKE_sculpt_color_layer_create_if_needed | ( | Object * | object | ) |
Create new color layer on object if it doesn't have one and if experimental feature set has sculpt vertex color enabled. Returns truth if new layer has been added, false otherwise.
Definition at line 2633 of file paint.cc.
References Mesh::active_color_attribute, BKE_attribute_calc_unique_name(), BKE_color_attribute_supported(), BKE_id_attributes_active_color_set(), BKE_id_attributes_default_color_set(), BKE_mesh_tessface_clear(), BKE_object_get_original_mesh(), CD_PROP_COLOR, DEG_id_tag_update(), AttributeOwner::from_id(), Mesh::id, ID_RECALC_GEOMETRY_ALL_MODES, blender::bke::Point, and unique_name().
Referenced by brush_stroke_init(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), and blender::ed::sculpt_paint::expand::sculpt_expand_invoke().
| CurveMapping * BKE_sculpt_default_cavity_curve | ( | ) |
Definition at line 125 of file scene.cc.
References BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_changed(), BKE_curvemapping_init(), CurveMapping::clipr, CurveMapping::cm, CUMA_EXTEND_EXTRAPOLATE, CURVE_PRESET_LINE, CURVEMAP_SLOPE_POSITIVE, CurveMapping::flag, and CurveMapping::preset.
Referenced by BKE_sculpt_cavity_curves_ensure(), and brush_blend_read_data().
| void BKE_sculpt_mask_layers_ensure | ( | Depsgraph * | depsgraph, |
| Main * | bmain, | ||
| Object * | ob, | ||
| MultiresModifierData * | mmd ) |
Ensures a mask layer exists. If depsgraph and bmain are non-null, a mask doesn't exist and the object has a multi-resolution modifier then the scene depsgraph will be evaluated to update the runtime subdivision data.
Definition at line 2666 of file paint.cc.
References blender::bke::MutableAttributeAccessor::add(), BKE_ccg_gridsize(), BKE_scene_graph_evaluated_ensure(), CD_GRID_PAINT_MASK, CD_SET_DEFAULT, CustomData_add_layer(), CustomData_has_layer(), GridPaintMask::data, Object::data, DEG_id_tag_update(), depsgraph, blender::bke::mesh::face_corner_next(), blender::bke::mesh::face_corner_prev(), faces, i, Object::id, ID_RECALC_GEOMETRY, GridPaintMask::level, blender::bke::AttributeAccessor::lookup(), mask(), max_ii(), MEM_calloc_arrayN(), next, blender::bke::Point, MultiresModifierData::sculptlvl, IndexRange::size(), and blender::Span< T >::slice().
Referenced by blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::mask::init_operation(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::object::modifier_add(), blender::ed::object::multires_subdivide_exec(), blender::ed::sculpt_paint::sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().
| MultiresModifierData * BKE_sculpt_multires_active | ( | const Scene * | scene, |
| Object * | ob ) |
Sculpt mode handles multi-res differently from regular meshes, but only if it's the last modifier on the stack and it is not on the first level.
Definition at line 2373 of file paint.cc.
References sculpt_multires_modifier_get().
Referenced by blender::ed::sculpt_paint::color_supported_check(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::mask::init_operation(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::bke::mesh_calc_modifiers(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), blender::ed::sculpt_paint::object_sculpt_mode_exit(), blender::ed::sculpt_paint::undo::restore_list(), blender::ed::sculpt_paint::sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), and sculpt_modifiers_active().
Definition at line 2813 of file paint.cc.
References BKE_subdiv_ccg_grid_hidden_ensure(), BKE_subdiv_ccg_grid_hidden_free(), blender::bke::Face, faces, blender::VArrayCommon< T >::get_internal_single(), blender::VArrayCommon< T >::is_single(), blender::bke::AttributeAccessor::lookup_or_default(), and blender::threading::parallel_for().
Referenced by blender::bke::build_pbvh_from_ccg(), and blender::ed::sculpt_paint::hide::sync_all_from_faces().
Definition at line 2744 of file paint.cc.
References Sculpt::automasking_cavity_curve, Sculpt::automasking_cavity_curve_op, Sculpt::automasking_start_normal_falloff, Sculpt::automasking_start_normal_limit, Sculpt::automasking_view_normal_falloff, Sculpt::automasking_view_normal_limit, BKE_paint_brushes_ensure(), BKE_paint_ensure(), BKE_sculpt_cavity_curves_ensure(), Sculpt::constant_detail, Sculpt::detail_percent, Sculpt::detail_size, DNA_struct_default_get, Sculpt::paint, ToolSettings::sculpt, Paint::tile_offset, and Scene::toolsettings.
Referenced by blender::ed::sculpt_paint::init_sculpt_mode_session(), and blender::ed::sculpt_paint::vwpaint::init_session().
| void BKE_sculpt_update_object_after_eval | ( | Depsgraph * | depsgraph, |
| Object * | ob_eval ) |
Definition at line 2624 of file paint.cc.
References DEG_get_original(), depsgraph, and sculpt_update_object().
Referenced by blender::bke::mesh_build_data().
| void BKE_sculpt_update_object_before_eval | ( | Object * | ob_eval | ) |
Definition at line 2565 of file paint.cc.
References blender::bke::pbvh::all_leaf_nodes(), BKE_pbvh_node_mark_update(), BKE_sculptsession_free_deformMats(), BKE_sculptsession_free_pbvh(), BKE_sculptsession_free_vwpaint_data(), blender::bke::pbvh::BMesh, SculptSession::building_vp_handle, SculptSession::cache, DEG_get_original(), SculptSession::expand_cache, SculptSession::filter_cache, IndexMask::foreach_index(), blender::bke::pbvh::Grids, i, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), Object::sculpt, and blender::bke::pbvh::update_normals_from_eval().
Referenced by blender::bke::mesh_data_update().
| void BKE_sculpt_update_object_for_edit | ( | Depsgraph * | depsgraph, |
| Object * | ob_orig, | ||
| bool | is_paint_tool ) |
Definition at line 2657 of file paint.cc.
References BLI_assert, DEG_get_evaluated(), DEG_get_original(), depsgraph, and sculpt_update_object().
Referenced by blender::ed::sculpt_paint::undo::bmesh_restore(), brush_stroke_init(), blender::ed::sculpt_paint::face_set::change_visibility_exec(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_op_init(), blender::ed::sculpt_paint::face_set::edit_op_invoke(), blender::ed::sculpt_paint::geometry_preview_lines_update(), blender::ed::sculpt_paint::face_set::gesture_begin(), blender::ed::sculpt_paint::mask::gesture_begin(), blender::ed::sculpt_paint::project::gesture_begin(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::init_sculpt_mode_session(), blender::ed::sculpt_paint::vwpaint::init_session(), blender::ed::sculpt_paint::vwpaint::init_stroke(), blender::ed::sculpt_paint::init_transform(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_flood_fill_exec(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::ed::sculpt_paint::paint_cursor_preview_boundary_data_update(), blender::ed::sculpt_paint::undo::restore_active_shape_key(), blender::ed::sculpt_paint::undo::restore_list(), blender::ed::sculpt_paint::sample_color_invoke(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), SCULPT_stroke_modifiers_check(), blender::ed::sculpt_paint::set_persistent_base_exec(), blender::ed::sculpt_paint::set_pivot_position_exec(), transform_active_color(), blender::ed::sculpt_paint::update_modal_transform(), and vertex_color_set_exec().
| void BKE_sculptsession_bm_to_me | ( | Object * | ob, |
| bool | reorder ) |
Definition at line 2135 of file paint.cc.
References DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, Object::sculpt, and sculptsession_bm_to_me_update_data_only().
Referenced by BKE_sculptsession_free(), blender::ed::sculpt_paint::dyntopo::disable(), and ED_editors_flush_edits_for_object_ex().
| void BKE_sculptsession_bm_to_me_for_render | ( | Object * | object | ) |
Definition at line 2170 of file paint.cc.
References BKE_object_free_derived_caches(), SculptSession::bm, Object::sculpt, and sculptsession_bm_to_me_update_data_only().
Referenced by ED_editors_flush_edits_for_object_ex().
| void BKE_sculptsession_free | ( | Object * | ob | ) |
Definition at line 2192 of file paint.cc.
References BKE_sculptsession_bm_to_me(), BKE_sculptsession_free_pbvh(), SculptSession::bm, BM_mesh_free(), and Object::sculpt.
Referenced by blender::ed::sculpt_paint::init_sculpt_mode_session(), blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), blender::ed::sculpt_paint::vwpaint::mode_exit_generic(), object_free_data(), and blender::ed::sculpt_paint::object_sculpt_mode_exit().
| void BKE_sculptsession_free_deformMats | ( | SculptSession * | ss | ) |
Definition at line 2096 of file paint.cc.
References SculptSession::deform_cos, SculptSession::deform_imats, SculptSession::face_normals_deform, and SculptSession::vert_normals_deform.
Referenced by BKE_sculpt_update_object_before_eval(), blender::ed::sculpt_paint::undo::restore_list(), and sculpt_update_object().
| void BKE_sculptsession_free_pbvh | ( | Object & | object | ) |
Definition at line 2146 of file paint.cc.
References SculptVertexInfo::boundary, SculptSession::clear_active_elements(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::clear_and_shrink(), SculptSession::edge_to_face_indices, SculptSession::edge_to_face_map, SculptSession::edge_to_face_offsets, SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, SculptSession::pbvh, SculptSession::preview_verts, SculptSession::topology_island_cache, SculptSession::vert_to_edge_indices, SculptSession::vert_to_edge_map, SculptSession::vert_to_edge_offsets, and SculptSession::vertex_info.
Referenced by BKE_sculpt_update_object_before_eval(), BKE_sculptsession_free(), blender::ed::sculpt_paint::undo::bmesh_enable(), blender::ed::sculpt_paint::undo::bmesh_restore_generic(), blender::ed::sculpt_paint::dyntopo::disable(), blender::ed::sculpt_paint::face_set::edit_modify_geometry(), blender::ed::sculpt_paint::dyntopo::enable_ex(), blender::ed::sculpt_paint::trim::gesture_end(), multires_force_sculpt_rebuild(), blender::ed::sculpt_paint::optimize_exec(), paint_mask_slice_exec(), blender::ed::object::quadriflow_start_job(), blender::ed::sculpt_paint::undo::restore_geometry(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::ed::sculpt_paint::store_sculpt_entire_mesh(), blender::ed::sculpt_paint::symmetrize_exec(), and blender::ed::object::voxel_remesh_exec().
| void BKE_sculptsession_free_vwpaint_data | ( | SculptSession * | ss | ) |
Definition at line 2104 of file paint.cc.
References SculptSession::alpha_weight, BKE_defvert_array_free_elems(), Array< T, InlineBufferCapacity, Allocator >::data(), SculptSession::dvert_prev, Array< T, InlineBufferCapacity, Allocator >::is_empty(), MEM_SAFE_FREE, SculptSession::mode, SculptSession::mode_type, OB_MODE_WEIGHT_PAINT, Array< T, InlineBufferCapacity, Allocator >::size(), and SculptSession::wpaint.
Referenced by BKE_sculpt_update_object_before_eval(), and SculptSession::~SculptSession().
| bool BKE_sculptsession_use_pbvh_draw | ( | const Object * | ob, |
| const RegionView3D * | rv3d ) |
Test if blender::bke::pbvh::Tree can be used directly for drawing, which is faster than drawing the mesh and all updates that come with it.
Definition at line 2928 of file paint.cc.
References SculptSession::deform_modifiers_active, blender::bke::pbvh::Mesh, SculptSession::mode_type, OB_MODE_SCULPT, blender::bke::object::pbvh_get(), Object::sculpt, SculptSession::shapekey_active, and RegionView3D::view_render.
Referenced by blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::flush_update_step(), blender::draw::overlay::Sculpts::mesh_sync(), blender::draw::external::Prepass::object_sync(), blender::draw::overlay::Facing::object_sync(), blender::draw::overlay::Fade::object_sync(), blender::draw::overlay::ModeTransfer::object_sync(), blender::draw::overlay::Prepass::object_sync(), blender::draw::overlay::Wireframe::object_sync_ex(), blender::workbench::ObjectState::ObjectState(), blender::ed::sculpt_paint::undo::restore_list(), SCULPT_stroke_modifiers_check(), SCULPT_tag_update_overlays(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::eevee::SyncModule::sync_sculpt(), and blender::ed::sculpt_paint::hide::tag_update_visibility().
| ENUM_OPERATORS | ( | ePaintOverlayControlFlags | , |
| PAINT_OVERLAY_OVERRIDE_SECONDARY | ) |
References PAINT_OVERLAY_OVERRIDE_SECONDARY.
| ENUM_OPERATORS | ( | ePaintSymmetryAreas | , |
| PAINT_SYMM_AREA_Z | ) |
References PAINT_SYMM_AREA_Z.
| bool paint_calculate_rake_rotation | ( | UnifiedPaintSettings & | ups, |
| const Brush & | brush, | ||
| const float | mouse_pos[2], | ||
| PaintMode | paint_mode, | ||
| bool | stroke_has_started ) |
Definition at line 2052 of file paint.cc.
References atan2f, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, copy_v2_v2(), UnifiedPaintSettings::last_rake, UnifiedPaintSettings::last_rake_angle, len_squared_v2(), M_PI, min_ff(), paint_rake_rotation_active(), paint_rake_rotation_spacing(), paint_update_brush_rake_rotation(), and sub_v2_v2v2().
Referenced by blender::ed::sculpt_paint::paint_brush_update(), blender::ed::sculpt_paint::paint_cursor_update_rake_rotation(), and blender::ed::sculpt_paint::paint_stroke_modal().
| float paint_grid_paint_mask | ( | const GridPaintMask * | gpm, |
| uint | level, | ||
| uint | x, | ||
| uint | y ) |
Definition at line 2013 of file paint.cc.
References BKE_ccg_factor(), BKE_ccg_gridsize(), GridPaintMask::data, GridPaintMask::level, x, and y.
Referenced by multires_disp_run_cb(), and multires_grid_paint_mask_downsample().
| bool paint_is_bmesh_face_hidden | ( | const BMFace * | f | ) |
Return true if all vertices in the face are visible, false otherwise.
Definition at line 1998 of file paint.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_FACE_FIRST_LOOP, BMLoop::next, and BMLoop::v.
Referenced by blender::ed::sculpt_paint::hide::partialvis_update_bmesh_faces().
| bool paint_is_grid_face_hidden | ( | blender::BoundedBitSpan | grid_hidden, |
| int | gridsize, | ||
| int | x, | ||
| int | y ) |
Returns whether any of the corners of the grid face whose inner corner is at (x, y) are hidden.
Definition at line 1987 of file paint.cc.
References CCG_grid_xy_to_index(), x, and y.
Referenced by blender::bke::pbvh::count_grid_quads(), blender::draw::pbvh::create_lines_index_grids(), blender::draw::pbvh::create_lines_index_grids_flat_layout(), blender::draw::pbvh::create_tri_index_grids(), blender::draw::pbvh::create_tri_index_grids_flat_layout(), blender::bke::pbvh::node_raycast_grids(), and blender::bke::pbvh::pbvh_grids_node_nearest_to_ray().
| void paint_update_brush_rake_rotation | ( | UnifiedPaintSettings & | ups, |
| const Brush & | brush, | ||
| float | rotation ) |
Definition at line 2027 of file paint.cc.
References MTex::brush_angle_mode, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, Brush::mask_mtex, and MTEX_ANGLE_RAKE.
Referenced by paint_calculate_rake_rotation(), and blender::ed::sculpt_paint::paint_stroke_curve_end().
| blender::float3 seed_hsv_jitter | ( | ) |
Definition at line 1160 of file paint_image.cc.
References blender::RandomNumberGenerator::from_random_seed(), and blender::RandomNumberGenerator::get_float().
Referenced by brush_painter_2d_new(), paint_proj_new_stroke(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), and blender::ed::sculpt_paint::vwpaint::update_cache_invariants().
|
extern |
Definition at line 245 of file paint.cc.
Referenced by blender::ed::greasepencil::paintmode_toggle_exec(), and blender::ed::greasepencil::weightmode_toggle_exec().
|
extern |
Definition at line 240 of file paint.cc.
Referenced by blender::ed::sculpt_paint::object_sculpt_mode_enter().
|
extern |
Definition at line 244 of file paint.cc.
Referenced by blender::ed::sculpt_paint::curves_sculptmode_enter().
|
extern |
Definition at line 246 of file paint.cc.
Referenced by blender::ed::greasepencil::sculptmode_toggle_exec().
|
extern |
Definition at line 243 of file paint.cc.
Referenced by ED_object_texture_paint_mode_enter_ex(), and ED_space_image_paint_update().
|
extern |
Definition at line 241 of file paint.cc.
Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic().
|
extern |
Definition at line 242 of file paint.cc.
Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic().