|
Blender V5.3
|
Namespaces | |
| namespace | auto_mask |
| namespace | boundary |
| namespace | brushes |
| namespace | canvas |
| namespace | cloth |
| namespace | color |
| namespace | dyntopo |
| namespace | expand |
| namespace | face_set |
| namespace | filter |
| namespace | flood_fill |
| namespace | geodesic |
| namespace | gesture |
| namespace | greasepencil |
| namespace | hide |
| namespace | image |
| namespace | islands |
| namespace | mask |
| namespace | min_distance_edit |
| namespace | pose |
| namespace | project |
| namespace | select_grow |
| namespace | select_random |
| namespace | smooth |
| namespace | tests |
| namespace | trim |
| namespace | undo |
| namespace | vwpaint |
Typedefs | |
| using | DeltaProjectionFunc |
| using | BrushActionFn |
| using | GeometryExtractTagMeshFunc = void(BMesh *, GeometryExtractParams *) |
Enumerations | |
| enum class | UpdateType { Position , Mask , Visibility , Color , FaceSet } |
| enum class | TransformDisplacementMode { Original = 0 , Incremental = 1 } |
| enum class | PivotPositionMode { Origin = 0 , Unmasked = 1 , MaskBorder = 2 , ActiveVert = 3 , CursorSurface = 4 } |
| enum class | PaintCursorDrawingType { Curve , Cursor2D , Cursor3D } |
Functions | |
| void | operatortypes_sculpt () |
| void | keymap_sculpt (wmKeyConfig *keyconf) |
| void | update_modal_transform (bContext *C, Object &ob) |
| void | cancel_modal_transform (bContext *C, Object &ob) |
| void | init_transform (bContext *C, Object &ob, const float mval_fl[2], const char *undo_name) |
| void | end_transform (bContext *C, Object &ob) |
| bool | object_active_color_init (Object &ob, const float fill_color[4]) |
| void | store_mesh_from_eval (const wmOperator &op, const Scene &scene, const Depsgraph &depsgraph, const RegionView3D *rv3d, Object &object, Mesh *new_mesh) |
| static wmOperatorStatus | brush_asset_activate_exec (bContext *C, wmOperator *op) |
| void | BRUSH_OT_asset_activate (wmOperatorType *ot) |
| static bool | brush_asset_save_as_poll (bContext *C) |
| static wmOperatorStatus | brush_asset_save_as_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | brush_asset_save_as_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static const EnumPropertyItem * | rna_asset_library_reference_itemf (bContext *, PointerRNA *, PropertyRNA *, bool *r_free) |
| static void | visit_library_prop_catalogs_catalog_for_search_fn (const bContext *C, PointerRNA *ptr, PropertyRNA *, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn) |
| void | BRUSH_OT_asset_save_as (wmOperatorType *ot) |
| static wmOperatorStatus | brush_asset_edit_metadata_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | brush_asset_edit_metadata_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static void | visit_active_library_catalogs_catalog_for_search_fn (const bContext *C, PointerRNA *, PropertyRNA *, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn) |
| static bool | brush_asset_edit_metadata_poll (bContext *C) |
| void | BRUSH_OT_asset_edit_metadata (wmOperatorType *ot) |
| static wmOperatorStatus | brush_asset_load_preview_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | brush_asset_load_preview_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | BRUSH_OT_asset_load_preview (wmOperatorType *ot) |
| static bool | brush_asset_delete_poll (bContext *C) |
| static wmOperatorStatus | brush_asset_delete_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | brush_asset_delete_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | BRUSH_OT_asset_delete (wmOperatorType *ot) |
| static std::optional< AssetLibraryReference > | get_asset_library_reference (const bContext &C, const Paint &paint, const Brush &brush) |
| static bool | brush_asset_save_poll (bContext *C) |
| static wmOperatorStatus | brush_asset_save_exec (bContext *C, wmOperator *op) |
| void | BRUSH_OT_asset_save (wmOperatorType *ot) |
| static bool | brush_asset_revert_poll (bContext *C) |
| static wmOperatorStatus | brush_asset_revert_exec (bContext *C, wmOperator *op) |
| void | BRUSH_OT_asset_revert (wmOperatorType *ot) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_add_operation () |
| static std::optional< float3 > | find_curves_brush_position (const CurvesGeometry &curves, const float3 &ray_start_cu, const float3 &ray_end_cu, const float brush_radius_re, const ARegion ®ion, const RegionView3D &rv3d, const Object &object, const Span< float3 > positions) |
| std::optional< CurvesBrush3D > | sample_curves_3d_brush (const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, const RegionView3D &rv3d, const Object &curves_object, const float2 &brush_pos_re, const float brush_radius_re) |
| std::optional< CurvesBrush3D > | sample_curves_surface_3d_brush (const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, const CurvesSurfaceTransforms &transforms, const bke::bvh::Tree &surface_bvh, const float2 &brush_pos_re, const float brush_radius_re) |
| Vector< float4x4 > | get_symmetry_brush_transforms (const eCurvesSymmetryType symmetry) |
| void | remember_stroke_position (CurvesSculpt &curves_sculpt, const float3 &brush_position_wo) |
| float | transform_brush_radius (const float4x4 &transform, const float3 &brush_position, const float old_radius) |
| void | move_last_point_and_resample (MoveAndResampleBuffers &buffer, MutableSpan< float3 > positions, const float3 &new_last_position) |
| void | report_empty_original_surface (ReportList *reports) |
| void | report_empty_evaluated_surface (ReportList *reports) |
| void | report_missing_surface (ReportList *reports) |
| void | report_missing_uv_map_on_original_surface (ReportList *reports) |
| void | report_missing_uv_map_on_evaluated_surface (ReportList *reports) |
| void | report_invalid_uv_map (ReportList *reports) |
| void | report_cyclic_not_supported (ReportList *reports) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_comb_operation () |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_cut_operation () |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_delete_operation () |
| static bool | use_add_density_mode (const BrushStrokeMode brush_mode, const Scene &scene, const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, const Object &object, const StrokeExtension &stroke_start) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_density_operation (BrushStrokeMode brush_mode, const Scene &scene, const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, const Object &object, const StrokeExtension &stroke_start) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_grow_shrink_operation (const BrushStrokeMode brush_mode, const Scene &scene) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_snake_hook_operation () |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_selection_paint_operation (BrushStrokeMode brush_mode, BrushSwitchMode brush_switch_mode, const Scene &scene) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_pinch_operation (BrushStrokeMode brush_mode, const Scene &scene) |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_smooth_operation () |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_puff_operation () |
| std::unique_ptr< CurvesSculptStrokeOperation > | new_slide_operation () |
| bke::SpanAttributeWriter< float > | float_selection_ensure (Curves &curves_id) |
| static void | SCULPT_CURVES_OT_select_random (wmOperatorType *ot) |
| static void | SCULPT_CURVES_OT_select_grow (wmOperatorType *ot) |
| static void | SCULPT_CURVES_OT_min_distance_edit (wmOperatorType *ot) |
| static int | project_brush_radius_grease_pencil (ViewContext *vc, const float radius, const float3 world_location, const float4x4 &to_world) |
| static void | grease_pencil_eraser_draw (PaintCursorContext &pcontext) |
| void | grease_pencil_cursor_draw (PaintCursorContext &pcontext) |
| void | filter_translations (MutableSpan< float3 > translations, Span< float > factors) |
| void | scale_translations (MutableSpan< float3 > translations, Span< float > factors) |
| void | scale_translations (MutableSpan< float3 > translations, float factor) |
| void | scale_factors (MutableSpan< float > factors, float strength) |
| void | scale_factors (MutableSpan< float > factors, Span< float > strengths) |
| void | translations_from_offset_and_factors (const float3 &offset, Span< float > factors, MutableSpan< float3 > r_translations) |
| void | translations_from_new_positions (Span< float3 > new_positions, Span< int > verts, Span< float3 > old_positions, MutableSpan< float3 > translations) |
| void | translations_from_new_positions (Span< float3 > new_positions, Span< float3 > old_positions, MutableSpan< float3 > translations) |
| template<typename T> | |
| void | gather_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst) |
| template<typename T> | |
| MutableSpan< T > | gather_data_mesh (const Span< T > src, const Span< int > indices, Vector< T > &dst) |
| template<typename T> | |
| void | gather_data_grids (const SubdivCCG &subdiv_ccg, Span< T > src, Span< int > grids, MutableSpan< T > node_data) |
| template<typename T> | |
| MutableSpan< T > | gather_data_grids (const SubdivCCG &subdiv_ccg, const Span< T > src, const Span< int > grids, Vector< T > &dst) |
| template<typename T> | |
| void | gather_data_bmesh (Span< T > src, const Set< BMVert *, 0 > &verts, MutableSpan< T > node_data) |
| template<typename T> | |
| MutableSpan< T > | gather_data_bmesh (const Span< T > src, const Set< BMVert *, 0 > &verts, Vector< T > &dst) |
| template<typename T> | |
| void | scatter_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst) |
| template<typename T> | |
| void | scatter_data_grids (const SubdivCCG &subdiv_ccg, Span< T > node_data, Span< int > grids, MutableSpan< T > dst) |
| template<typename T> | |
| void | scatter_data_bmesh (Span< T > node_data, const Set< BMVert *, 0 > &verts, MutableSpan< T > dst) |
| MutableSpan< float3 > | gather_grids_positions (const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions) |
| void | gather_bmesh_positions (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions) |
| MutableSpan< float3 > | gather_bmesh_positions (const Set< BMVert *, 0 > &verts, Vector< float3 > &positions) |
| void | gather_grids_normals (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float3 > normals) |
| void | gather_bmesh_normals (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > normals) |
| void | calc_factors_common_mesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, MutableSpan< float > factors, MutableSpan< float > distances) |
| void | calc_factors_common_mesh_indexed (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > vert_positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, MutableSpan< float > factors, MutableSpan< float > distances) |
| void | calc_factors_common_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | calc_factors_common_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | calc_cube_tip_factors_common_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const float4x4 &mat, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | calc_cube_tip_factors_common_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const float4x4 &mat, Span< float3 > positions, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | calc_factors_common_from_orig_data_mesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::MeshNode &node, MutableSpan< float > r_factors, MutableSpan< float > r_distances) |
| void | calc_factors_common_from_orig_data_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | calc_factors_common_from_orig_data_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances) |
| void | fill_factor_from_hide (Span< bool > hide_vert, Span< int > verts, MutableSpan< float > r_factors) |
| void | fill_factor_from_hide (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors) |
| void | fill_factor_from_hide (const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors) |
| void | fill_factor_from_hide_and_mask (Span< bool > hide_vert, Span< float > mask, Span< int > verts, MutableSpan< float > r_factors) |
| void | fill_factor_from_hide_and_mask (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors) |
| void | fill_factor_from_hide_and_mask (const BMesh &bm, const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors) |
| void | calc_front_face (const float3 &view_normal, Span< float3 > normals, MutableSpan< float > factors) |
| void | calc_front_face (const float3 &view_normal, Span< float3 > vert_normals, Span< int > verts, MutableSpan< float > factors) |
| void | calc_front_face (const float3 &view_normal, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > factors) |
| void | calc_front_face (const float3 &view_normal, const Set< BMVert *, 0 > &verts, MutableSpan< float > factors) |
| void | calc_front_face (const float3 &view_normal, const Set< BMFace *, 0 > &faces, MutableSpan< float > factors) |
| void | filter_region_clip_factors (const SculptSession &ss, Span< float3 > vert_positions, Span< int > verts, MutableSpan< float > factors) |
| void | filter_region_clip_factors (const SculptSession &ss, Span< float3 > positions, MutableSpan< float > factors) |
| void | calc_brush_distances (const SculptSession &ss, Span< float3 > vert_positions, Span< int > vert, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances) |
| void | calc_brush_distances (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances) |
| void | calc_brush_distances_squared (const SculptSession &ss, Span< float3 > positions, Span< int > verts, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances) |
| void | calc_brush_distances_squared (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances) |
| void | filter_distances_with_radius (float radius, Span< float > distances, MutableSpan< float > factors) |
| template<typename T> | |
| void | calc_brush_cube_distances (const Brush &brush, const Span< T > positions, const MutableSpan< float > r_distances) |
| void | apply_hardness_to_distances (float radius, float hardness, MutableSpan< float > distances) |
| void | apply_hardness_to_distances (const StrokeCache &cache, const MutableSpan< float > distances) |
| void | calc_brush_strength_factors (const StrokeCache &cache, const Brush &brush, Span< float > distances, MutableSpan< float > factors) |
| void | calc_brush_texture_factors (PaintMode paint_mode, const SculptSession &ss, const Brush &brush, Span< float3 > vert_positions, Span< int > vert, MutableSpan< float > factors) |
| void | calc_brush_texture_factors (PaintMode paint_mode, const SculptSession &ss, const Brush &brush, Span< float3 > positions, MutableSpan< float > factors) |
| void | apply_translations (Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions) |
| void | apply_translations (Span< float3 > translations, Span< int > grids, SubdivCCG &subdiv_ccg) |
| void | apply_translations (Span< float3 > translations, const Set< BMVert *, 0 > &verts) |
| void | project_translations (MutableSpan< float3 > translations, const float3 &plane) |
| void | reset_translations_to_original (MutableSpan< float3 > translations, Span< float3 > positions, Span< float3 > orig_positions) |
| void | apply_crazyspace_to_translations (Span< float3x3 > deform_imats, Span< int > verts, MutableSpan< float3 > translations) |
| void | clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations) |
| void | clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, MutableSpan< float3 > translations) |
| OffsetIndices< int > | create_node_vert_offsets (Span< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask, Array< int > &node_data) |
| OffsetIndices< int > | create_node_vert_offsets (const CCGKey &key, Span< bke::pbvh::GridsNode > nodes, const IndexMask &node_mask, Array< int > &node_data) |
| OffsetIndices< int > | create_node_vert_offsets_bmesh (Span< bke::pbvh::BMeshNode > nodes, const IndexMask &node_mask, Array< int > &node_data) |
| GroupedSpan< int > | calc_vert_neighbors (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, Span< bool > hide_poly, Span< int > verts, Vector< int > &r_offset_data, Vector< int > &r_data) |
| GroupedSpan< int > | calc_vert_neighbors (const SubdivCCG &subdiv_ccg, Span< int > grids, Vector< int > &r_offset_data, Vector< int > &r_data) |
| GroupedSpan< BMVert * > | calc_vert_neighbors (Set< BMVert *, 0 > verts, Vector< int > &r_offset_data, Vector< BMVert * > &r_data) |
| GroupedSpan< int > | calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, BitSpan boundary_verts, const Set< OrderedEdge > &boundary_edges, Span< bool > hide_poly, Span< int > verts, Vector< int > &r_offset_data, Vector< int > &r_data) |
| GroupedSpan< int > | calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, BitSpan boundary_verts, const Set< OrderedEdge > &boundary_edges, Span< bool > hide_poly, Span< int > verts, Span< float > factors, Vector< int > &r_offset_data, Vector< int > &r_data) |
| void | calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, BitSpan boundary_verts, const Set< OrderedEdge > &boundary_edges, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< Vector< SubdivCCGCoord > > result) |
| void | calc_vert_neighbors_interior (const Set< BMVert *, 0 > &verts, MutableSpan< Vector< BMVert * > > result) |
| void | calc_translations_to_plane (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float3 > translations) |
| void | calc_translations_to_plane (Span< float3 > positions, const float4 &plane, MutableSpan< float3 > translations) |
| void | filter_verts_outside_symmetry_area (Span< float3 > positions, const float3 &pivot, ePaintSymmetryFlags symm, MutableSpan< float > factors) |
| void | filter_plane_trim_limit_factors (const Brush &brush, const StrokeCache &cache, Span< float3 > translations, MutableSpan< float > factors) |
| void | filter_below_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors) |
| void | filter_below_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors) |
| void | filter_above_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors) |
| void | filter_above_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors) |
| void | calc_local_positions (Span< float3 > vert_positions, Span< int > verts, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float3 > local_positions) |
| void | calc_local_positions (Span< float3 > positions, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float3 > local_positions) |
| void | calc_local_positions (Span< float3 > vert_positions, Span< int > verts, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float2 > xy_positions, MutableSpan< float > z_positions) |
| void | calc_local_positions (Span< float3 > positions, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float2 > xy_positions, MutableSpan< float > z_positions) |
| static int | brush_radius_project (ViewContext *vc, float radius, const float location[3]) |
| static void | pixel_radius_update (PaintCursorContext &pcontext) |
| static void | brush_unprojected_size_update (Paint &paint, Brush &brush, const ViewContext &vc, const float location[3]) |
| void | mesh_cursor_update_and_init (PaintCursorContext &pcontext) |
| static void | geometry_preview_lines_draw (const Depsgraph &depsgraph, const uint gpuattr, const Brush &brush, const Object &object) |
| void | mesh_cursor_active_draw (PaintCursorContext &pcontext) |
| static void | screen_space_point_draw (const uint gpuattr, const ARegion *region, const float true_location[3], const float obmat[4][4], const int size) |
| static void | tiling_preview_draw (const uint gpuattr, const ARegion *region, const float true_location[3], const Paint &paint, const Object &ob, const float radius) |
| static void | point_with_symmetry_draw (const PaintMode paint_mode, const Brush &brush, const uint gpuattr, const ARegion *region, const float true_location[3], const Paint &paint, const Object &ob, const float radius) |
| static void | inactive_cursor_draw (PaintCursorContext &pcontext) |
| static void | object_space_radius_update (PaintCursorContext &pcontext) |
| static void | pose_brush_segments_draw (const PaintCursorContext &pcontext) |
| static void | pose_brush_origins_draw (const PaintCursorContext &pcontext) |
| static void | boundary_preview_pivot_draw (const PaintCursorContext &pcontext) |
| static void | boundary_preview_update (const PaintCursorContext &pcontext) |
| static float3 | get_active_vertex_position (const PaintCursorContext &pcontext) |
| static void | screen_space_overlays_draw (const PaintCursorContext &pcontext) |
| static void | object_space_overlays_draw (const PaintCursorContext &pcontext) |
| static void | cursor_space_drawing_setup (const PaintCursorContext &pcontext) |
| static void | main_inactive_cursor_draw (const PaintCursorContext &pcontext) |
| static void | layer_brush_height_preview_draw (const uint gpuattr, const Brush &brush, const float rds, const float line_width, const float3 &outline_col, const float alpha) |
| static void | cursor_space_overlays_draw (const PaintCursorContext &pcontext) |
| void | mesh_cursor_inactive_draw (PaintCursorContext &pcontext) |
| static int | aa_samples_per_texel_axis (const Brush *brush, const float radius) |
| static void | update_curve_mask (CurveMaskCache *curve_mask_cache, const Brush *brush, const int diameter, const float radius, const float cursor_position[2]) |
| static bool | is_sampled_curve_valid (const CurveMaskCache *curve_mask_cache, const Brush *brush) |
| static void | sampled_curve_free (CurveMaskCache *curve_mask_cache) |
| static void | update_sampled_curve (CurveMaskCache *curve_mask_cache, const Brush *brush) |
| static size_t | diameter_to_curve_mask_size (const int diameter) |
| static bool | is_curve_mask_size_valid (const CurveMaskCache *curve_mask_cache, const int diameter) |
| static void | curve_mask_free (CurveMaskCache *curve_mask_cache) |
| static void | curve_mask_allocate (CurveMaskCache *curve_mask_cache, const int diameter) |
| template<typename T> | |
| static void | fill_bm_face_or_corner_attribute (BMesh &bm, const T &value, const AttrDomain domain, const int cd_offset, const bool use_vert_sel, const bool only_visible=false) |
| template<typename T> | |
| static void | fill_mesh_face_or_corner_attribute (Mesh &mesh, const T &value, const AttrDomain domain, const MutableSpan< T > data, const bool use_vert_sel, const bool use_face_sel, const bool affect_alpha, const bool only_visible=false) |
| static void | fill_mesh_color (Mesh &mesh, const ColorPaint4f &color, const StringRef name, const bool use_vert_sel, const bool use_face_sel, const bool affect_alpha, const bool only_visible=false) |
| static bool | fill_active_color (Object &ob, ColorPaint4f fill_color, bool only_selected=true, bool affect_alpha=true, const bool only_visible=false) |
| static void | rake_data_update (SculptRakeData *srd, const float co[3]) |
| static void | sculpt_init_mirror_clipping (const Object &ob, const SculptSession &ss) |
| static void | smooth_brush_toggle_on (Main *bmain, Paint *paint, StrokeToggleSettings &toggle_settings) |
| static void | smooth_brush_toggle_off (Paint *paint, StrokeCache *cache) |
| static void | mask_brush_toggle_on (Main *bmain, Paint *paint, StrokeToggleSettings &toggle_settings) |
| static void | mask_brush_toggle_off (Paint *paint, StrokeCache *cache) |
| static void | init_scene_project_brush_targets (const Depsgraph &depsgraph, ViewLayer &view_layer, const View3D &v3d, const Object &active_object, StrokeCache &cache) |
| static float | brush_dynamic_size_get (const Brush &brush, const StrokeCache &cache, float initial_size) |
| static bool | need_delta_from_anchored_origin (const Brush &brush) |
| static bool | need_delta_for_tip_orientation (const Brush &brush) |
| static void | brush_delta_update (const Depsgraph &depsgraph, Paint &paint, const Object &ob, const Brush &brush) |
| static void | cache_paint_brush_variants_update (StrokeCache &cache, const Brush &brush) |
| static void | sculpt_raycast_cb (bke::pbvh::Node &node, RaycastData &rd, float *distance) |
| static void | sculpt_find_nearest_to_ray_cb (bke::pbvh::Node &node, FindNearestToRayData &fntrd, float *tmin) |
| static std::optional< float3 > | stroke_get_location_bvh_ex (Depsgraph &depsgraph, ViewContext &vc, const Paint &paint, const Sculpt *sd, const float2 &mval, const bool force_original, const bool check_closest, const bool limit_closest_radius) |
| static void | brush_init_tex (const Sculpt &sd, SculptSession &ss) |
| static StrokeToggleSettings | create_toggle_settings (const wmOperator &op, Main &bmain, Paint &paint) |
| static void | brush_stroke_init (bContext *C, const wmOperator *op) |
| static void | restore_from_undo_step_if_necessary (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob) |
| static void | tag_mesh_positions_changed (Object &object, const bool use_pbvh_draw) |
| static void | replace_attribute (const bke::AttributeAccessor src_attributes, const StringRef name, const bke::AttrDomain domain, const bke::AttrType data_type, bke::MutableAttributeAccessor dst_attributes) |
| static bool | attribute_matches (const bke::AttributeAccessor a, const bke::AttributeAccessor b, const StringRef name) |
| static bool | topology_matches (const Mesh &a, const Mesh &b) |
| static void | store_sculpt_entire_mesh (const wmOperator &op, const Scene &scene, Object &object, Mesh *new_mesh) |
| static const ImplicitSharingInfo * | get_vertex_group_sharing_info (const Mesh &mesh) |
| static bool | over_mesh (bContext *C, wmOperator *, const float mval[2]) |
| static bool | over_mesh (Depsgraph &depsgraph, ViewContext &vc, const Sculpt &sd, const Brush *brush, wmOperator *, const float mval[2]) |
| static void | stroke_cache_init (ViewContext &vc, const Sculpt &sd, const Brush &brush, Object &ob, const float mval[2]) |
| static void | stroke_cache_update (ViewContext &vc, const Depsgraph &depsgraph, Paint &paint, Brush &brush, Object &object, const PaintStroke::StrokeStep &stroke_step) |
| static void | brush_exit_tex (Sculpt &sd) |
| static wmOperatorStatus | sculpt_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | sculpt_brush_stroke_exec (bContext *C, wmOperator *op) |
| static void | sculpt_brush_stroke_cancel (bContext *C, wmOperator *op) |
| static wmOperatorStatus | brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | redo_empty_ui (bContext *, wmOperator *) |
| void | SCULPT_OT_brush_stroke (wmOperatorType *ot) |
| static void | fake_neighbor_init (Object &object, const float max_dist) |
| static void | pose_fake_neighbors_free (SculptSession &ss) |
| static void | fake_neighbor_search_mesh (const SculptSession &ss, const Span< float3 > vert_positions, const Span< bool > hide_vert, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::MeshNode &node, NearestVertData &nvtd) |
| static void | fake_neighbor_search_grids (const SculptSession &ss, const CCGKey &key, const Span< float3 > positions, const BitGroupVector<> &grid_hidden, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::GridsNode &node, NearestVertData &nvtd) |
| static void | fake_neighbor_search_bmesh (const SculptSession &ss, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::BMeshNode &node, NearestVertData &nvtd) |
| static void | fake_neighbor_search (const Depsgraph &depsgraph, const Object &ob, const float max_distance_sq, MutableSpan< int > fake_neighbors) |
| template void | gather_data_grids< int > (const SubdivCCG &, Span< int >, Span< int >, MutableSpan< int >) |
| template void | gather_data_grids< float > (const SubdivCCG &, Span< float >, Span< int >, MutableSpan< float >) |
| template void | gather_data_grids< float3 > (const SubdivCCG &, Span< float3 >, Span< int >, MutableSpan< float3 >) |
| template void | gather_data_bmesh< int > (Span< int >, const Set< BMVert *, 0 > &, MutableSpan< int >) |
| template void | gather_data_bmesh< float > (Span< float >, const Set< BMVert *, 0 > &, MutableSpan< float >) |
| template void | gather_data_bmesh< float3 > (Span< float3 >, const Set< BMVert *, 0 > &, MutableSpan< float3 >) |
| template void | scatter_data_grids< float > (const SubdivCCG &, Span< float >, Span< int >, MutableSpan< float >) |
| template void | scatter_data_grids< float3 > (const SubdivCCG &, Span< float3 >, Span< int >, MutableSpan< float3 >) |
| template void | scatter_data_bmesh< float > (Span< float >, const Set< BMVert *, 0 > &, MutableSpan< float >) |
| template void | scatter_data_bmesh< float3 > (Span< float3 >, const Set< BMVert *, 0 > &, MutableSpan< float3 >) |
| template void | calc_brush_cube_distances< float2 > (const Brush &brush, const Span< float2 > positions, MutableSpan< float > r_distances) |
| template void | calc_brush_cube_distances< float3 > (const Brush &brush, const Span< float3 > positions, MutableSpan< float > r_distances) |
| static bool | contains_nan (const Span< float > values) |
| template<bool use_factors> | |
| static GroupedSpan< int > | calc_vert_neighbors_interior_impl (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const BitSpan boundary_verts, const Set< OrderedEdge > &boundary_edges, const Span< bool > hide_poly, const Span< int > verts, const Span< float > factors, Vector< int > &r_offset_data, Vector< int > &r_data) |
| void | mask_overlay_check (bContext &C, wmOperator &op) |
| void | face_set_overlay_check (bContext &C, wmOperator &op) |
| void | SCULPT_OT_set_pivot_position (wmOperatorType *ot) |
| void | SCULPT_OT_paint_mask_extract (wmOperatorType *ot) |
| void | SCULPT_OT_face_set_extract (wmOperatorType *ot) |
| void | SCULPT_OT_paint_mask_slice (wmOperatorType *ot) |
| static bool | geometry_extract_poll (bContext *C) |
| static wmOperatorStatus | geometry_extract_apply (bContext *C, wmOperator *op, GeometryExtractTagMeshFunc *tag_fn, GeometryExtractParams *params) |
| static void | geometry_extract_tag_masked_faces (BMesh *bm, GeometryExtractParams *params) |
| static void | geometry_extract_tag_face_set (BMesh *bm, GeometryExtractParams *params) |
| static wmOperatorStatus | paint_mask_extract_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | paint_mask_extract_invoke (bContext *C, wmOperator *op, const wmEvent *e) |
| static void | geometry_extract_props (StructRNA *srna) |
| static wmOperatorStatus | face_set_extract_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | slice_paint_mask (BMesh *bm, bool invert, bool fill_holes, float mask_threshold) |
| static wmOperatorStatus | paint_mask_slice_exec (bContext *C, wmOperator *op) |
| static void | finish_pivot_change (bContext *C, Object &ob) |
| static std::array< float4x4, 8 > | transform_matrices_init (const SculptSession &ss, const ePaintSymmetryFlags symm, const TransformDisplacementMode t_mode) |
| static BLI_NOINLINE void | calc_symm_area_transform_translations (const Span< float3 > positions, const std::array< float4x4, 8 > &transform_mats, const MutableSpan< float3 > translations) |
| static BLI_NOINLINE void | filter_translations_with_symmetry (const Span< float3 > positions, const ePaintSymmetryFlags symm, const MutableSpan< float3 > translations) |
| static void | transform_node_mesh (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, TransformLocalData &tls, const PositionDeformData &position_data) |
| static void | transform_node_grids (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, const bke::pbvh::GridsNode &node, Object &object, TransformLocalData &tls) |
| static void | transform_node_bmesh (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, bke::pbvh::BMeshNode &node, Object &object, TransformLocalData &tls) |
| static void | sculpt_transform_all_vertices (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob) |
| static BLI_NOINLINE void | calc_transform_translations (const float4x4 &elastic_transform_mat, const Span< float3 > positions, const MutableSpan< float3 > r_translations) |
| static BLI_NOINLINE void | apply_kelvinet_to_translations (const KelvinletParams ¶ms, const float3 &elastic_transform_pivot, const Span< float3 > positions, const MutableSpan< float3 > translations) |
| static void | elastic_transform_node_mesh (const Sculpt &sd, const KelvinletParams ¶ms, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, TransformLocalData &tls, const PositionDeformData &position_data) |
| static void | elastic_transform_node_grids (const Sculpt &sd, const KelvinletParams ¶ms, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, const bke::pbvh::GridsNode &node, Object &object, TransformLocalData &tls) |
| static void | elastic_transform_node_bmesh (const Sculpt &sd, const KelvinletParams ¶ms, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, bke::pbvh::BMeshNode &node, Object &object, TransformLocalData &tls) |
| static void | transform_radius_elastic (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const float transform_radius) |
| static bool | set_pivot_depends_on_cursor (bContext &, wmOperatorType &, PointerRNA *ptr) |
| static AveragePositionAccumulation | combine_average_position_accumulation (const AveragePositionAccumulation &a, const AveragePositionAccumulation &b) |
| static BLI_NOINLINE void | accumulate_weighted_average_position (const Span< float3 > positions, const Span< float > factors, AveragePositionAccumulation &total) |
| static float3 | average_unmasked_position (const Depsgraph &depsgraph, const Object &object, const float3 &pivot, const ePaintSymmetryFlags symm) |
| static BLI_NOINLINE void | mask_border_weight_calc (const Span< float > masks, const MutableSpan< float > factors) |
| static float3 | average_mask_border_position (const Depsgraph &depsgraph, const Object &object, const float3 &pivot, const ePaintSymmetryFlags symm) |
| static wmOperatorStatus | set_pivot_position_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | set_pivot_position_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static bool | set_pivot_position_poll_property (const bContext *, wmOperator *op, const PropertyRNA *prop) |
| static int | same_tex_snap (bke::paint::TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom) |
| static void | make_tex_snap (bke::paint::TexSnapshot *snap, ViewContext *vc, float zoom) |
| static void | load_tex_task_cb_ex (void *__restrict userdata, const int j, const TaskParallelTLS *__restrict tls) |
| static int | load_tex (Paint *paint, Brush *br, ViewContext *vc, float zoom, bool col, bool primary) |
| static void | load_tex_cursor_task_cb (void *__restrict userdata, const int j, const TaskParallelTLS *__restrict) |
| static int | load_tex_cursor (Paint *paint, Brush *br, float zoom) |
| static bool | paint_draw_tex_overlay (Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, const PaintMode mode, bool col, bool primary) |
| static bool | paint_draw_cursor_overlay (Paint *paint, Brush *brush, int x, int y, float zoom) |
| static bool | paint_draw_alpha_overlay (Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, PaintMode mode) |
| BLI_INLINE void | draw_tri_point (uint pos, const float sel_col[4], const float pivot_col[4], float *co, float width, bool selected) |
| 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) |
| BLI_INLINE void | draw_bezier_handle_lines (uint pos, const float sel_col[4], BezTriple *bez) |
| static void | paint_draw_curve_cursor (Brush *brush, ViewContext *vc) |
| static bool | paint_use_2d_cursor (PaintMode mode, const Brush &brush) |
| static bool | paint_cursor_context_init (bContext *C, const int2 &xy, const float2 &tilt, PaintCursorContext &pcontext) |
| static void | paint_update_mouse_cursor (PaintCursorContext &pcontext) |
| static void | paint_draw_2D_view_brush_cursor_default (PaintCursorContext &pcontext) |
| static void | paint_draw_2D_view_brush_cursor (PaintCursorContext &pcontext) |
| static void | paint_draw_legacy_3D_view_brush_cursor (PaintCursorContext &pcontext) |
| static void | paint_cursor_draw_3D_view_brush_cursor (PaintCursorContext &pcontext) |
| static bool | paint_cursor_is_3d_view_navigating (const PaintCursorContext &pcontext) |
| static bool | paint_cursor_is_brush_cursor_enabled (const PaintCursorContext &pcontext) |
| static void | paint_cursor_update_rake_rotation (PaintCursorContext &pcontext) |
| static void | paint_cursor_check_and_draw_alpha_overlays (PaintCursorContext &pcontext) |
| static void | paint_cursor_update_anchored_location (PaintCursorContext &pcontext) |
| static void | paint_cursor_setup_2D_drawing (PaintCursorContext &pcontext) |
| static void | paint_cursor_setup_3D_drawing (PaintCursorContext &pcontext) |
| static void | paint_cursor_restore_drawing_state () |
| static void | paint_draw_cursor (bContext *C, const int2 &xy, const float2 &tilt, void *) |
| float2 | paint_stroke_jitter_pos (Paint *paint, PaintMode mode, const Brush &brush, float pressure, BrushStrokeMode stroke_mode, float zoom_2d, const float2 &mval) |
| bool | paint_space_stroke_enabled (const Brush &br, PaintMode mode) |
| bool | paint_supports_dynamic_size (const Brush &br, PaintMode mode) |
| bool | paint_supports_dynamic_tex_coords (const Brush &br, PaintMode mode) |
| bool | paint_supports_smooth_stroke (const Brush &brush, PaintMode mode, BrushSwitchMode brush_switch_mode) |
| bool | paint_supports_texture (PaintMode mode) |
| bool | paint_brush_tool_poll (bContext *C) |
| bool | paint_brush_tool_poll (const ScrArea *area, const ARegion *region, const Paint *paint, const Object *ob) |
| bool | paint_brush_cursor_poll (bContext *C) |
| void | PAINT_OT_sample_color (wmOperatorType *ot) |
| bool | is_symmetry_iteration_valid (const char i, const char symm) |
| float3 | symmetry_flip (const float3 &src, const ePaintSymmetryFlags symm) |
| static float2 | imapaint_pick_uv (const Mesh *mesh_eval, Scene &scene, Object *ob_eval, const int tri_index, const float3 &bary_coord) |
| static bool | imapaint_pick_face (ViewContext *vc, const int mval[2], int *r_tri_index, int *r_face_index, float3 *r_bary_coord, const Mesh &mesh) |
| static std::optional< float3 > | sample_texture_paint_color (const Depsgraph &depsgraph, Scene &scene, ViewContext &vc, Object *object, const int2 mval) |
| static std::optional< float3 > | sample_mesh_attribute_color (ViewContext &vc, Object &object, int2 mval) |
| static void | apply_sampled_color (Main &bMain, Paint &paint, const float3 &sampled_color, const bool use_palette) |
| static float3 | paint_sample_color (bContext *C, ARegion *region, const int2 mval, const bool use_merged_texture) |
| static void | sample_color_update_header (SampleColorData *data, bContext *C) |
| static float3 | sample_average_color (SampleColorData *data, const float3 &sampled_color) |
| static wmOperatorStatus | sample_color_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | sample_color_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | sample_color_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static bool | sample_color_poll (bContext *C) |
| static void | paint_draw_smooth_cursor (bContext *C, const int2 &xy, const float2 &, void *customdata) |
| static void | paint_draw_line_cursor (bContext *, const int2 &xy, const float2 &, void *customdata) |
| static bool | paint_brush_type_require_location (const Brush &brush, const PaintMode mode) |
| static bool | paint_stroke_use_scene_spacing (const Brush &brush, const PaintMode mode) |
| static bool | paint_brush_type_raycast_original (const Brush &brush, PaintMode) |
| static bool | paint_brush_type_require_inbetween_mouse_events (const Brush &brush, const PaintMode mode) |
| static bool | paint_stroke_use_dash (const Brush &brush) |
| static bool | paint_stroke_use_jitter (const PaintMode mode, const Brush &brush, const bool invert) |
| static bool | paint_smooth_stroke (const Brush &brush, const PaintSample *sample, const PaintMode mode, const BrushSwitchMode brush_switch_mode, float zoom_2d, float2 last_mouse_position, float last_pressure, float2 &r_mouse, float &r_pressure) |
| static float | paint_space_stroke_spacing (const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float size_factor, const float pressure) |
| static float | paint_space_stroke_spacing_no_pressure (const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d) |
| static float | paint_stroke_overlapped_curve (const Brush &br, const float x, const float spacing) |
| static float | paint_stroke_integrate_overlap (const Brush &br, const float factor) |
| static float | paint_space_stroke_spacing_variable (ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float last_pressure, const float pressure, const float pressure_delta, const float length) |
| static bool | print_pressure_status_enabled () |
| static bool | curves_sculpt_brush_uses_spacing (const eBrushCurvesSculptType tool) |
| static bool | sculpt_is_grab_tool (const Brush &br) |
| static void | paint_stroke_line_constrain (float2 last_mouse_position, float2 &constrained_pos, float2 &mouse) |
| static const bToolRef * | brush_tool_get (const ScrArea *area, const ARegion *region) |
Sculpt Mode Toggle Operator | |
| void | object_sculpt_mode_enter (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, bool force_dyntopo, ReportList *reports) |
| void | object_sculpt_mode_enter (bContext *C, Depsgraph &depsgraph, ReportList *reports) |
| void | object_sculpt_mode_exit (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob) |
| void | object_sculpt_mode_exit (bContext *C, Depsgraph &depsgraph) |
| static wmOperatorStatus | sculpt_mode_toggle_exec (bContext *C, wmOperator *op) |
| static void | SCULPT_OT_sculptmode_toggle (wmOperatorType *ot) |
Sculpt Brush Utilities | |
| bool | shape_key_check (const Object &ob, ReportList *reports) |
| float | object_space_radius_get (const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor) |
| void | vert_random_access_ensure (Object &object) |
| int | vertex_count_get (const Object &object) |
| Span< float3 > | vert_positions_for_grab_active_get (const Depsgraph &depsgraph, const Object &object) |
| ePaintSymmetryFlags | mesh_symmetry_xyz_get (const Object &object) |
| Span< BMVert * > | vert_neighbors_get_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors) |
| Span< BMVert * > | vert_neighbors_get_interior_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors) |
| Span< int > | vert_neighbors_get_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const int vert, Vector< int > &r_neighbors) |
| void | append_neighbors_to_vector (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const int vert, Vector< int > &r_data) |
| bool | stroke_is_main_symmetry_pass (const StrokeCache &cache) |
| bool | stroke_is_first_brush_step (const StrokeCache &cache) |
| bool | stroke_is_first_brush_step_of_symmetry_pass (const StrokeCache &cache) |
| bool | check_vertex_pivot_symmetry (const float vco[3], const float pco[3], const char symm) |
| static void | sculpt_project_v3_normal_align (const StrokeCache &cache, const float normal_weight, float grab_delta[3]) |
| float3 | grab_delta_get (const Brush &brush, const StrokeCache &cache) |
| std::optional< int > | nearest_vert_calc_mesh (const bke::pbvh::Tree &pbvh, const Span< float3 > vert_positions, const Span< bool > hide_vert, const float3 &location, const float max_distance, const bool use_original) |
| std::optional< SubdivCCGCoord > | nearest_vert_calc_grids (const bke::pbvh::Tree &pbvh, const SubdivCCG &subdiv_ccg, const float3 &location, const float max_distance, const bool use_original) |
| std::optional< BMVert * > | nearest_vert_calc_bmesh (const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original) |
| bool | is_vertex_inside_brush_radius_symm (const float vertex[3], const float br_co[3], float radius, char symm) |
| void | tag_update_overlays (bContext *C) |
| static void | dynamic_topology_update (const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *) |
| static bool | brush_type_needs_all_pbvh_nodes (const Brush &brush) |
| static brushes::CursorSampleResult | calc_brush_node_mask (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const Brush &brush, IndexMaskMemory &memory) |
| static void | push_undo_nodes (const Depsgraph &depsgraph, Object &ob, const Brush &brush, const IndexMask &node_mask) |
| static const char * | sculpt_brush_type_name (const Brush &brush) |
| static void | do_brush_action (const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *) |
| void | cache_calc_brushdata_symm (StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis, const float angle) |
| static void | sculpt_fix_noise_tear (const Sculpt &sd, Object &ob) |
| bool | sculpt_mode_poll (bContext *C) |
| bool | sculpt_mode_poll_view3d (bContext *C) |
| bool | sculpt_mode_and_brush_poll (bContext *C) |
| static bool | is_brush_related_tool (bContext *C) |
| bool | brush_cursor_poll (bContext *C) |
Brush Stroke Operator | |
| float | brush_radius_factor (const Brush &brush, const StrokeExtension &stroke_extension) |
| float | brush_radius_get (const Paint &paint, const Brush &brush, const StrokeExtension &stroke_extension) |
| float | brush_strength_factor (const Brush &brush, const StrokeExtension &stroke_extension) |
| float | brush_strength_get (const Paint &paint, const Brush &brush, const StrokeExtension &stroke_extension) |
| static std::unique_ptr< CurvesSculptStrokeOperation > | start_brush_operation (wmOperator &op, Scene &scene, Depsgraph &depsgraph, ARegion ®ion, View3D &v3d, const Object &object, const StrokeExtension &stroke_start) |
| static wmOperatorStatus | sculpt_curves_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | sculpt_curves_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | sculpt_curves_stroke_cancel (bContext *C, wmOperator *op) |
| static void | SCULPT_CURVES_OT_brush_stroke (wmOperatorType *ot) |
| static bool | grease_pencil_brush_stroke_poll (bContext *C) |
| static bool | use_duplicate_previous_key (bContext *C, wmOperator *op) |
| static wmOperatorStatus | grease_pencil_brush_stroke_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | grease_pencil_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | grease_pencil_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | grease_pencil_brush_stroke_cancel (bContext *C, wmOperator *op) |
| static void | GREASE_PENCIL_OT_brush_stroke (wmOperatorType *ot) |
Poll Functions | |
| bool | curves_sculpt_poll (bContext *C) |
| bool | curves_sculpt_poll_view3d (bContext *C) |
Toggle Sculpt Mode | |
| static void | curves_sculptmode_enter (bContext *C) |
| static void | curves_sculptmode_exit (bContext *C) |
| static wmOperatorStatus | curves_sculptmode_toggle_exec (bContext *C, wmOperator *op) |
| static void | CURVES_OT_sculptmode_toggle (wmOperatorType *ot) |
Common Paint Operator Functions | |
| static std::unique_ptr< GreasePencilStrokeOperation > | get_stroke_operation (bContext &C, wmOperator *op) |
Sculpt Operator | |
| static bool | grease_pencil_sculpt_paint_poll (bContext *C) |
| static wmOperatorStatus | grease_pencil_sculpt_paint_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | grease_pencil_sculpt_paint_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | grease_pencil_sculpt_paint_cancel (bContext *C, wmOperator *op) |
| static void | GREASE_PENCIL_OT_sculpt_paint (wmOperatorType *ot) |
Weight Brush Stroke Operator | |
| static bool | grease_pencil_weight_brush_stroke_poll (bContext *C) |
| static wmOperatorStatus | grease_pencil_weight_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | grease_pencil_weight_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | grease_pencil_weight_brush_stroke_cancel (bContext *C, wmOperator *op) |
| static void | GREASE_PENCIL_OT_weight_brush_stroke (wmOperatorType *ot) |
Vertex Brush Stroke Operator | |
| static bool | grease_pencil_vertex_brush_stroke_poll (bContext *C) |
| static wmOperatorStatus | grease_pencil_vertex_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | grease_pencil_vertex_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | grease_pencil_vertex_brush_stroke_cancel (bContext *C, wmOperator *op) |
| static void | GREASE_PENCIL_OT_vertex_brush_stroke (wmOperatorType *ot) |
Brush Utilities. | |
| void | calc_smooth_translations (const Depsgraph &depsgraph, const Object &object, const IndexMask &node_mask, const MutableSpan< float3 > translations) |
| float4x4 | cube_tip_init (const Object &ob, const Brush &brush) |
| Vector< int > | find_symm_verts_mesh (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance) |
| Vector< int > | find_symm_verts_grids (const Object &object, const int original_vert, const float max_distance) |
| Vector< int > | find_symm_verts_bmesh (const Object &object, const int original_vert, const float max_distance) |
| Vector< int > | find_symm_verts (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance) |
| std::array< int, PAINT_SYMM_AREAS > | find_all_symm_verts (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance) |
| std::array< int, PAINT_SYMM_AREAS > | find_all_symm_verts_mesh (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance) |
| std::array< int, PAINT_SYMM_AREAS > | find_all_symm_verts_grids (const Object &object, const int original_vert, const float max_distance) |
| std::array< int, PAINT_SYMM_AREAS > | find_all_symm_verts_bmesh (const Object &object, const int original_vert, const float max_distance) |
| std::optional< OrigPositionData > | orig_position_data_lookup_mesh_all_verts (const Object &object, const bke::pbvh::MeshNode &node) |
| std::optional< OrigPositionData > | orig_position_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| OrigPositionData | orig_position_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| std::optional< OrigPositionData > | orig_position_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node) |
| OrigPositionData | orig_position_data_get_grids (const Object &object, const bke::pbvh::GridsNode &node) |
| void | orig_position_data_gather_bmesh (const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals) |
| std::optional< Span< float4 > > | orig_color_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| Span< float4 > | orig_color_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| std::optional< Span< int > > | orig_face_set_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| std::optional< Span< int > > | orig_face_set_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node) |
| std::optional< Span< float > > | orig_mask_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node) |
| std::optional< Span< float > > | orig_mask_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node) |
| bool | brush_type_is_paint (const int tool) |
| bool | brush_type_is_mask (const int tool) |
| BLI_INLINE bool | brush_type_is_attribute_only (const int tool) |
| bool | brush_uses_vector_displacement (const Brush &brush) |
Stroke Functions | |
| void | geometry_preview_lines_update (Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius) |
| void | stroke_modifiers_check (Depsgraph &depsgraph, Object &ob, const Brush *brush) |
| float | raycast_init (ViewContext *vc, const float2 &mval, float3 &r_ray_start, float3 &r_ray_end, float3 &r_ray_normal, bool original) |
| std::optional< ActiveElementInfo > | active_element_info_get (ViewContext &vc, const float2 &mval) |
| std::optional< CursorGeometryInfo > | cursor_geometry_info_update (bContext *C, const float2 &mval, const bool use_sampled_normal) |
| std::optional< CursorGeometryInfo > | cursor_geometry_info_update (Depsgraph &depsgraph, const Paint &paint, const Sculpt *sd, ViewContext &vc, const Base *base, const float2 &mval, const bool use_sampled_normal) |
| std::optional< float3 > | stroke_get_location_bvh (Depsgraph &depsgraph, ViewContext &vc, const Sculpt &sd, const Brush *brush, const float mval[2], const bool force_original) |
| std::optional< float3 > | stroke_get_location_bvh (Depsgraph &depsgraph, ViewContext &vc, const Paint &paint, const Brush *brush, const float2 mval, const bool force_original) |
| std::optional< float3 > | stroke_get_location_bvh (bContext *C, const float2 mval, const bool force_original) |
Mode toggling | |
| static void | ensure_valid_pivot (const Object &ob, Paint &paint) |
| static void | init_session (Main &bmain, Depsgraph &depsgraph, Paint &paint, Object &ob, eObjectMode object_mode) |
| void | mode_enter_generic (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, const eObjectMode mode_flag) |
| void | mode_exit_generic (Scene &scene, Object &ob, const eObjectMode mode_flag) |
Stroke-level Symmetry | |
| static void | do_radial_symmetry (const Depsgraph &depsgraph, const Scene &scene, const Paint &, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data, const ePaintSymmetryFlags symm, const int axis) |
| void | do_symmetrical_brush_actions (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data) |
| static float | calc_overlap (const StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis, const float angle) |
| static float | calc_radial_symmetry_feather (const Mesh &mesh, const StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis) |
| static float | calc_symmetry_feather (const Paint &paint, const ePaintSymmetryFlags symm, const Mesh &mesh, const StrokeCache &cache) |
| static void | do_tiled (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data) |
| static void | do_radial_symmetry_with_tiling (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data, const ePaintSymmetryFlags symm, const int axis) |
| void | do_symmetrical_brush_actions_with_tiling_and_feathering (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data) |
StrokeCache Helpers | |
| void | stroke_cache_common_init (ViewContext &vc, const Paint &paint, const Brush &brush, Object &object, const float2 mval) |
BVH Query Helper | |
| IndexMask | gather_brush_nodes (const Object &ob, const Brush &brush, IndexMaskMemory &memory, FunctionRef< bool(const bke::pbvh::Node &)> node_ignore_fn) |
Brush Capabilities | |
Avoid duplicate checks, internal logic only, share logic with #rna_def_sculpt_capabilities where possible. | |
| static bool | brush_type_needs_original (const char sculpt_brush_type) |
| static bool | brush_uses_topology_rake (const SculptSession &ss, const Brush &brush) |
| static int | sculpt_brush_needs_normal (const SculptSession &ss, const Brush &brush) |
| static bool | brush_needs_rake_rotation (const Brush &brush) |
Sculpt Paint Mesh | |
| const float * | brush_frontface_normal_from_falloff_shape (const SculptSession &ss, char falloff_shape) |
Generic Brush Utilities | |
| static float | brush_flip (const Brush &brush, const StrokeCache &cache) |
| static float | brush_strength (const Sculpt &sd, const StrokeCache &cache) |
| void | apply_brush_texture (const PaintMode paint_mode, const SculptSession &ss, const Brush &brush, const float brush_point[3], const int thread_id, float *r_value, float4 &r_rgba) |
| void | calc_vertex_displacement (const SculptSession &ss, const Brush &brush, float translation[3]) |
| bool | node_fully_masked_or_hidden (const bke::pbvh::Node &node) |
| bool | node_in_sphere (const bke::pbvh::Node &node, const float3 &location, const float radius_sq, const bool original) |
| bool | node_in_cylinder (const DistRayAABB_Precalc &ray_dist_precalc, const bke::pbvh::Node &node, const float radius_sq, const bool original) |
| bool | node_in_box (const float4x4 &mat, const Bounds< float3 > &bounds, const float3 &brush_center, const float3 &brush_half_lengths, const bool test_z_axis) |
| bool | node_in_box_positive_z (const float4x4 &mat, const Bounds< float3 > &bounds) |
| static IndexMask | pbvh_gather_cursor_update (Object &ob, bool use_original, IndexMaskMemory &memory) |
| static IndexMask | pbvh_gather_generic (Object &ob, const Brush &brush, const bool use_original, const float radius_scale, IndexMaskMemory &memory) |
| static IndexMask | pbvh_gather_generic_cube (Object &ob, const Brush &brush, const float4x4 &brush_local_mat, const bool use_original, IndexMaskMemory &memory) |
| IndexMask | gather_nodes (const bke::pbvh::Tree &pbvh, const eBrushFalloffShape falloff_shape, const bool use_original, const float3 &location, const float radius_sq, const std::optional< float3 > &ray_direction, IndexMaskMemory &memory) |
| static float3 | calc_sculpt_normal (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask) |
| static void | update_sculpt_normal (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const brushes::CursorSampleResult &cursor_sample_result) |
| static void | calc_local_from_screen (const ViewContext &vc, const float center[3], const float screen_dir[2], float r_local_dir[3]) |
| float3 | calc_motion_normal_from_angle (const ViewContext &vc, const float3 &tip_location, const float angle) |
| void | calc_brush_local_mat (const float3 &tip_normal, const float3 &motion_normal_local, const float3 &tip_location, const float radius, float local_mat[4][4], float local_mat_inv[4][4]) |
| float3 | tilt_apply_to_normal (const Object &object, const float4x4 &view_inverse, const float3 &normal, const float2 &tilt, const float tilt_strength) |
| float3 | tilt_apply_to_normal (const float3 &normal, const StrokeCache &cache, const float tilt_strength) |
| float3 | tilt_effective_normal_get (const SculptSession &ss, const Brush &brush) |
| static void | update_brush_local_mat (const Sculpt &sd, Object &ob) |
Generic Brush Plane & Symmetry Utilities | |
| ePaintSymmetryAreas | get_vertex_symm_area (const float co[3]) |
| static void | flip_qt_qt (float out[4], const float in[4], const ePaintSymmetryFlags symm) |
| static void | flip_qt (float quat[4], const ePaintSymmetryFlags symm) |
| float3 | flip_v3_by_symm_area (const float3 &vector, const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float3 &pivot) |
| void | flip_quat_by_symm_area (float quat[4], const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float pivot[3]) |
| void | calc_brush_plane (const Depsgraph &depsgraph, const Brush &brush, Object &ob, const IndexMask &node_mask, float3 &r_area_no, float3 &r_area_co) |
| float | brush_plane_offset_get (const Brush &brush, const SculptSession &ss) |
Sculpt Update Functions | |
| void | flush_update_step (bContext *C, const UpdateType update_type) |
| void | flush_update_step (ViewContext &vc, Object &object, const UpdateType update_type) |
| void | flush_update_done (bContext *C, Object &ob, const UpdateType update_type) |
| void | flush_update_done (ViewContext &vc, const wmWindowManager &wm, Object &ob, const UpdateType update_type) |
Sculpt Poll Functions | |
| bool | color_supported_check (const Scene &scene, Object &object, ReportList *reports) |
Set Persistent Base Operator | |
| static wmOperatorStatus | set_persistent_base_exec (bContext *C, wmOperator *) |
| static void | SCULPT_OT_set_persistent_base (wmOperatorType *ot) |
Optimize Operator | |
| static wmOperatorStatus | optimize_exec (bContext *C, wmOperator *) |
| static void | SCULPT_OT_optimize (wmOperatorType *ot) |
Symmetrize Operator | |
| static bool | no_multires_poll (bContext *C) |
| static wmOperatorStatus | symmetrize_exec (bContext *C, wmOperator *op) |
| static void | SCULPT_OT_symmetrize (wmOperatorType *ot) |
Variables | |
| constexpr int | AntiAliasingSamplesPerTexelAxisMin = 3 |
| constexpr int | AntiAliasingSamplesPerTexelAxisMax = 16 |
| constexpr int | CurveSamplesBaseLen = 1024 |
| Number of samples to use between 0..1. | |
| constexpr int | CurveSamplesLen = M_SQRT2 * CurveSamplesBaseLen + 1 |
| Number of samples to store in the cache. | |
| static constexpr int | face_set_none_id = 0 |
| static constexpr int | plane_brush_max_rolling_average_num = 20 |
| static constexpr float | transform_mirror_max_distance_eps = 0.00002f |
| static EnumPropertyItem | prop_sculpt_pivot_position_types [] |
Calculate Normal and Center | |
Calculate geometry surrounding the brush center. (optionally using original coordinates). Functions are:
| |
| enum class | AverageDataFlags : uint8_t { Position = 1 << 0 , Normal = 1 << 1 , All = Position | Normal } |
| static float | area_normal_and_center_get_normal_radius (const SculptSession &ss, const Brush &brush) |
| static float | area_normal_and_center_get_position_radius (const SculptSession &ss, const Brush &brush) |
| static float | area_normal_calc_weight (const float distance, const float radius_inv) |
| static float3 | area_center_calc_weighted (const float3 &test_location, const float distance, const float radius_inv, const float3 &co) |
| static void | accumulate_area_center (const float3 &test_location, const float3 &position, const float distance, const float radius_inv, const int flip_index, AreaNormalCenterData &anctd) |
| static void | accumulate_area_normal (const float3 &normal, const float distance, const float radius_inv, const int flip_index, AreaNormalCenterData &anctd) |
| ENUM_OPERATORS (AverageDataFlags) | |
| static void | calc_area_normal_and_center_node_mesh (const Object &object, const Span< float3 > vert_positions, const Span< float3 > vert_normals, const Span< bool > hide_vert, const Brush &brush, const AverageDataFlags flag, const bke::pbvh::MeshNode &node, AreaNormalCenterData &anctd) |
| static void | calc_area_normal_and_center_node_grids (const Object &object, const Brush &brush, const AverageDataFlags flag, const bke::pbvh::GridsNode &node, SampleLocalData &tls, AreaNormalCenterData &anctd) |
| static void | calc_area_normal_and_center_node_bmesh (const Object &object, const Brush &brush, const AverageDataFlags flag, const bool has_bm_orco, const bke::pbvh::BMeshNode &node, SampleLocalData &tls, AreaNormalCenterData &anctd) |
| static AreaNormalCenterData | calc_area_normal_and_center_reduce (const AreaNormalCenterData &a, const AreaNormalCenterData &b) |
| void | calc_area_center (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_co[3]) |
| std::optional< float3 > | calc_area_normal (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask) |
| static void | calc_stabilized_plane (const Brush &brush, StrokeCache &cache, const float3 &plane_normal, const float3 &plane_center, float3 &r_stabilized_normal, float3 &r_stabilized_center) |
| void | calc_area_normal_and_center (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_no[3], float r_area_co[3]) |
Sculpt mesh accessor API | |
| using | BMeshNeighborVerts = Vector<BMVert *, 64> |
| Span< int > | fake_neighbors_ensure (const Depsgraph &depsgraph, Object &ob, const float max_dist) |
| void | fake_neighbors_free (Object &ob) |
| bool | vertex_is_occluded (const Depsgraph &depsgraph, const Object &object, const float3 &position, bool original) |
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space:
The code below uses a prefix naming convention to indicate the coordinate space:
| using blender::ed::sculpt_paint::BMeshNeighborVerts = Vector<BMVert *, 64> |
Definition at line 603 of file mesh/sculpt_intern.hh.
Main brush action callback
Definition at line 44 of file mesh_paint.hh.
Projects a screen-space displacement vector into layer space. Current position (in layer space) is used to compute the perspective distance (zfac). Returns the new layer space position with the projected delta applied.
Definition at line 35 of file grease_pencil_intern.hh.
| using blender::ed::sculpt_paint::GeometryExtractTagMeshFunc = void(BMesh *, GeometryExtractParams *) |
Definition at line 79 of file sculpt_mask_extract.cc.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Cancel | |
| Confirm | |
| ExtensionModeToggle | |
| ExtensionLengthen | |
| ExtensionShorten | |
| ExtensionDrag | |
| ExtensionCollide | |
| Invert | |
| Precision | |
Definition at line 1945 of file draw_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Curve | |
| Cursor2D | |
| Cursor3D | |
Definition at line 23 of file paint_cursor.hh.
|
strong |
| Enumerator | |
|---|---|
| Origin | |
| Unmasked | |
| MaskBorder | |
| ActiveVert | |
| CursorSurface | |
Definition at line 646 of file sculpt_transform.cc.
|
strong |
| Enumerator | |
|---|---|
| Original | |
| Incremental | |
Definition at line 147 of file mesh/sculpt_intern.hh.
|
strong |
| Enumerator | |
|---|---|
| Position | |
| Mask | |
| Visibility | |
| Color | |
| FaceSet | |
Definition at line 127 of file mesh/sculpt_intern.hh.
|
static |
Definition at line 37 of file paint_image_2d_curve_mask.cc.
References aa_samples_per_texel_axis(), AntiAliasingSamplesPerTexelAxisMax, AntiAliasingSamplesPerTexelAxisMin, blender::BRUSH_PAINT_ANTIALIASING, and blender::clamp_i().
Referenced by aa_samples_per_texel_axis(), and update_curve_mask().
|
static |
Definition at line 1424 of file sculpt.cc.
References accumulate_area_center(), area_center_calc_weighted(), blender::ed::sculpt_paint::AreaNormalCenterData::area_cos, blender::ed::sculpt_paint::AreaNormalCenterData::count_co, distance(), and position.
Referenced by accumulate_area_center(), calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1436 of file sculpt.cc.
References accumulate_area_normal(), area_normal_calc_weight(), blender::ed::sculpt_paint::AreaNormalCenterData::area_nos, blender::ed::sculpt_paint::AreaNormalCenterData::count_no, and distance().
Referenced by accumulate_area_normal(), calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 703 of file sculpt_transform.cc.
References accumulate_weighted_average_position(), blender::BLI_assert(), BLI_NOINLINE, blender::Span< T >::index_range(), blender::ed::sculpt_paint::AveragePositionAccumulation::position, blender::Span< T >::size(), and blender::ed::sculpt_paint::AveragePositionAccumulation::weight_total.
Referenced by accumulate_weighted_average_position().
| std::optional< ActiveElementInfo > blender::ed::sculpt_paint::active_element_info_get | ( | ViewContext & | vc, |
| const float2 & | mval ) |
Retrieve the active vertex and active grid or face index.
Definition at line 4512 of file sculpt.cc.
References active_element_info_get(), blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::ActiveElementInfo::active_face_idx, blender::ed::sculpt_paint::ActiveElementInfo::active_grid_idx, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::BKE_base_is_visible(), blender::BKE_view_layer_base_find(), blender::BKE_view_layer_synced_ensure(), blender::ViewContext::bmain, blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::Object::data, blender::ViewContext::depsgraph, blender::ed::sculpt_paint::RaycastData::depth, blender::bke::Face, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::Object::runtime, blender::ViewContext::rv3d, blender::ViewContext::scene, sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::use_original, blender::ViewContext::v3d, blender::ed::sculpt_paint::ActiveElementInfo::vert, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), and blender::ViewContext::view_layer.
Referenced by active_element_info_get(), and sample_mesh_attribute_color().
|
inline |
Definition at line 555 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), append_neighbors_to_vector(), blender::bke::mesh::face_find_adjacent_verts(), blender::Span< T >::is_empty(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by append_neighbors_to_vector(), calc_vert_neighbors(), and calc_vert_neighbors_interior_impl().
| void blender::ed::sculpt_paint::apply_brush_texture | ( | PaintMode | paint_mode, |
| const SculptSession & | ss, | ||
| const Brush & | brush, | ||
| const float | brush_point[3], | ||
| int | thread_id, | ||
| float * | r_value, | ||
| float4 & | r_rgba ) |
Sample the brush's texture value.
Definition at line 2410 of file sculpt.cc.
References blender::add_v3_fl(), apply_brush_texture(), blender::BKE_brush_mask_texture_get(), blender::BKE_brush_sample_tex_3d(), blender::ed::sculpt_paint::StrokeCache::brush_local_mat, blender::MTex::brush_map_mode, blender::SculptSession::cache, blender::copy_v4_fl(), blender::ED_view3d_project_float_v2_m4(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::MTEX_MAP_MODE_3D, blender::MTEX_MAP_MODE_AREA, blender::mul_m4_v3(), blender::MTex::ofs, blender::ed::sculpt_paint::StrokeCache::paint, blender::paint_get_tex_pixel(), blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::ViewContext::region, blender::MTex::size, blender::sub_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::MTex::tex, blender::SculptSession::tex_pool, blender::ed::sculpt_paint::StrokeCache::vc, blender::x, and y.
Referenced by apply_brush_texture(), calc_brush_texture_factors(), and calc_brush_texture_factors().
| void blender::ed::sculpt_paint::apply_crazyspace_to_translations | ( | Span< float3x3 > | deform_imats, |
| Span< int > | verts, | ||
| MutableSpan< float3 > | translations ) |
Rotate translations to account for rotations from procedural deformation.
Definition at line 7652 of file sculpt.cc.
References apply_crazyspace_to_translations(), blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
Referenced by apply_crazyspace_to_translations(), blender::ed::sculpt_paint::PositionDeformData::deform(), and blender::ed::sculpt_paint::undo::restore_position_from_undo_step().
|
inline |
Definition at line 359 of file mesh_brush_common.hh.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::hardness, and blender::ed::sculpt_paint::StrokeCache::radius.
| void blender::ed::sculpt_paint::apply_hardness_to_distances | ( | float | radius, |
| float | hardness, | ||
| MutableSpan< float > | distances ) |
Scale the distances based on the brush radius and the cached "hardness" setting, which increases the strength of the effect for vertices towards the outside of the radius.
Definition at line 7473 of file sculpt.cc.
References apply_hardness_to_distances(), blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, and blender::math::rcp().
Referenced by apply_hardness_to_distances(), apply_hardness_to_distances(), blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().
|
static |
Definition at line 375 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), blender::BKE_kelvinlet_grab_triscale(), BLI_NOINLINE, and blender::Span< T >::index_range().
Referenced by apply_kelvinet_to_translations(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), and elastic_transform_node_mesh().
|
static |
Definition at line 289 of file paint_sample_color.cc.
References blender::Palette::active_color, apply_sampled_color(), blender::BKE_brush_color_set(), blender::BKE_paint_brush(), blender::BKE_paint_palette(), blender::BKE_paint_palette_set(), blender::BKE_palette_add(), blender::BKE_palette_color_add(), blender::BKE_palette_color_set(), and blender::Palette::colors.
Referenced by apply_sampled_color(), sample_color_exec(), sample_color_invoke(), and sample_color_modal().
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3 > | translations, |
| const Set< BMVert *, 0 > & | verts ) |
Definition at line 7625 of file sculpt.cc.
References blender::add_v3_v3(), apply_translations(), blender::BLI_assert(), blender::Span< T >::cast(), contains_nan(), blender::Editor, PRF_scope, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3 > | translations, |
| Span< int > | grids, | ||
| SubdivCCG & | subdiv_ccg ) |
Definition at line 7606 of file sculpt.cc.
References apply_translations(), blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::Span< T >::cast(), contains_nan(), blender::Editor, blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), blender::SubdivCCG::positions, PRF_scope, blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3 > | translations, |
| Span< int > | verts, | ||
| MutableSpan< float3 > | positions ) |
Many brushes end up calculating translations from the original positions. Instead of applying these directly to the modified values, it's helpful to process them separately to easily calculate various effects like clipping. After they are processed, this function can be used to simply add them to the final vertex positions.
Definition at line 7592 of file sculpt.cc.
References apply_translations(), blender::BLI_assert(), blender::Span< T >::cast(), contains_nan(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), apply_translations(), apply_translations(), apply_translations(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::PositionDeformData::deform(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), transform_node_bmesh(), and transform_node_grids().
|
static |
Definition at line 1411 of file sculpt.cc.
References area_center_calc_weighted(), and distance().
Referenced by accumulate_area_center(), and area_center_calc_weighted().
|
static |
Definition at line 1375 of file sculpt.cc.
References area_normal_and_center_get_normal_radius(), blender::SculptSession::cache, blender::SculptSession::cursor_radius, blender::OB_MODE_SCULPT, and blender::ed::sculpt_paint::StrokeCache::radius.
Referenced by area_normal_and_center_get_normal_radius(), calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1384 of file sculpt.cc.
References area_normal_and_center_get_position_radius(), blender::BRUSH_AREA_RADIUS_PRESSURE, blender::SculptSession::cache, blender::SculptSession::cursor_radius, blender::OB_MODE_SCULPT, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::radius, and blender::SCULPT_BRUSH_TYPE_PLANE.
Referenced by area_normal_and_center_get_position_radius(), calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1404 of file sculpt.cc.
References area_normal_calc_weight(), and distance().
Referenced by accumulate_area_normal(), and area_normal_calc_weight().
|
static |
Definition at line 5222 of file sculpt.cc.
References attribute_matches(), b, blender::bke::AttributeAccessor::lookup(), and blender::bke::GAttributeReader::sharing_info.
Referenced by attribute_matches(), store_mesh_from_eval(), and topology_matches().
|
static |
Definition at line 837 of file sculpt_transform.cc.
References average_mask_border_position(), combine_average_position_accumulation(), blender::data, blender::bke::pbvh::Grids, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::bke::pbvh::Mesh, node, node_fully_masked_or_hidden(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::math::safe_divide(), blender::bke::pbvh::search_nodes(), blender::SculptSession::subdiv_ccg, and blender::bke::pbvh::vert_positions_eval().
Referenced by average_mask_border_position(), and set_pivot_position_exec().
|
static |
Definition at line 715 of file sculpt_transform.cc.
References average_unmasked_position(), combine_average_position_accumulation(), blender::data, blender::bke::pbvh::Grids, blender::index_mask::IndexMask::index_range(), blender::bke::pbvh::Mesh, node, node_fully_masked_or_hidden(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::math::safe_divide(), blender::bke::pbvh::search_nodes(), blender::SculptSession::subdiv_ccg, and blender::bke::pbvh::vert_positions_eval().
Referenced by average_unmasked_position(), and set_pivot_position_exec().
|
static |
Definition at line 508 of file mesh/paint_cursor.cc.
References blender::SculptSession::boundary_preview, boundary_preview_pivot_draw(), blender::immUniformColor4f(), blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::region, screen_space_point_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by boundary_preview_pivot_draw(), and screen_space_overlays_draw().
|
static |
Definition at line 523 of file mesh/paint_cursor.cc.
References blender::BKE_sculptsession_update_for_edit(), blender::SculptSession::boundary_preview, boundary_preview_update(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::ViewContext::obact, blender::ed::sculpt_paint::boundary::preview_data_init(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by boundary_preview_update(), and screen_space_overlays_draw().
|
static |
Definition at line 57 of file brush_asset_ops.cc.
References blender::asset_system::all_library_reference(), blender::bke::asset_edit_id_from_weak_reference(), blender::BKE_paint_get_active_from_context(), blender::BKE_paint_previous_asset_reference_clear(), blender::BKE_paint_previous_asset_reference_set(), blender::BKE_report(), blender::BKE_reportf(), brush_asset_activate_exec(), C, blender::CTX_data_main(), blender::G, blender::ID_BR, NA_ACTIVATED, NC_ASSET, NC_SCENE, ND_TOOLSETTINGS, blender::ed::asset::operator_asset_reference_props_get_asset_from_all_library(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RPT_ERROR, blender::RPT_WARNING, blender::ed::asset::list::storage_fetch_blocking(), blender::WM_main_add_notifier(), and blender::WM_toolsystem_activate_brush_and_tool().
Referenced by brush_asset_activate_exec(), and BRUSH_OT_asset_activate().
|
static |
Definition at line 622 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_delete(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set_default(), blender::BKE_paint_get_active_from_context(), blender::BKE_preferences_asset_library_find_by_name(), brush_asset_delete_exec(), C, blender::CTX_data_main(), NA_EDITED, NA_REMOVED, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, blender::OPERATOR_FINISHED, blender::ed::asset::refresh_asset_library(), blender::wmOperator::reports, blender::U, and blender::WM_main_add_notifier().
Referenced by brush_asset_delete_exec(), and BRUSH_OT_asset_delete().
|
static |
Definition at line 647 of file brush_asset_ops.cc.
References blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), brush_asset_delete_invoke(), C, ID_IS_LINKED, IFACE_, blender::ui::Warning, and blender::WM_operator_confirm_ex().
Referenced by brush_asset_delete_invoke(), and BRUSH_OT_asset_delete().
|
static |
Definition at line 603 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), brush_asset_delete_poll(), C, blender::CTX_wm_operator_poll_msg_set(), and ID_IS_LINKED.
Referenced by brush_asset_delete_poll(), and BRUSH_OT_asset_delete().
|
static |
Definition at line 390 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_save(), blender::AssetMetaData::author, blender::BKE_asset_metadata_catalog_id_set(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BLI_assert(), brush_asset_edit_metadata_exec(), C, blender::asset_system::AssetCatalog::catalog_id, blender::ed::asset::catalogs_save_from_asset_reference(), blender::CTX_data_main(), blender::AssetMetaData::description, blender::ed::asset::find_asset_from_weak_ref(), blender::asset_system::AssetCatalogPath::from_user_input(), ID_IS_ASSET, blender::ed::asset::library_ensure_catalogs_in_path(), MAX_NAME, NA_EDITED, NC_ASSET, ND_ASSET_LIST, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::ed::asset::refresh_asset_library_from_asset(), blender::wmOperator::reports, blender::RNA_string_get(), blender::RNA_string_get_alloc(), blender::asset_system::AssetCatalog::simple_name, and blender::WM_main_add_notifier().
Referenced by brush_asset_edit_metadata_exec(), and BRUSH_OT_asset_edit_metadata().
|
static |
Definition at line 433 of file brush_asset_ops.cc.
References blender::AssetMetaData::author, blender::BKE_paint_get_active_from_context(), brush_asset_edit_metadata_invoke(), C, blender::AssetMetaData::catalog_id, blender::AssetMetaData::description, blender::ed::asset::find_asset_from_weak_ref(), IFACE_, blender::OPERATOR_CANCELLED, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_string_set(), blender::RNA_struct_property_is_set(), and blender::WM_operator_props_dialog_popup().
Referenced by brush_asset_edit_metadata_invoke(), and BRUSH_OT_asset_edit_metadata().
|
static |
Definition at line 485 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), blender::ASSET_LIBRARY_LOCAL, blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), BLI_assert_unreachable, brush_asset_edit_metadata_poll(), C, blender::CTX_wm_operator_poll_msg_set(), blender::CTX_wm_reports(), blender::ed::asset::find_asset_from_weak_ref(), and ID_IS_ASSET.
Referenced by brush_asset_edit_metadata_poll(), BRUSH_OT_asset_edit_metadata(), and BRUSH_OT_asset_load_preview().
|
static |
Definition at line 542 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_save(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_previewimg_id_custom_set(), blender::BKE_reportf(), blender::BLI_assert(), blender::BLI_is_file(), brush_asset_load_preview_exec(), C, blender::CTX_data_main(), FILE_MAX, blender::ed::asset::find_asset_from_weak_ref(), ID_IS_ASSET, NA_EDITED, NC_ASSET, ND_ASSET_LIST, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::ed::asset::refresh_asset_library_from_asset(), blender::wmOperator::reports, blender::RNA_string_get(), blender::RPT_ERROR, and blender::WM_main_add_notifier().
Referenced by brush_asset_load_preview_exec(), brush_asset_load_preview_invoke(), and BRUSH_OT_asset_load_preview().
|
static |
Definition at line 574 of file brush_asset_ops.cc.
References brush_asset_load_preview_exec(), brush_asset_load_preview_invoke(), C, blender::wmOperator::ptr, blender::RNA_struct_property_is_set(), and blender::WM_operator_filesel().
Referenced by brush_asset_load_preview_invoke(), and BRUSH_OT_asset_load_preview().
|
static |
Definition at line 782 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_revert(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set(), blender::BKE_paint_brush_set_default(), blender::BKE_paint_get_active_from_context(), blender::BLI_assert(), brush_asset_revert_exec(), C, blender::CTX_data_main(), blender::GS(), blender::ID_BR, NA_EDITED, NC_BRUSH, NC_TEXTURE, ND_NODES, blender::OPERATOR_FINISHED, blender::wmOperator::reports, and blender::WM_main_add_notifier().
Referenced by brush_asset_revert_exec(), and BRUSH_OT_asset_revert().
|
static |
Definition at line 761 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_editable(), blender::ASSET_LIBRARY_LOCAL, blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), brush_asset_revert_poll(), C, blender::CTX_wm_operator_poll_msg_set(), and get_asset_library_reference().
Referenced by brush_asset_revert_poll(), and BRUSH_OT_asset_revert().
|
static |
Definition at line 170 of file brush_asset_ops.cc.
References blender::AS_asset_library_load(), blender::ID::asset_data, blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_save_as(), blender::ASSET_LIBRARY_LOCAL, blender::BKE_asset_metadata_catalog_id_set(), blender::BKE_asset_metadata_copy(), blender::BKE_asset_metadata_free(), blender::BKE_brush_duplicate(), blender::BKE_libblock_rename(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), blender::BLI_assert(), brush_asset_save_as_exec(), C, blender::asset_system::AssetCatalog::catalog_id, blender::CTX_data_main(), blender::asset_system::current_file_library_reference(), blender::asset_system::AssetCatalogPath::from_user_input(), blender::ed::asset::generate_preview(), blender::ed::asset::get_asset_library_from_opptr(), blender::Brush::id, blender::ID_BR, ID_IS_ASSET, blender::LIB_ID_DUPLICATE_IS_ROOT_ID, blender::ed::asset::library_ensure_catalogs_in_path(), blender::ed::asset::mark_id(), MAX_NAME, NA_ADDED, NA_EDITED, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::ed::asset::refresh_asset_library(), blender::wmOperator::reports, blender::RNA_enum_get(), blender::RNA_property_is_set(), blender::RNA_property_string_get(), blender::RNA_string_get(), blender::RNA_struct_find_property(), blender::RPT_ERROR, blender::RPT_WARNING, blender::ed::asset::shelf::show_catalog_in_visible_shelves(), blender::asset_system::AssetCatalog::simple_name, STRNCPY_UTF8, blender::USER_DUP_LINKED_ID, blender::USER_DUP_OBDATA, blender::ed::asset::user_library_to_library_ref(), blender::WM_file_tag_modified(), blender::WM_main_add_notifier(), and blender::WM_toolsystem_activate_brush_and_tool().
Referenced by brush_asset_save_as_exec(), and BRUSH_OT_asset_save_as().
|
static |
Definition at line 292 of file brush_asset_ops.cc.
References blender::BKE_paint_get_active_from_context(), blender::BKE_report(), brush_asset_save_as_invoke(), C, blender::ed::asset::find_asset_from_weak_ref(), blender::ed::asset::get_user_library_ref_for_save(), IFACE_, blender::ed::asset::library_reference_to_enum_value(), blender::OPERATOR_CANCELLED, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_enum_set(), blender::RNA_string_set(), blender::RNA_struct_property_is_set(), blender::RNA_struct_property_is_set_ex(), blender::RPT_WARNING, and blender::WM_operator_props_dialog_popup().
Referenced by brush_asset_save_as_invoke(), and BRUSH_OT_asset_save_as().
|
static |
Definition at line 154 of file brush_asset_ops.cc.
References blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), brush_asset_save_as_poll(), and C.
Referenced by brush_asset_save_as_poll(), and BRUSH_OT_asset_save_as().
|
static |
Definition at line 726 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_save(), blender::AssetWeakReference::asset_library_identifier, blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_preferences_asset_library_find_by_name(), blender::BLI_assert(), brush_asset_save_exec(), C, blender::CTX_data_main(), ID_IS_ASSET, NA_EDITED, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::ed::asset::refresh_asset_library(), blender::wmOperator::reports, blender::U, and blender::WM_main_add_notifier().
Referenced by brush_asset_save_exec(), and BRUSH_OT_asset_save().
|
static |
Definition at line 699 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), blender::ASSET_LIBRARY_LOCAL, blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), brush_asset_save_poll(), C, blender::CTX_wm_operator_poll_msg_set(), and get_asset_library_reference().
Referenced by brush_asset_save_poll(), and BRUSH_OT_asset_save().
| bool blender::ed::sculpt_paint::brush_cursor_poll | ( | bContext * | C | ) |
Determines whether or not the brush cursor should be shown in the viewport
Definition at line 3855 of file sculpt.cc.
References brush_cursor_poll(), C, is_brush_related_tool(), paint_brush_cursor_poll(), and sculpt_mode_poll().
Referenced by brush_cursor_poll(), and mode_enter_generic().
|
static |
Definition at line 4122 of file sculpt.cc.
References blender::SculptSession::active_vert(), blender::SculptSession::active_vert_position(), blender::add_v3_v3(), blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), blender::BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_delta_update(), blender::BRUSH_GRAB_ACTIVE_VERTEX, brush_needs_rake_rotation(), blender::BRUSH_STROKE_ANCHORED, brush_uses_topology_rake(), blender::SculptSession::cache, blender::copy_v2_v2(), blender::copy_v3_v3(), blender::bke::PaintRuntime::draw_anchored, blender::ED_view3d_win_to_3d(), ELEM, eps, blender::ed::sculpt_paint::SculptRakeData::follow_co, blender::ed::sculpt_paint::SculptRakeData::follow_dist, blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::invert_m4_m4(), blender::is_zero_v3(), blender::len_squared_v3v3(), blender::ed::sculpt_paint::StrokeCache::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::StrokeCache::mouse_event, blender::mul_mat3_m4_v3(), blender::mul_v3_m4v3(), need_delta_for_tip_orientation(), need_delta_from_anchored_origin(), blender::normalize_v3(), blender::ed::sculpt_paint::StrokeCache::old_grab_location, blender::ed::sculpt_paint::StrokeCache::orig_grab_location, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::bke::PaintRuntime::pixel_radius, blender::project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::rake_data, rake_data_update(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, blender::ViewContext::region, blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, SCULPT_RAKE_BRUSH_FACTOR, blender::bke::ObjectRuntime::sculpt_session, sqrtf, blender::square_f(), stroke_is_first_brush_step_of_symmetry_pass(), blender::sub_v3_v3(), blender::sub_v3_v3v3(), blender::math::to_quaternion(), blender::v2, blender::ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, vert_positions_for_grab_active_get(), blender::ed::sculpt_paint::StrokeCache::view_normal, and blender::zero_v3().
Referenced by brush_delta_update(), and stroke_cache_update().
|
static |
Definition at line 4059 of file sculpt.cc.
References blender::BKE_curvemapping_evaluateF(), brush_dynamic_size_get(), blender::ed::sculpt_paint::brushes::clay_thumb_get_stabilized_pressure(), blender::max_ff(), blender::pow3f(), powf, blender::ed::sculpt_paint::StrokeCache::pressure, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, and blender::SCULPT_BRUSH_TYPE_CLAY_THUMB.
Referenced by brush_dynamic_size_get(), and stroke_cache_update().
|
static |
Definition at line 5714 of file sculpt.cc.
References blender::BKE_brush_mask_texture_get(), blender::BKE_paint_brush(), brush_exit_tex(), blender::bke::bNodeTreeRuntime::execdata, blender::Tex::nodetree, blender::ntreeTexEndExecTree(), blender::Sculpt::paint, blender::bNodeTree::runtime, blender::Sculpt, and blender::MTex::tex.
Referenced by brush_exit_tex(), and blender::ed::sculpt_paint::SculptPaintStroke::done().
|
static |
Calculates the sign of the direction of the brush stroke, typically indicates whether the stroke will deform a surface inwards or outwards along the brush normal.
Definition at line 2249 of file sculpt.cc.
References blender::BRUSH_DIR_IN, brush_flip(), blender::ed::sculpt_paint::StrokeToggleSettings::invert, invert(), and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by brush_flip(), brush_strength(), and stroke_cache_init().
| const float * blender::ed::sculpt_paint::brush_frontface_normal_from_falloff_shape | ( | const SculptSession & | ss, |
| char | falloff_shape ) |
Definition at line 1341 of file sculpt.cc.
References blender::BLI_assert(), brush_frontface_normal_from_falloff_shape(), blender::SculptSession::cache, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by brush_frontface_normal_from_falloff_shape(), blender::calculate_average_weight(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), and blender::vpaint_do_draw().
|
static |
Definition at line 4926 of file sculpt.cc.
References blender::BKE_brush_mask_texture_get(), blender::BKE_image_pool_new(), blender::BKE_paint_brush_for_read(), brush_init_tex(), blender::Tex::nodetree, blender::ntreeTexBeginExecTree(), blender::Sculpt::paint, blender::Sculpt, blender::MTex::tex, and blender::SculptSession::tex_pool.
Referenced by brush_init_tex(), and brush_stroke_init().
|
static |
Definition at line 965 of file sculpt.cc.
References brush_needs_rake_rotation(), and blender::bke::brush::supports_rake_factor().
Referenced by brush_delta_update(), and brush_needs_rake_rotation().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_activate | ( | wmOperatorType * | ot | ) |
Definition at line 136 of file brush_asset_ops.cc.
References brush_asset_activate_exec(), BRUSH_OT_asset_activate(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::ed::asset::operator_asset_reference_props_register(), blender::PROP_HIDDEN, blender::PROP_SKIP_SAVE, blender::RNA_def_boolean(), blender::RNA_def_property_flag(), and blender::wmOperatorType::srna.
Referenced by BRUSH_OT_asset_activate(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_delete | ( | wmOperatorType * | ot | ) |
Definition at line 666 of file brush_asset_ops.cc.
References brush_asset_delete_exec(), brush_asset_delete_invoke(), brush_asset_delete_poll(), BRUSH_OT_asset_delete(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by BRUSH_OT_asset_delete(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_edit_metadata | ( | wmOperatorType * | ot | ) |
Definition at line 524 of file brush_asset_ops.cc.
References brush_asset_edit_metadata_exec(), brush_asset_edit_metadata_invoke(), brush_asset_edit_metadata_poll(), BRUSH_OT_asset_edit_metadata(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, MAX_NAME, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::PROP_STRING_SEARCH_SUGGESTION, blender::RNA_def_property_string_search_func_runtime(), blender::RNA_def_string(), blender::wmOperatorType::srna, and visit_active_library_catalogs_catalog_for_search_fn().
Referenced by BRUSH_OT_asset_edit_metadata(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_load_preview | ( | wmOperatorType * | ot | ) |
Definition at line 584 of file brush_asset_ops.cc.
References brush_asset_edit_metadata_poll(), brush_asset_load_preview_exec(), brush_asset_load_preview_invoke(), BRUSH_OT_asset_load_preview(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::FILE_DEFAULTDISPLAY, blender::FILE_OPENFILE, blender::FILE_SORT_DEFAULT, blender::FILE_SPECIAL, blender::FILE_TYPE_FOLDER, blender::FILE_TYPE_IMAGE, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::WM_FILESEL_FILEPATH, and blender::WM_operator_properties_filesel().
Referenced by BRUSH_OT_asset_load_preview(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_revert | ( | wmOperatorType * | ot | ) |
Definition at line 804 of file brush_asset_ops.cc.
References brush_asset_revert_exec(), brush_asset_revert_poll(), BRUSH_OT_asset_revert(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by BRUSH_OT_asset_revert(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_save | ( | wmOperatorType * | ot | ) |
Definition at line 751 of file brush_asset_ops.cc.
References brush_asset_save_exec(), brush_asset_save_poll(), BRUSH_OT_asset_save(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, and blender::wmOperatorType::poll.
Referenced by BRUSH_OT_asset_save(), and blender::ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_save_as | ( | wmOperatorType * | ot | ) |
Definition at line 365 of file brush_asset_ops.cc.
References brush_asset_save_as_exec(), brush_asset_save_as_invoke(), brush_asset_save_as_poll(), BRUSH_OT_asset_save_as(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, MAX_NAME, blender::wmOperatorType::name, blender::wmOperatorType::poll, blender::wmOperatorType::prop, blender::PROP_ENUM, blender::PROP_NONE, blender::PROP_STRING_SEARCH_SUGGESTION, rna_asset_library_reference_itemf(), blender::RNA_def_enum_funcs(), blender::RNA_def_property(), blender::RNA_def_property_string_search_func_runtime(), blender::RNA_def_property_ui_text(), blender::RNA_def_string(), blender::wmOperatorType::srna, and visit_library_prop_catalogs_catalog_for_search_fn().
Referenced by BRUSH_OT_asset_save_as(), and blender::ED_operatortypes_paint().
| float blender::ed::sculpt_paint::brush_plane_offset_get | ( | const Brush & | brush, |
| const SculptSession & | ss ) |
Definition at line 3145 of file sculpt.cc.
References blender::BRUSH_OFFSET_PRESSURE, brush_plane_offset_get(), blender::SculptSession::cache, and blender::ed::sculpt_paint::StrokeCache::pressure.
Referenced by brush_plane_offset_get(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::brushes::do_plane_brush().
| float blender::ed::sculpt_paint::brush_radius_factor | ( | const Brush & | brush, |
| const StrokeExtension & | stroke_extension ) |
Definition at line 96 of file curves/sculpt_ops.cc.
References blender::BKE_brush_use_size_pressure(), blender::BKE_curvemapping_evaluateF(), brush_radius_factor(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_radius_factor(), brush_radius_get(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::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(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
| float blender::ed::sculpt_paint::brush_radius_get | ( | const Paint & | paint, |
| const Brush & | brush, | ||
| const StrokeExtension & | stroke_extension ) |
Definition at line 104 of file curves/sculpt_ops.cc.
References blender::BKE_brush_radius_get(), brush_radius_factor(), and brush_radius_get().
Referenced by brush_radius_get(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), and blender::ed::sculpt_paint::DensityAddOperationExecutor::execute().
|
static |
Definition at line 47 of file mesh/paint_cursor.cc.
References blender::add_v3_v3v3(), blender::BLI_assert(), brush_radius_project(), blender::cross_v3_v3v3(), blender::ED_view3d_global_to_vector(), blender::ED_view3d_project_float_global(), fabsf, blender::len_v2v2(), blender::mul_v3_fl(), blender::normalize_v3(), blender::ViewContext::region, blender::ViewContext::rv3d, blender::V3D_PROJ_RET_OK, and blender::V3D_PROJ_TEST_NOP.
Referenced by brush_radius_project(), and pixel_radius_update().
|
static |
Return modified brush strength. Includes the direction of the brush, positive values pull vertices, negative values push. Uses tablet pressure and a special multiplier found experimentally to scale the strength factor.
Definition at line 2262 of file sculpt.cc.
References blender::BKE_brush_alpha_get(), blender::BKE_brush_use_alpha_pressure(), blender::BKE_curvemapping_evaluateF(), blender::BKE_paint_brush_for_read(), BLI_assert_unreachable, blender::BRUSH_CLOTH_DEFORM_EXPAND, blender::BRUSH_CLOTH_DEFORM_GRAB, blender::BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_flip(), blender::BRUSH_MASK_DRAW, blender::BRUSH_MASK_SMOOTH, blender::BRUSH_PLANE_SWAP_HEIGHT_AND_DEPTH, brush_strength(), blender::bke::PaintRuntime::overlap_factor, blender::Sculpt::paint, blender::pow4f(), powf, blender::ed::sculpt_paint::StrokeCache::pressure, blender::Paint::runtime, blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_INFLATE, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SMOOTH, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by brush_strength(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
| float blender::ed::sculpt_paint::brush_strength_factor | ( | const Brush & | brush, |
| const StrokeExtension & | stroke_extension ) |
Definition at line 111 of file curves/sculpt_ops.cc.
References blender::BKE_brush_use_alpha_pressure(), blender::BKE_curvemapping_evaluateF(), brush_strength_factor(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_strength_factor(), and brush_strength_get().
| float blender::ed::sculpt_paint::brush_strength_get | ( | const Paint & | paint, |
| const Brush & | brush, | ||
| const StrokeExtension & | stroke_extension ) |
Definition at line 119 of file curves/sculpt_ops.cc.
References blender::BKE_brush_alpha_get(), brush_strength_factor(), and brush_strength_get().
Referenced by brush_strength_get(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
|
static |
Definition at line 4966 of file sculpt.cc.
References blender::BKE_paint_brush(), blender::BKE_sculpt_color_layer_create_if_needed(), blender::BKE_sculptsession_update_for_edit(), brush_init_tex(), brush_stroke_init(), brush_type_is_paint(), C, blender::SculptSession::cache, blender::bke::brush::common_pressure_curves_init(), create_toggle_settings(), blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_tool_settings(), blender::ED_paint_brush_type_update_sticky_shading_color(), blender::G, blender::Sculpt::paint, blender::Object::runtime, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::StrokeCache::toggle_settings, and blender::view3d_operator_needs_gpu().
Referenced by brush_stroke_init(), sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
|
static |
Definition at line 5911 of file sculpt.cc.
References brush_stroke_modal(), C, blender::wmOperator::customdata, ELEM, blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, and blender::OPERATOR_FINISHED.
Referenced by brush_stroke_modal(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 1722 of file paint_stroke.cc.
References brush_tool_get(), ELEM, blender::bToolRef_Runtime::flag, blender::ARegion::regiontype, blender::RGN_TYPE_WINDOW, blender::bToolRef::runtime, blender::ScrArea::runtime, blender::SPACE_IMAGE, blender::SPACE_VIEW3D, blender::ScrArea::spacetype, blender::ScrArea_Runtime::tool, and blender::TOOLREF_FLAG_USE_BRUSHES.
Referenced by brush_tool_get(), paint_brush_cursor_poll(), and paint_brush_tool_poll().
| BLI_INLINE bool blender::ed::sculpt_paint::brush_type_is_attribute_only | ( | const int | tool | ) |
Definition at line 924 of file mesh/sculpt_intern.hh.
References BLI_INLINE, brush_type_is_attribute_only(), brush_type_is_mask(), brush_type_is_paint(), ELEM, and blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS.
Referenced by brush_type_is_attribute_only(), and sculpt_brush_stroke_invoke().
|
inline |
Definition at line 919 of file mesh/sculpt_intern.hh.
References brush_type_is_mask(), ELEM, and blender::SCULPT_BRUSH_TYPE_MASK.
Referenced by brush_type_is_attribute_only(), brush_type_is_mask(), and sculpt_brush_stroke_invoke().
|
inline |
Definition at line 914 of file mesh/sculpt_intern.hh.
References brush_type_is_paint(), ELEM, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_PAINT, and blender::SCULPT_BRUSH_TYPE_SMEAR.
Referenced by brush_stroke_init(), brush_type_is_attribute_only(), brush_type_is_paint(), push_undo_nodes(), sculpt_brush_stroke_invoke(), smooth_brush_toggle_on(), stroke_modifiers_check(), blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::test_start(), blender::ed::sculpt_paint::SculptPaintStroke::test_start(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 3237 of file sculpt.cc.
References blender::BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, brush_type_needs_all_pbvh_nodes(), blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_POSE, and blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK.
Referenced by brush_type_needs_all_pbvh_nodes(), and calc_brush_node_mask().
|
static |
Definition at line 920 of file sculpt.cc.
References brush_type_needs_original(), ELEM, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SMOOTH, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by brush_type_needs_original(), calc_brush_node_mask(), and dynamic_topology_update().
|
static |
Definition at line 115 of file mesh/paint_cursor.cc.
References blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_radius_get(), blender::BKE_brush_unprojected_size_set(), blender::BKE_brush_use_locked_size(), blender::BKE_brush_use_size_pressure(), blender::BRUSH_STROKE_ANCHORED, brush_unprojected_size_update(), blender::bke::PaintRuntime::draw_anchored, blender::paint_calc_object_space_radius(), blender::bke::PaintRuntime::size_pressure_value, and blender::bke::PaintRuntime::stroke_active.
Referenced by brush_unprojected_size_update(), and mesh_cursor_update_and_init().
|
static |
Definition at line 934 of file sculpt.cc.
References blender::SculptSession::bm, brush_uses_topology_rake(), and blender::bke::brush::supports_topology_rake().
Referenced by brush_delta_update(), brush_uses_topology_rake(), do_brush_action(), and sculpt_brush_needs_normal().
|
inline |
Definition at line 930 of file mesh/sculpt_intern.hh.
References blender::BRUSH_USE_COLOR_AS_DISPLACEMENT, brush_uses_vector_displacement(), blender::MTEX_MAP_MODE_AREA, and blender::SCULPT_BRUSH_TYPE_DRAW.
Referenced by brush_uses_vector_displacement(), and do_brush_action().
| void blender::ed::sculpt_paint::cache_calc_brushdata_symm | ( | ed::sculpt_paint::StrokeCache & | cache, |
| ePaintSymmetryFlags | symm, | ||
| char | axis, | ||
| float | angle ) |
Flip all the edit-data across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled.
Definition at line 3725 of file sculpt.cc.
References angle(), cache_calc_brushdata_symm(), flip_qt_qt(), frac(), blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::StrokeCache::gravity_direction, blender::ed::sculpt_paint::StrokeCache::gravity_direction_symm, blender::MatBase< float, 4, 4 >::identity(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::mul_m4_v3(), blender::mul_v3_fl(), blender::PAINT_SYMMETRY_FEATHER, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::gpu::shader::metadata::printf, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, blender::rotate_m4(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::ed::sculpt_paint::StrokeCache::tip_motion_normal, blender::ed::sculpt_paint::StrokeCache::tip_motion_normal_symm, blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::zero_v3().
Referenced by cache_calc_brushdata_symm(), do_radial_symmetry(), do_radial_symmetry_with_tiling(), do_symmetrical_brush_actions(), do_symmetrical_brush_actions_with_tiling_and_feathering(), and blender::WeightPaintStroke::update_step().
|
static |
Definition at line 4272 of file sculpt.cc.
References blender::BRUSH_PAINT_DENSITY_PRESSURE, blender::BRUSH_PAINT_DENSITY_PRESSURE_INVERT, blender::BRUSH_PAINT_FLOW_PRESSURE, blender::BRUSH_PAINT_FLOW_PRESSURE_INVERT, blender::BRUSH_PAINT_WET_MIX_PRESSURE, blender::BRUSH_PAINT_WET_MIX_PRESSURE_INVERT, blender::BRUSH_PAINT_WET_PERSISTENCE_PRESSURE, blender::BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT, cache_paint_brush_variants_update(), blender::ed::sculpt_paint::StrokeCache::paint_brush, blender::pow2f(), and blender::ed::sculpt_paint::StrokeCache::pressure.
Referenced by cache_paint_brush_variants_update(), and stroke_cache_update().
| void blender::ed::sculpt_paint::calc_area_center | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float | r_area_co[3] ) |
Definition at line 1825 of file sculpt.cc.
References blender::SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_center(), calc_area_normal_and_center_reduce(), blender::Object::data, blender::Editor, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, PRF_scope, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by calc_area_center(), and calc_brush_plane().
| std::optional< float3 > blender::ed::sculpt_paint::calc_area_normal | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask ) |
Definition at line 1926 of file sculpt.cc.
References blender::SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_normal(), calc_area_normal_and_center_reduce(), blender::Object::data, blender::Editor, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, PRF_scope, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), calc_area_normal(), calc_sculpt_normal(), cursor_geometry_info_update(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::vwpaint::update_sculpt_normal().
| void blender::ed::sculpt_paint::calc_area_normal_and_center | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float | r_area_no[3], | ||
| float | r_area_co[3] ) |
This calculates flatten center and area normal together, amortizing the memory bandwidth and loop overhead to calculate both at the same time.
Definition at line 2120 of file sculpt.cc.
References blender::SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_normal_and_center(), calc_area_normal_and_center_reduce(), blender::Object::data, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by calc_area_normal_and_center(), and calc_brush_plane().
|
static |
Definition at line 1658 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::BKE_pbvh_node_get_bm_orco_data(), BM_elem_flag_test, blender::BM_ELEM_HIDDEN, blender::SculptSession::bm_log, blender::SculptSession::cache, calc_area_normal_and_center_node_bmesh(), calc_brush_distances_squared(), blender::closest_on_tri_to_point_v3(), blender::SculptSession::cursor_location, blender::SculptSession::cursor_view_normal, distance(), blender::ed::sculpt_paint::SampleLocalData::distances, blender::math::dot(), blender::Editor, gather_bmesh_positions(), blender::ed::sculpt_paint::undo::has_bmesh_log_entry(), blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::location_symm, node, Normal, blender::math::normal_tri(), orig_position_data_gather_bmesh(), Position, blender::ed::sculpt_paint::SampleLocalData::positions, PRF_scope, blender::math::rcp(), blender::MutableSpan< T >::size(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::Span< T >::size(), UNPACK3, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_area_normal_and_center_node_bmesh().
|
static |
Definition at line 1548 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), blender::BKE_subdiv_ccg_key_top_level(), blender::SculptSession::cache, calc_area_normal_and_center_node_grids(), calc_brush_distances_squared(), blender::SculptSession::cursor_location, blender::SculptSession::cursor_view_normal, distance(), blender::ed::sculpt_paint::SampleLocalData::distances, blender::math::dot(), blender::Editor, gather_grids_positions(), blender::CCGKey::grid_area, blender::SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), blender::IndexRange::IndexRange(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, node, Normal, blender::SubdivCCG::normals, orig_position_data_lookup_grids(), Position, blender::ed::sculpt_paint::SampleLocalData::positions, PRF_scope, blender::math::rcp(), blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_area_normal_and_center_node_grids().
|
static |
Definition at line 1459 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), blender::SculptSession::cache, calc_area_normal_and_center_node_mesh(), calc_brush_distances_squared(), blender::SculptSession::cursor_location, blender::SculptSession::cursor_view_normal, distance(), blender::math::dot(), blender::Editor, blender::Span< T >::index_range(), blender::Span< T >::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, node, Normal, orig_position_data_lookup_mesh(), Position, PRF_scope, blender::math::rcp(), blender::Span< T >::size(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1807 of file sculpt.cc.
References blender::ed::sculpt_paint::AreaNormalCenterData::area_cos, blender::ed::sculpt_paint::AreaNormalCenterData::area_nos, b, calc_area_normal_and_center_reduce(), blender::ed::sculpt_paint::AreaNormalCenterData::count_co, and blender::ed::sculpt_paint::AreaNormalCenterData::count_no.
Referenced by calc_area_center(), calc_area_normal(), calc_area_normal_and_center(), and calc_area_normal_and_center_reduce().
| void blender::ed::sculpt_paint::calc_brush_cube_distances | ( | const Brush & | brush, |
| const Span< T > | positions, | ||
| const MutableSpan< float > | r_distances ) |
Calculate distances based on a "square" brush tip falloff and ignore vertices that are too far away.
Definition at line 7435 of file sculpt.cc.
References blender::math::abs(), blender::BLI_assert(), calc_brush_cube_distances(), distance(), blender::Editor, blender::Span< T >::index_range(), blender::math::length(), blender::math::max(), blender::math::min(), PRF_scope, blender::math::reduce_max(), blender::math::safe_rcp(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and T.
Referenced by calc_brush_cube_distances(), calc_brush_cube_distances< float2 >(), calc_brush_cube_distances< float3 >(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), and blender::ed::sculpt_paint::color::do_paint_brush_task().
| template void blender::ed::sculpt_paint::calc_brush_cube_distances< float2 > | ( | const Brush & | brush, |
| const Span< float2 > | positions, | ||
| MutableSpan< float > | r_distances ) |
References calc_brush_cube_distances().
| template void blender::ed::sculpt_paint::calc_brush_cube_distances< float3 > | ( | const Brush & | brush, |
| const Span< float3 > | positions, | ||
| MutableSpan< float > | r_distances ) |
References calc_brush_cube_distances().
| void blender::ed::sculpt_paint::calc_brush_distances | ( | const SculptSession & | ss, |
| Span< float3 > | positions, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7410 of file sculpt.cc.
References calc_brush_distances(), calc_brush_distances_squared(), blender::Editor, and PRF_scope.
| void blender::ed::sculpt_paint::calc_brush_distances | ( | const SculptSession & | ss, |
| Span< float3 > | vert_positions, | ||
| Span< int > | vert, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Calculate distances based on the distance from the brush cursor and various other settings. Also ignore vertices that are too far from the cursor.
Definition at line 7370 of file sculpt.cc.
References calc_brush_distances(), calc_brush_distances_squared(), blender::Editor, and PRF_scope.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_brush_distances(), calc_brush_distances(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::calc_brush_distances_squared | ( | const SculptSession & | ss, |
| Span< float3 > | positions, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7383 of file sculpt.cc.
References blender::BLI_assert(), blender::SculptSession::cache, calc_brush_distances_squared(), blender::closest_to_plane_normalized_v3(), blender::SculptSession::cursor_location, blender::math::distance_squared(), blender::SculptSession::filter_cache, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::filter::Cache::view_normal, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
| void blender::ed::sculpt_paint::calc_brush_distances_squared | ( | const SculptSession & | ss, |
| Span< float3 > | positions, | ||
| Span< int > | verts, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7342 of file sculpt.cc.
References blender::BLI_assert(), blender::SculptSession::cache, calc_brush_distances_squared(), blender::closest_to_plane_normalized_v3(), blender::SculptSession::cursor_location, blender::math::distance_squared(), blender::SculptSession::filter_cache, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::filter::Cache::view_normal, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), calc_area_normal_and_center_node_mesh(), calc_brush_distances(), calc_brush_distances(), calc_brush_distances_squared(), and calc_brush_distances_squared().
| void blender::ed::sculpt_paint::calc_brush_local_mat | ( | const float3 & | tip_normal, |
| const float3 & | motion_normal_local, | ||
| const float3 & | tip_location, | ||
| const float | radius, | ||
| float | local_mat[4][4], | ||
| float | local_mat_inv[4][4] ) |
Calculates the local matrix of the brush and its inverse, which are used to transform points from object-space to brush-space and vice versa respectively.
| tip_normal | Tip normal is the sculpt normal under spherical falloff, but when under projected falloff, it is the view normal. |
| motion_normal_local | Normal direction of the brush motion. Calculate with calc_motion_normal_from_angle. |
Definition at line 2830 of file sculpt.cc.
References calc_brush_local_mat(), blender::copy_m4_m4(), blender::copy_v3_v3(), blender::cross_v3_v3v3(), blender::invert_m4_m4(), blender::mul_m4_m4m4(), blender::normalize_m4(), blender::normalize_v3_v3(), scale(), blender::scale_m4_fl(), and blender::v.
Referenced by calc_brush_local_mat(), calc_brush_node_mask(), cube_tip_init(), cursor_space_drawing_setup(), and update_brush_local_mat().
|
static |
Calculates the nodes that a brush will influence.
Definition at line 3271 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_brush_has_cube_tip(), blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather(), blender::BRUSH_ORIGINAL_NORMAL, brush_type_needs_all_pbvh_nodes(), brush_type_needs_original(), blender::SculptSession::cache, calc_brush_local_mat(), calc_brush_node_mask(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), calc_sculpt_normal(), blender::Editor, gather_nodes(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::PAINT_FALLOFF_SHAPE_SPHERE, pbvh_gather_generic(), pbvh_gather_generic_cube(), blender::bke::object::pbvh_get(), PRF_scope, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radius, blender::Object::runtime, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_PLANE, blender::bke::ObjectRuntime::sculpt_session, blender::math::square(), tilt_apply_to_normal(), blender::ed::sculpt_paint::StrokeCache::tip_motion_normal_symm, blender::true, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_brush_node_mask(), and do_brush_action().
| void blender::ed::sculpt_paint::calc_brush_plane | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float3 & | r_area_no, | ||
| float3 & | r_area_co ) |
Brushes may behave incorrectly if preserving original plane / normal when this method is not called.
Definition at line 3062 of file sculpt.cc.
References blender::BLI_assert(), blender::BRUSH_ORIGINAL_NORMAL, blender::BRUSH_ORIGINAL_PLANE, blender::SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), calc_brush_plane(), blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_center, blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::math::normalize(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::project_plane_v3_v3v3(), blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_DISP_DIR_AREA, blender::SCULPT_DISP_DIR_VIEW, blender::SCULPT_DISP_DIR_X, blender::SCULPT_DISP_DIR_Y, blender::SCULPT_DISP_DIR_Z, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, blender::bke::ObjectRuntime::sculpt_session, stroke_is_first_brush_step_of_symmetry_pass(), stroke_is_main_symmetry_pass(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, symmetry_flip(), blender::math::transform_direction(), blender::math::transform_point(), blender::ed::sculpt_paint::StrokeCache::view_normal, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_brush_plane(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::brushes::do_pinch_brush().
| void blender::ed::sculpt_paint::calc_brush_strength_factors | ( | const StrokeCache & | cache, |
| const Brush & | brush, | ||
| Span< float > | distances, | ||
| MutableSpan< float > | factors ) |
Modify the factors based on distances to the brush cursor, using various brush settings.
Definition at line 7501 of file sculpt.cc.
References blender::BKE_brush_calc_curve_factors(), calc_brush_strength_factors(), and blender::ed::sculpt_paint::StrokeCache::radius.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_brush_strength_factors(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::calc_brush_texture_factors | ( | PaintMode | paint_mode, |
| const SculptSession & | ss, | ||
| const Brush & | brush, | ||
| Span< float3 > | positions, | ||
| MutableSpan< float > | factors ) |
Definition at line 7543 of file sculpt.cc.
References apply_brush_texture(), blender::BKE_brush_mask_texture_get(), blender::BLI_assert(), blender::BLI_task_parallel_thread_id(), calc_brush_texture_factors(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::MTex::tex.
| void blender::ed::sculpt_paint::calc_brush_texture_factors | ( | PaintMode | paint_mode, |
| const SculptSession & | ss, | ||
| const Brush & | brush, | ||
| Span< float3 > | vert_positions, | ||
| Span< int > | vert, | ||
| MutableSpan< float > | factors ) |
Modify brush influence factors to include sampled texture values.
Definition at line 7513 of file sculpt.cc.
References apply_brush_texture(), blender::BKE_brush_mask_texture_get(), blender::BLI_assert(), blender::BLI_task_parallel_thread_id(), calc_brush_texture_factors(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::MTex::tex.
Referenced by calc_brush_texture_factors(), calc_brush_texture_factors(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), and blender::ed::sculpt_paint::color::do_smear_brush_task().
| void blender::ed::sculpt_paint::calc_cube_tip_factors_common_bmesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const float4x4 & | mat, | ||
| Span< float3 > | positions, | ||
| bke::pbvh::BMeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6924 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BKE_brush_calc_curve_factors(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::SculptSession::bm, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_cube_distances(), calc_brush_texture_factors(), calc_cube_tip_factors_common_bmesh(), calc_front_face(), calc_local_positions(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), blender::ed::sculpt_paint::StrokeCache::hardness, blender::ed::sculpt_paint::StrokeCache::location_symm, node, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_cube_tip_factors_common_bmesh().
| void blender::ed::sculpt_paint::calc_cube_tip_factors_common_grids | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const float4x4 & | mat, | ||
| Span< float3 > | positions, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6838 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BKE_brush_calc_curve_factors(), blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_cube_distances(), calc_brush_texture_factors(), calc_cube_tip_factors_common_grids(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), calc_local_positions(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), blender::ed::sculpt_paint::StrokeCache::hardness, blender::ed::sculpt_paint::StrokeCache::location_symm, node, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_cube_tip_factors_common_grids().
| void blender::ed::sculpt_paint::calc_factors_common_bmesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3 > | positions, | ||
| bke::pbvh::BMeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6891 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BKE_pbvh_bmesh_node_unique_verts(), blender::SculptSession::bm, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_bmesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), node, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_bmesh().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_bmesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3 > | positions, | ||
| Span< float3 > | normals, | ||
| bke::pbvh::BMeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 7043 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BKE_pbvh_bmesh_node_unique_verts(), blender::SculptSession::bm, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_bmesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), node, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_bmesh().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_grids | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3 > | positions, | ||
| Span< float3 > | normals, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 7008 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_grids(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), node, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_grids().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_mesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3 > | positions, | ||
| Span< float3 > | normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| MutableSpan< float > | r_factors, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 6976 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_mesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, node, blender::ed::sculpt_paint::StrokeCache::radius, blender::Sculpt, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_mesh().
| void blender::ed::sculpt_paint::calc_factors_common_grids | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3 > | positions, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6804 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_grids(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), node, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Sculpt, blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_grids().
| void blender::ed::sculpt_paint::calc_factors_common_mesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3 > | positions, | ||
| Span< float3 > | vert_normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| MutableSpan< float > | factors, | ||
| MutableSpan< float > | distances ) |
Definition at line 6772 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_mesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::Editor, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, node, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::Sculpt, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_mesh().
| void blender::ed::sculpt_paint::calc_factors_common_mesh_indexed | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3 > | vert_positions, | ||
| Span< float3 > | vert_normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| MutableSpan< float > | factors, | ||
| MutableSpan< float > | distances ) |
Definition at line 6739 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blender::BRUSH_FRONTFACE, blender::SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_mesh_indexed(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::Editor, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, node, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::Sculpt, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_mesh_indexed().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3 & | view_normal, |
| const Set< BMFace *, 0 > & | faces, | ||
| MutableSpan< float > | factors ) |
Definition at line 7270 of file sculpt.cc.
References blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3 & | view_normal, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float > | factors ) |
Definition at line 7255 of file sculpt.cc.
References blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3 & | view_normal, |
| const SubdivCCG & | subdiv_ccg, | ||
| Span< int > | grids, | ||
| MutableSpan< float > | factors ) |
Definition at line 7235 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), blender::SubdivCCG::normals, PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3 & | view_normal, |
| Span< float3 > | normals, | ||
| MutableSpan< float > | factors ) |
Disable brush influence when vertex normals point away from the view.
Definition at line 7223 of file sculpt.cc.
References blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3 & | view_normal, |
| Span< float3 > | vert_normals, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | factors ) |
Definition at line 7209 of file sculpt.cc.
References blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
|
static |
Definition at line 2794 of file sculpt.cc.
References blender::add_v3_v3(), calc_local_from_screen(), blender::ED_view3d_calc_zfac(), blender::ED_view3d_win_to_delta(), blender::Object::loc, blender::mul_m4_v3(), blender::mul_v3_m4v3(), blender::normalize_v3(), blender::ViewContext::obact, blender::ViewContext::region, and blender::ViewContext::rv3d.
Referenced by calc_local_from_screen(), and calc_motion_normal_from_angle().
| void blender::ed::sculpt_paint::calc_local_positions | ( | Span< float3 > | positions, |
| const float4x4 & | mat, | ||
| const float3 & | plane_center, | ||
| const float3 & | view_normal, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float2 > | xy_positions, | ||
| MutableSpan< float > | z_positions ) |
Definition at line 6705 of file sculpt.cc.
References blender::BLI_assert(), calc_local_positions(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), position, PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
| void blender::ed::sculpt_paint::calc_local_positions | ( | Span< float3 > | positions, |
| const float4x4 & | mat, | ||
| const float3 & | plane_center, | ||
| const float3 & | view_normal, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float3 > | local_positions ) |
Definition at line 6645 of file sculpt.cc.
References blender::BLI_assert(), calc_local_positions(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
| void blender::ed::sculpt_paint::calc_local_positions | ( | Span< float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4x4 & | mat, | ||
| const float3 & | plane_center, | ||
| const float3 & | view_normal, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float2 > | xy_positions, | ||
| MutableSpan< float > | z_positions ) |
Transforms positions from object space positions to brush-local space and then splits the XY and Z components. This gives slightly better performance for brushes that only need the XY components for certain calculations. For tube falloff shape, positions are first projected onto the view plane.
Definition at line 6670 of file sculpt.cc.
References blender::BLI_assert(), calc_local_positions(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), position, PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
| void blender::ed::sculpt_paint::calc_local_positions | ( | Span< float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4x4 & | mat, | ||
| const float3 & | plane_center, | ||
| const float3 & | view_normal, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float3 > | local_positions ) |
Transforms positions from object space positions to brush-local space. For tube falloff shape, positions are first projected onto the view plane.
Definition at line 6619 of file sculpt.cc.
References blender::BLI_assert(), calc_local_positions(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
Referenced by calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), calc_local_positions(), calc_local_positions(), calc_local_positions(), calc_local_positions(), and blender::ed::sculpt_paint::color::do_paint_brush_task().
| float3 blender::ed::sculpt_paint::calc_motion_normal_from_angle | ( | const ViewContext & | vc, |
| const float3 & | tip_location, | ||
| const float | angle ) |
Converts a screen-space angle into an object-space motion normal.
Definition at line 2812 of file sculpt.cc.
References angle(), calc_local_from_screen(), calc_motion_normal_from_angle(), cosf, blender::invert_m4_m4(), blender::ViewContext::obact, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::Object::runtime, sinf, and blender::bke::ObjectRuntime::world_to_object.
Referenced by calc_motion_normal_from_angle(), cursor_space_drawing_setup(), stroke_cache_update(), and update_brush_local_mat().
|
static |
Definition at line 241 of file mesh_paint.cc.
References angle(), blender::axis_angle_to_mat3_single(), calc_overlap(), blender::len_squared_v3v3(), blender::ed::sculpt_paint::StrokeCache::location, blender::mul_m3_v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::radius_squared, sqrtf, and symmetry_flip().
Referenced by calc_overlap(), calc_radial_symmetry_feather(), and calc_symmetry_feather().
|
static |
Definition at line 262 of file mesh_paint.cc.
References angle(), calc_overlap(), calc_radial_symmetry_feather(), and M_PI.
Referenced by calc_radial_symmetry_feather(), and calc_symmetry_feather().
|
static |
Definition at line 2732 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), BLI_assert_unreachable, blender::SculptSession::cache, calc_area_normal(), calc_sculpt_normal(), blender::Sculpt::paint, blender::Object::runtime, blender::SCULPT_DISP_DIR_AREA, blender::SCULPT_DISP_DIR_VIEW, blender::SCULPT_DISP_DIR_X, blender::SCULPT_DISP_DIR_Y, blender::SCULPT_DISP_DIR_Z, blender::bke::ObjectRuntime::sculpt_session, and blender::ed::sculpt_paint::StrokeCache::view_normal.
Referenced by calc_brush_node_mask(), calc_sculpt_normal(), and update_sculpt_normal().
| void blender::ed::sculpt_paint::calc_smooth_translations | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const IndexMask & | node_mask, | ||
| MutableSpan< float3 > | translations ) |
The brush uses translations calculated at the beginning of the stroke. They can't be calculated dynamically because changing positions will influence neighboring translations. However we can reduce the cost in some cases by skipping initializing values for vertices in hidden or masked nodes.
Definition at line 283 of file enhance_details.cc.
References blender::bke::pbvh::BMesh, calc_smooth_translations(), blender::data, blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::MeshAttributeData::hide_poly, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), blender::SculptSession::subdiv_ccg, blender::bke::pbvh::vert_positions_eval(), and vert_random_access_ensure().
Referenced by calc_smooth_translations(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), and blender::ed::sculpt_paint::filter::sculpt_filter_specific_init().
|
static |
Definition at line 2036 of file sculpt.cc.
References calc_stabilized_plane(), blender::closest_to_plane_normalized_v3(), blender::math::dot(), blender::math::interpolate(), blender::math::normalize(), blender::ed::sculpt_paint::StrokeCache::plane_brush, plane_brush_max_rolling_average_num, and blender::plane_from_point_normal_v3().
Referenced by calc_stabilized_plane().
|
static |
Definition at line 180 of file sculpt_transform.cc.
References BLI_NOINLINE, calc_symm_area_transform_translations(), get_vertex_symm_area(), blender::Span< T >::index_range(), and blender::math::transform_point().
Referenced by calc_symm_area_transform_translations(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
|
static |
Definition at line 277 of file mesh_paint.cc.
References calc_overlap(), calc_radial_symmetry_feather(), calc_symmetry_feather(), is_symmetry_iteration_valid(), and blender::PAINT_SYMMETRY_FEATHER.
Referenced by calc_symmetry_feather(), and do_symmetrical_brush_actions_with_tiling_and_feathering().
|
static |
Definition at line 365 of file sculpt_transform.cc.
References BLI_NOINLINE, calc_transform_translations(), blender::Span< T >::index_range(), and blender::math::transform_point().
Referenced by calc_transform_translations(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), and elastic_transform_node_mesh().
| void blender::ed::sculpt_paint::calc_translations_to_plane | ( | Span< float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float3 > | translations ) |
Definition at line 8203 of file sculpt.cc.
References calc_translations_to_plane(), closest(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), position, and PRF_scope.
| void blender::ed::sculpt_paint::calc_translations_to_plane | ( | Span< float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float3 > | translations ) |
Find the translation from each vertex position to the closest point on the plane.
Definition at line 8189 of file sculpt.cc.
References calc_translations_to_plane(), closest(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), position, and PRF_scope.
Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), calc_translations_to_plane(), and calc_translations_to_plane().
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Definition at line 7969 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_subdiv_ccg_key_top_level(), blender::BKE_subdiv_ccg_neighbor_coords_get(), calc_vert_neighbors(), blender::CCG_grid_xy_to_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::SubdivCCGNeighbors::coords, blender::Editor, blender::CCGKey::grid_area, blender::SubdivCCGCoord::grid_index, blender::CCGKey::grid_size, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::SubdivCCGCoord::to_index(), blender::SubdivCCGCoord::x, blender::x, blender::SubdivCCGCoord::y, and y.
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped.
See calc_vert_neighbors_interior for a version that does extra filtering for boundary vertices.
Definition at line 7949 of file sculpt.cc.
References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::BLI_assert(), calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Editor, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), calc_vert_neighbors(), calc_vert_neighbors(), calc_vert_neighbors(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::pose::grow_factors_mesh(), blender::ed::sculpt_paint::mask::grow_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::shrink_mask_mesh(), and blender::ed::sculpt_paint::mask::smooth_mask_mesh().
| GroupedSpan< BMVert * > blender::ed::sculpt_paint::calc_vert_neighbors | ( | Set< BMVert *, 0 > | verts, |
| Vector< int > & | r_offset_data, | ||
| Vector< BMVert * > & | r_data ) |
Definition at line 8005 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Editor, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and vert_neighbors_get_bmesh().
| void blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< Vector< BMVert * > > | result ) |
| void blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| BitSpan | boundary_verts, | ||
| const Set< OrderedEdge > & | boundary_edges, | ||
| const SubdivCCG & | subdiv_ccg, | ||
| Span< int > | grids, | ||
| MutableSpan< Vector< SubdivCCGCoord > > | result ) |
Definition at line 8121 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BKE_subdiv_ccg_neighbor_coords_get(), blender::BLI_assert(), calc_vert_neighbors_interior(), blender::CCG_grid_xy_to_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::SubdivCCGNeighbors::coords, blender::Editor, blender::CCGKey::grid_area, blender::SubdivCCGCoord::grid_index, blender::CCGKey::grid_size, blender::Span< T >::index_range(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::remove_if(), blender::result, blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::ed::sculpt_paint::boundary::vert_is_boundary(), blender::SubdivCCGCoord::x, blender::x, blender::SubdivCCGCoord::y, and y.
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| BitSpan | boundary_verts, | ||
| const Set< OrderedEdge > & | boundary_edges, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Span< float > | factors, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Definition at line 8076 of file sculpt.cc.
References calc_vert_neighbors_interior(), and calc_vert_neighbors_interior_impl().
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| BitSpan | boundary_verts, | ||
| const Set< OrderedEdge > & | boundary_edges, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped. For boundary vertices (stored in the boundary_verts argument), only include other boundary vertices. Corner vertices are skipped entirely and will not have neighbor information populated.
Definition at line 8099 of file sculpt.cc.
References calc_vert_neighbors_interior(), and calc_vert_neighbors_interior_impl().
Referenced by blender::ed::sculpt_paint::filter::calc_smooth_filter(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), blender::ed::sculpt_paint::tests::TEST_F(), and blender::ed::sculpt_paint::tests::TEST_F().
|
static |
Definition at line 8025 of file sculpt.cc.
References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::BLI_assert(), calc_vert_neighbors_interior_impl(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Editor, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), and calc_vert_neighbors_interior_impl().
| void blender::ed::sculpt_paint::calc_vertex_displacement | ( | const SculptSession & | ss, |
| const Brush & | brush, | ||
| float | translation[3] ) |
Calculates the vertex offset for a single vertex depending on the brush setting rgb as vector displacement.
Definition at line 2476 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::brush_local_mat_inv, blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, calc_vertex_displacement(), blender::copy_v3_v3(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::mul_m4_v3(), blender::mul_mat3_m4_v3(), blender::mul_v3_fl(), blender::pow2f(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::math::safe_divide(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, and symmetry_flip().
Referenced by calc_vertex_displacement().
Definition at line 617 of file sculpt_transform.cc.
References C, cancel_modal_transform(), blender::CTX_data_depsgraph_pointer(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), and blender::bke::pbvh::update_normals().
Referenced by cancel_modal_transform(), and blender::ed::transform::recalcData_sculpt().
| bool blender::ed::sculpt_paint::check_vertex_pivot_symmetry | ( | const float | vco[3], |
| const float | pco[3], | ||
| const char | symm ) |
Definition at line 672 of file sculpt.cc.
References check_vertex_pivot_symmetry().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), check_vertex_pivot_symmetry(), filter_verts_outside_symmetry_area(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), blender::ed::sculpt_paint::pose::grow_factors_grids(), blender::ed::sculpt_paint::pose::grow_factors_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), and blender::ed::sculpt_paint::expand::reposition_pivot().
| void blender::ed::sculpt_paint::clip_and_lock_translations | ( | const Sculpt & | sd, |
| const SculptSession & | ss, | ||
| Span< float3 > | positions, | ||
| MutableSpan< float3 > | translations ) |
Definition at line 7707 of file sculpt.cc.
References blender::math::abs(), blender::BLI_assert(), blender::SculptSession::cache, clip_and_lock_translations(), blender::ClipX, blender::Editor, blender::Sculpt::flags, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, PRF_scope, blender::SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
| void blender::ed::sculpt_paint::clip_and_lock_translations | ( | const Sculpt & | sd, |
| const SculptSession & | ss, | ||
| Span< float3 > | positions, | ||
| Span< int > | verts, | ||
| MutableSpan< float3 > | translations ) |
Modify translations based on sculpt mode axis locking and mirroring clipping.
Definition at line 7664 of file sculpt.cc.
References blender::math::abs(), blender::BLI_assert(), blender::SculptSession::cache, clip_and_lock_translations(), blender::ClipX, blender::Editor, blender::Sculpt::flags, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, PRF_scope, blender::SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), clip_and_lock_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| bool blender::ed::sculpt_paint::color_supported_check | ( | const Scene & | scene, |
| Object & | object, | ||
| ReportList * | reports ) |
Returns true if the current Mesh type can handle color attributes. If false an error message will be shown to the user. Operators should return OPERATOR_CANCELLED in this case.
NOTE: Does not check if a color attribute actually exists. Calling code must handle this itself; in most cases a call to BKE_sculpt_color_layer_create_if_needed() is sufficient.
Definition at line 5432 of file sculpt.cc.
References blender::BKE_report(), blender::BKE_sculpt_multires_active(), blender::SculptSession::bm, color_supported_check(), and blender::RPT_ERROR.
Referenced by color_supported_check(), blender::ed::sculpt_paint::mask::mask_by_color(), sample_color_exec(), sample_color_invoke(), sculpt_brush_stroke_invoke(), and blender::ed::sculpt_paint::color::sculpt_color_filter_init().
|
static |
Definition at line 697 of file sculpt_transform.cc.
References b, combine_average_position_accumulation(), blender::ed::sculpt_paint::AveragePositionAccumulation::position, and blender::ed::sculpt_paint::AveragePositionAccumulation::weight_total.
Referenced by average_mask_border_position(), average_unmasked_position(), and combine_average_position_accumulation().
Definition at line 7586 of file sculpt.cc.
References blender::Span< T >::begin(), contains_nan(), blender::Span< T >::end(), and blender::v.
Referenced by apply_translations(), apply_translations(), apply_translations(), and contains_nan().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets | ( | const CCGKey & | key, |
| Span< bke::pbvh::GridsNode > | nodes, | ||
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Definition at line 7923 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), create_node_vert_offsets(), blender::Editor, blender::index_mask::IndexMask::foreach_index_optimized(), blender::CCGKey::grid_area, PRF_scope, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::index_mask::IndexMask::size().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets | ( | Span< bke::pbvh::MeshNode > | nodes, |
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Creates OffsetIndices based on each node's unique vertex count, allowing for easy slicing of a new array.
Definition at line 7912 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), create_node_vert_offsets(), blender::Editor, blender::index_mask::IndexMask::foreach_index_optimized(), PRF_scope, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::index_mask::IndexMask::size().
Referenced by create_node_vert_offsets(), create_node_vert_offsets(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets_bmesh | ( | Span< bke::pbvh::BMeshNode > | nodes, |
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Definition at line 7936 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::BKE_pbvh_bmesh_node_unique_verts(), create_node_vert_offsets_bmesh(), blender::Editor, blender::index_mask::IndexMask::foreach_index(), PRF_scope, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::index_mask::IndexMask::size().
Referenced by create_node_vert_offsets_bmesh(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().
|
static |
Creates stroke-level toggle settings, modifies the current active brush if needed
Definition at line 4943 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_mask, blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, create_toggle_settings(), blender::Invert, blender::ed::sculpt_paint::StrokeToggleSettings::invert, blender::Mask, mask_brush_toggle_on(), blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_enum_get(), blender::Smooth, and smooth_brush_toggle_on().
Referenced by brush_stroke_init(), and create_toggle_settings().
Definition at line 6459 of file sculpt.cc.
References blender::SculptSession::cache, calc_brush_local_mat(), cube_tip_init(), blender::math::from_scale(), blender::math::invert(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::normalize_m4(), blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radius, blender::Object::runtime, scale(), blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::StrokeCache::tip_motion_normal_symm, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by cube_tip_init(), and blender::ed::sculpt_paint::color::do_paint_brush().
| std::optional< CursorGeometryInfo > blender::ed::sculpt_paint::cursor_geometry_info_update | ( | bContext * | C, |
| const float2 & | mval, | ||
| bool | use_sampled_normal ) |
Gets the normal, location and active vertex location of the geometry under the cursor. This also updates the active vertex and cursor related data of the SculptSession using the mouse position
Definition at line 4584 of file sculpt.cc.
References C, blender::CTX_data_active_base(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), cursor_geometry_info_update(), blender::ED_view3d_viewcontext_init(), blender::Sculpt::paint, and blender::ToolSettings::sculpt.
Referenced by blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), cursor_geometry_info_update(), blender::ed::sculpt_paint::face_set::edit_op_invoke(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_by_color(), mesh_cursor_update_and_init(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), 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(), set_pivot_position_exec(), blender::ed::sculpt_paint::expand::target_vert_update_and_get(), blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::test_start(), blender::ed::sculpt_paint::SculptPaintStroke::test_start(), and blender::ed::sculpt_paint::vwpaint::update_cache_variants().
| std::optional< CursorGeometryInfo > blender::ed::sculpt_paint::cursor_geometry_info_update | ( | Depsgraph & | depsgraph, |
| const Paint & | paint, | ||
| const Sculpt * | sd, | ||
| ViewContext & | vc, | ||
| const Base * | base, | ||
| const float2 & | mval, | ||
| const bool | use_sampled_normal ) |
Definition at line 4597 of file sculpt.cc.
References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::SculptSession::active_face_index, blender::SculptSession::active_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::BKE_base_is_visible(), blender::BKE_paint_brush_for_read(), blender::bke::pbvh::BMesh, blender::SculptSession::cache, calc_area_normal(), blender::SculptSession::clear_active_elements(), blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, cursor_geometry_info_update(), blender::SculptSession::cursor_location, blender::SculptSession::cursor_normal, blender::SculptSession::cursor_radius, blender::SculptSession::cursor_sampled_normal, blender::SculptSession::cursor_view_normal, blender::Object::data, blender::ed::sculpt_paint::RaycastData::depth, distance(), blender::Editor, blender::bke::Face, blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::math::invert(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::math::normalize(), blender::ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), blender::gpu::shader::metadata::out, pbvh_gather_cursor_update(), blender::bke::object::pbvh_get(), PRF_scope, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::Object::runtime, blender::SculptSession::rv3d, blender::ViewContext::rv3d, sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, blender::SculptSession::set_active_vert(), stroke_modifiers_check(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::math::transform_direction(), blender::bke::pbvh::update_normals(), blender::ed::sculpt_paint::RaycastData::use_original, blender::SculptSession::v3d, blender::ViewContext::v3d, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), blender::RegionView3D::viewinv, and blender::bke::ObjectRuntime::world_to_object.
|
static |
Definition at line 681 of file mesh/paint_cursor.cc.
References blender::BKE_brush_has_cube_tip(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::bke::PaintRuntime::brush_rotation, calc_brush_local_mat(), calc_motion_normal_from_angle(), cursor_space_drawing_setup(), blender::math::from_rotation(), blender::GPU_matrix_mul(), blender::ed::sculpt_paint::PaintCursorContext::location, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::normal, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::Paint::runtime, blender::ViewContext::rv3d, blender::bke::brush::supports_tilt(), blender::ed::sculpt_paint::PaintCursorContext::tilt, tilt_apply_to_normal(), blender::Brush::tilt_strength_factor, blender::math::translate(), blender::ed::sculpt_paint::PaintCursorContext::vc, and blender::RegionView3D::viewinv.
Referenced by cursor_space_drawing_setup(), and mesh_cursor_inactive_draw().
|
static |
Definition at line 768 of file mesh/paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, cursor_space_overlays_draw(), blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, layer_brush_height_preview_draw(), main_inactive_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::radius, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_LAYER, and blender::ed::sculpt_paint::cloth::simulation_limits_draw().
Referenced by cursor_space_overlays_draw(), and mesh_cursor_inactive_draw().
|
static |
Definition at line 158 of file paint_image_2d_curve_mask.cc.
References blender::CurveMaskCache::curve_mask, curve_mask_allocate(), blender::CurveMaskCache::curve_mask_size, diameter_to_curve_mask_size(), and blender::MEM_new_uninitialized().
Referenced by curve_mask_allocate(), and blender::paint_curve_mask_cache_update().
|
static |
Definition at line 152 of file paint_image_2d_curve_mask.cc.
References blender::CurveMaskCache::curve_mask, curve_mask_free(), and blender::CurveMaskCache::curve_mask_size.
Referenced by curve_mask_free(), blender::paint_curve_mask_cache_free_data(), and blender::paint_curve_mask_cache_update().
|
static |
Definition at line 375 of file curves/sculpt_ops.cc.
References CURVES_OT_sculptmode_toggle(), blender::ed::curves::curves_poll(), curves_sculptmode_toggle_exec(), blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, and blender::wmOperatorType::poll.
Referenced by CURVES_OT_sculptmode_toggle(), and blender::ED_operatortypes_sculpt_curves().
|
static |
Definition at line 1015 of file paint_stroke.cc.
References blender::CURVES_SCULPT_BRUSH_TYPE_ADD, blender::CURVES_SCULPT_BRUSH_TYPE_DENSITY, curves_sculpt_brush_uses_spacing(), and ELEM.
Referenced by curves_sculpt_brush_uses_spacing(), and paint_space_stroke_enabled().
| bool blender::ed::sculpt_paint::curves_sculpt_poll | ( | bContext * | C | ) |
Definition at line 73 of file curves/sculpt_ops.cc.
References C, blender::CTX_data_active_object(), curves_sculpt_poll(), blender::Object::mode, and blender::OB_MODE_SCULPT_CURVES.
Referenced by curves_sculpt_poll(), curves_sculpt_poll_view3d(), and blender::ED_keymap_paint().
| bool blender::ed::sculpt_paint::curves_sculpt_poll_view3d | ( | bContext * | C | ) |
Definition at line 79 of file curves/sculpt_ops.cc.
References C, blender::CTX_wm_region_view3d(), curves_sculpt_poll(), and curves_sculpt_poll_view3d().
Referenced by curves_sculpt_poll_view3d(), and curves_sculptmode_enter().
|
static |
Definition at line 315 of file curves/sculpt_ops.cc.
References blender::BKE_paint_brushes_ensure(), blender::BKE_paint_ensure(), blender::BKE_paint_get_active_from_paintmode(), C, blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_message_bus(), blender::ToolSettings::curves_sculpt, curves_sculpt_poll_view3d(), curves_sculptmode_enter(), blender::DEG_id_tag_update(), blender::ED_paint_cursor_start(), blender::Object::id, blender::ID_RECALC_SYNC_TO_EVAL, blender::Object::mode, NC_SCENE, ND_MODE, blender::OB_MODE_SCULPT_CURVES, blender::CurvesSculpt::paint, blender::paint_init_pivot(), blender::SculptCurves, blender::Scene::toolsettings, blender::WM_event_add_notifier(), and WM_msg_publish_rna_prop.
Referenced by curves_sculptmode_enter(), and curves_sculptmode_toggle_exec().
|
static |
Definition at line 340 of file curves/sculpt_ops.cc.
References C, blender::CTX_data_active_object(), curves_sculptmode_exit(), blender::Object::mode, and blender::OB_MODE_OBJECT.
Referenced by curves_sculptmode_exit(), and curves_sculptmode_toggle_exec().
|
static |
Definition at line 346 of file curves/sculpt_ops.cc.
References C, blender::CTX_data_active_object(), blender::CTX_wm_message_bus(), curves_sculptmode_enter(), curves_sculptmode_exit(), curves_sculptmode_toggle_exec(), blender::DEG_id_tag_update(), blender::Object::id, blender::ID_RECALC_SYNC_TO_EVAL, blender::Object::mode, blender::ed::object::mode_compat_set(), NC_SCENE, ND_MODE, blender::OB_MODE_SCULPT_CURVES, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::reports, blender::WM_event_add_notifier(), WM_msg_publish_rna_prop, and blender::WM_toolsystem_update_from_context_view3d().
Referenced by CURVES_OT_sculptmode_toggle(), and curves_sculptmode_toggle_exec().
|
static |
Definition at line 142 of file paint_image_2d_curve_mask.cc.
References diameter_to_curve_mask_size().
Referenced by curve_mask_allocate(), diameter_to_curve_mask_size(), and is_curve_mask_size_valid().
|
static |
Definition at line 3467 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, blender::BKE_brush_has_cube_tip(), blender::BKE_curvemapping_evaluateF(), blender::BLI_assert(), blender::BRUSH_AUTOMASKING_CAVITY_ALL, blender::BRUSH_DEFORM_TARGET_CLOTH_SIM, blender::BRUSH_MASK_DRAW, blender::BRUSH_MASK_SMOOTH, blender::ed::sculpt_paint::cloth::brush_simulation_create(), blender::BRUSH_SMOOTH_DEFORM_LAPLACIAN, blender::BRUSH_SMOOTH_DEFORM_SURFACE, blender::BRUSH_SMOOTH_PRESSURE, blender::ed::sculpt_paint::cloth::brush_store_simulation_state(), brush_uses_topology_rake(), brush_uses_vector_displacement(), blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, calc_brush_node_mask(), blender::ed::sculpt_paint::auto_mask::Cache::calc_cavity_factor(), blender::ed::sculpt_paint::StrokeCache::cloth_sim, blender::ed::sculpt_paint::brushes::do_blob_brush(), blender::ed::sculpt_paint::color::do_blur_brush(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), do_brush_action(), 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_crease_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_gravity_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::brushes::do_nudge_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::brushes::do_scene_project_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::brushes::do_thumb_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), blender::Editor, ELEM, blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::auto_mask::is_enabled(), blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, blender::Sculpt::paint, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_center, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, blender::ed::sculpt_paint::StrokeCache::pressure, PRF_scope, PRF_scope_set_dynamic_name, blender::math::project_point(), push_undo_nodes(), blender::Object::runtime, blender::SculptSession::rv3d, blender::Sculpt, blender::ToolSettings::sculpt, sculpt_brush_needs_normal(), blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_INFLATE, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, sculpt_brush_type_name(), blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SMOOTH, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::cloth::sim_activate_nodes(), blender::ed::sculpt_paint::auto_mask::stroke_cache_ensure(), stroke_is_first_brush_step_of_symmetry_pass(), stroke_is_main_symmetry_pass(), blender::bke::paint::stroke_track_location(), blender::bke::brush::supports_auto_smooth_pressure(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::ed::sculpt_paint::StrokeCache::toggle_settings, blender::Scene::toolsettings, update_brush_local_mat(), blender::bke::pbvh::update_normals(), update_sculpt_normal(), and blender::RegionView3D::view_render.
Referenced by do_brush_action(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 183 of file mesh_paint.cc.
References angle(), blender::SculptSession::cache, cache_calc_brushdata_symm(), blender::data, do_radial_symmetry(), M_PI, and blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass.
Referenced by do_radial_symmetry(), and do_symmetrical_brush_actions().
|
static |
Definition at line 367 of file mesh_paint.cc.
References angle(), blender::SculptSession::cache, cache_calc_brushdata_symm(), blender::data, do_radial_symmetry_with_tiling(), do_tiled(), M_PI, and blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass.
Referenced by do_radial_symmetry_with_tiling(), and do_symmetrical_brush_actions_with_tiling_and_feathering().
| void blender::ed::sculpt_paint::do_symmetrical_brush_actions | ( | const Depsgraph & | depsgraph, |
| const Scene & | scene, | ||
| const Paint & | paint, | ||
| Object & | object, | ||
| const BrushActionFn | action_fn, | ||
| PaintModeData * | paint_mode_data ) |
Definition at line 205 of file mesh_paint.cc.
References blender::ed::sculpt_paint::StrokeCache::base_brush_strength, blender::BKE_paint_brush_for_read(), blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, cache_calc_brushdata_symm(), do_radial_symmetry(), do_symmetrical_brush_actions(), is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, and blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass.
Referenced by do_symmetrical_brush_actions(), blender::VertexPaintStroke::update_step(), and blender::WeightPaintStroke::update_step().
| void blender::ed::sculpt_paint::do_symmetrical_brush_actions_with_tiling_and_feathering | ( | const Depsgraph & | depsgraph, |
| const Scene & | scene, | ||
| const Paint & | paint, | ||
| Object & | object, | ||
| BrushActionFn | action_fn, | ||
| PaintModeData * | paint_mode_data ) |
TODO: The naming is awkward, but because both features should be eventually supported in mor than just sculpt mode, this is a fine compromise for now
Definition at line 388 of file mesh_paint.cc.
References blender::ed::sculpt_paint::StrokeCache::base_brush_strength, blender::BKE_paint_brush_for_read(), blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, cache_calc_brushdata_symm(), calc_symmetry_feather(), blender::data, do_radial_symmetry_with_tiling(), do_symmetrical_brush_actions_with_tiling_and_feathering(), do_tiled(), blender::ed::sculpt_paint::StrokeCache::feather, is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, and blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass.
Referenced by do_symmetrical_brush_actions_with_tiling_and_feathering(), blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::update_step(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 301 of file mesh_paint.cc.
References blender::BKE_object_boundbox_get(), blender::SculptSession::cache, blender::copy_v3_v3(), blender::copy_v3_v3_int(), do_tiled(), blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::Bounds< T >::max, blender::Bounds< T >::min, blender::PAINT_TILE_X, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::ed::sculpt_paint::StrokeCache::radius, step, and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by do_radial_symmetry_with_tiling(), do_symmetrical_brush_actions_with_tiling_and_feathering(), and do_tiled().
| BLI_INLINE void blender::ed::sculpt_paint::draw_bezier_handle_lines | ( | uint | pos, |
| const float | sel_col[4], | ||
| BezTriple * | bez ) |
Definition at line 805 of file paint_cursor.cc.
References BLI_INLINE, draw_bezier_handle_lines(), blender::BezTriple::f1, blender::BezTriple::f2, blender::BezTriple::f3, blender::GPU_line_width(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_PRIM_LINES, blender::immBegin(), blender::immEnd(), blender::immUniformColor4f(), blender::immUniformColor4fv(), blender::immVertex2fv(), and blender::BezTriple::vec.
Referenced by draw_bezier_handle_lines(), and paint_draw_curve_cursor().
| BLI_INLINE void blender::ed::sculpt_paint::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 780 of file paint_cursor.cc.
References BLI_INLINE, draw_rect_point(), blender::GPU_line_width(), blender::imm_draw_box_wire_2d(), blender::immUniformColor4f(), blender::immUniformColor4fv(), and w().
Referenced by draw_rect_point(), and paint_draw_curve_cursor().
| BLI_INLINE void blender::ed::sculpt_paint::draw_tri_point | ( | uint | pos, |
| const float | sel_col[4], | ||
| const float | pivot_col[4], | ||
| float * | co, | ||
| float | width, | ||
| bool | selected ) |
Definition at line 746 of file paint_cursor.cc.
References BLI_INLINE, draw_tri_point(), blender::GPU_line_width(), blender::GPU_PRIM_LINE_LOOP, blender::immBegin(), blender::immEnd(), blender::immUniformColor4f(), blender::immUniformColor4fv(), blender::immVertex2fv(), and w().
Referenced by draw_tri_point(), and paint_draw_curve_cursor().
|
static |
Definition at line 3157 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_pbvh_bmesh_node_save_orig(), blender::BKE_pbvh_node_mark_topology_update(), blender::SculptSession::bm, blender::SculptSession::bm_log, blender::bke::pbvh::bmesh_update_topology(), blender::SculptSession::boundary_info_cache, blender::BRUSH_FRONTFACE, blender::ed::sculpt_paint::dyntopo::detail_size::brush_to_detail_size(), brush_type_needs_original(), blender::SculptSession::cache, blender::Sculpt::constant_detail, blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_detail_size(), blender::Sculpt::detail_percent, blender::Sculpt::detail_size, dynamic_topology_update(), blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::dyntopo::detail_size::EDGE_LENGTH_MIN_FACTOR, blender::Sculpt::flags, blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::undo::Mask, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PBVH_Collapse, pbvh_gather_generic(), blender::bke::object::pbvh_get(), blender::PBVH_Subdivide, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_nodes(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::dyntopo::detail_size::relative_to_detail_size(), blender::Object::runtime, blender::ToolSettings::sculpt, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_DYNTOPO_COLLAPSE, blender::SCULPT_DYNTOPO_DETAIL_BRUSH, blender::SCULPT_DYNTOPO_DETAIL_CONSTANT, blender::SCULPT_DYNTOPO_DETAIL_MANUAL, blender::SCULPT_DYNTOPO_SUBDIVIDE, blender::bke::ObjectRuntime::sculpt_session, blender::Scene::toolsettings, blender::true, blender::U, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by dynamic_topology_update(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 449 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), apply_translations(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::SculptSession::bm, calc_transform_translations(), clip_and_lock_translations(), elastic_transform_node_bmesh(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_bmesh_positions(), node, blender::ed::sculpt_paint::TransformLocalData::positions, lexit::Vector< T >::resize(), scale_factors(), scale_translations(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by elastic_transform_node_bmesh(), and transform_radius_elastic().
|
static |
Definition at line 418 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), apply_translations(), calc_transform_translations(), clip_and_lock_translations(), elastic_transform_node_grids(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_grids_positions(), node, blender::ed::sculpt_paint::TransformLocalData::positions, lexit::Vector< T >::resize(), scale_factors(), scale_translations(), blender::MutableSpan< T >::size(), blender::SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by elastic_transform_node_grids(), and transform_radius_elastic().
|
static |
Definition at line 386 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), calc_transform_translations(), clip_and_lock_translations(), elastic_transform_node_mesh(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_data_mesh(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, node, blender::ed::sculpt_paint::TransformLocalData::positions, lexit::Vector< T >::resize(), scale_factors(), scale_translations(), blender::Span< T >::size(), and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by elastic_transform_node_mesh(), and transform_radius_elastic().
Definition at line 630 of file sculpt_transform.cc.
References blender::BLI_assert(), C, blender::CTX_data_tool_settings(), end_transform(), blender::SculptSession::filter_cache, finish_pivot_change(), flush_update_done(), Position, blender::ed::sculpt_paint::undo::push_end(), blender::Object::runtime, blender::SCE_XFORM_SCULPT_PIVOT, blender::bke::ObjectRuntime::sculpt_session, and blender::ToolSettings::transform_flag.
Referenced by end_transform(), and blender::ed::transform::special_aftertrans_update__sculpt().
|
static |
Definition at line 2163 of file draw_ops.cc.
References C, blender::RenderData::cfra, blender::CTX_data_scene(), blender::ed::greasepencil::ensure_active_keyframe(), ensure_drawing_for_autokey(), blender::GP_FRAME_SELECTED, layer, NA_EDITED, NC_GPENCIL, blender::Scene::r, SET_FLAG_FROM_TEST, use_duplicate_previous_key(), and blender::WM_event_add_notifier().
Referenced by ensure_drawing_for_autokey(), grease_pencil_erase_box_exec(), and grease_pencil_erase_lasso_exec().
|
static |
Definition at line 1420 of file draw_ops.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::RenderData::cfra, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), ensure_editable_drawings(), blender::bke::greasepencil::Layer::frames(), blender::GP_TOOL_FLAG_RETAIN_LAST, blender::GP_USE_MULTI_FRAME_EDITING, blender::ToolSettings::gpencil_flags, blender::animrig::is_autokey_on(), layer, blender::Scene::r, blender::bke::greasepencil::Layer::start_frame_at(), and blender::Scene::toolsettings.
Referenced by ensure_editable_drawings(), and grease_pencil_apply_fill().
Definition at line 42 of file mesh_paint.cc.
References blender::bke::PaintRuntime::average_stroke_counter, blender::bke::pbvh::bounds_get(), ensure_valid_pivot(), blender::bke::PaintRuntime::last_stroke_valid, blender::math::midpoint(), blender::bke::object::pbvh_get(), blender::bke::paint::stroke_set_location(), and blender::math::transform_point().
Referenced by ensure_valid_pivot(), and init_session().
| blender::ed::sculpt_paint::ENUM_OPERATORS | ( | AverageDataFlags | ) |
References ENUM_OPERATORS().
Referenced by ENUM_OPERATORS().
|
static |
Definition at line 339 of file sculpt_mask_extract.cc.
References blender::ed::sculpt_paint::GeometryExtractParams::active_face_set, blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::GeometryExtractParams::add_boundary_loop, blender::ed::sculpt_paint::GeometryExtractParams::add_solidify, blender::ed::sculpt_paint::GeometryExtractParams::apply_shrinkwrap, C, blender::CTX_data_active_object(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), face_set_extract_invoke(), face_set_none_id, float, geometry_extract_apply(), geometry_extract_tag_face_set(), blender::ed::sculpt_paint::GeometryExtractParams::num_smooth_iterations, blender::OPERATOR_CANCELLED, blender::ARegion::winrct, blender::rcti::xmin, blender::wmEvent::xy, and blender::rcti::ymin.
Referenced by face_set_extract_invoke(), and SCULPT_OT_face_set_extract().
| void blender::ed::sculpt_paint::face_set_overlay_check | ( | bContext & | C, |
| wmOperator & | op ) |
Definition at line 8320 of file sculpt.cc.
References blender::BKE_report(), C, blender::CTX_wm_view3d(), face_set_overlay_check(), blender::View3DOverlay::flag, blender::View3D::flag2, NC_SPACE, ND_SPACE_VIEW3D, blender::View3D::overlay, blender::wmOperator::reports, RPT_, blender::RPT_WARNING, blender::View3DOverlay::sculpt_mode_face_sets_opacity, blender::V3D_HIDE_OVERLAYS, blender::V3D_OVERLAY_SCULPT_SHOW_FACE_SETS, and blender::WM_event_add_notifier().
Referenced by blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_op_exec(), face_set_overlay_check(), blender::ed::sculpt_paint::face_set::gesture_box_exec(), blender::ed::sculpt_paint::face_set::gesture_lasso_exec(), blender::ed::sculpt_paint::face_set::gesture_line_exec(), blender::ed::sculpt_paint::face_set::gesture_polyline_exec(), blender::ed::sculpt_paint::face_set::init_op_exec(), sculpt_brush_stroke_invoke(), and blender::ed::sculpt_paint::expand::sculpt_expand_invoke().
Definition at line 5967 of file sculpt.cc.
References blender::SculptFakeNeighbors::current_max_distance, blender::SculptFakeNeighbors::fake_neighbor_index, fake_neighbor_init(), FAKE_NEIGHBOR_NONE, blender::SculptSession::fake_neighbors, and vertex_count_get().
Referenced by fake_neighbor_init(), and fake_neighbors_ensure().
|
static |
Definition at line 6083 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::bm, blender::SculptSession::bm, blender::BM_vert_at_index(), blender::bke::pbvh::BMesh, blender::BMVert::co, blender::Object::data, blender::Editor, FAKE_NEIGHBOR_NONE, fake_neighbor_search(), fake_neighbor_search_bmesh(), fake_neighbor_search_grids(), fake_neighbor_search_mesh(), blender::index_mask::IndexMask::foreach_index(), blender::SubdivCCG::grid_hidden, blender::bke::pbvh::Grids, blender::index_mask::IndexMask::index_range(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::NearestVertData::join(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, node_in_sphere(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::SubdivCCG::positions, PRF_scope, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::bke::pbvh::search_nodes(), blender::index_mask::IndexMask::slice(), blender::SculptSession::subdiv_ccg, blender::BMesh::totvert, blender::ed::sculpt_paint::islands::vert_id_get(), and blender::bke::pbvh::vert_positions_eval().
Referenced by fake_neighbor_search(), and fake_neighbors_ensure().
|
static |
Definition at line 6055 of file sculpt.cc.
References blender::BKE_pbvh_bmesh_node_unique_verts(), BM_elem_flag_test, blender::BM_ELEM_HIDDEN, BM_elem_index_get, blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), blender::SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_bmesh(), blender::SculptSession::fake_neighbors, node, blender::ed::sculpt_paint::NearestVertData::vert, and blender::ed::sculpt_paint::islands::vert_id_get().
Referenced by fake_neighbor_search(), and fake_neighbor_search_bmesh().
|
static |
Definition at line 6026 of file sculpt.cc.
References blender::BKE_subdiv_ccg_foreach_visible_grid_vert(), blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), blender::SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_grids(), blender::SculptSession::fake_neighbors, blender::bke::ccg::grid_range(), node, blender::ed::sculpt_paint::NearestVertData::vert, and blender::ed::sculpt_paint::islands::vert_id_get().
Referenced by fake_neighbor_search(), and fake_neighbor_search_grids().
|
static |
Definition at line 5999 of file sculpt.cc.
References blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), blender::SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_mesh(), blender::SculptSession::fake_neighbors, blender::Span< T >::is_empty(), node, blender::ed::sculpt_paint::NearestVertData::vert, and blender::ed::sculpt_paint::islands::vert_id_get().
Referenced by fake_neighbor_search(), and fake_neighbor_search_mesh().
| Span< int > blender::ed::sculpt_paint::fake_neighbors_ensure | ( | const Depsgraph & | depsgraph, |
| Object & | ob, | ||
| float | max_dist ) |
This allows the sculpt brushes to work on meshes with multiple connected components as if they had only one connected component. These neighbors are calculated for each vertex using the minimum distance to a vertex that is in a different connected component.
Definition at line 6230 of file sculpt.cc.
References blender::SculptFakeNeighbors::current_max_distance, blender::ed::sculpt_paint::islands::ensure_cache(), blender::SculptFakeNeighbors::fake_neighbor_index, fake_neighbor_init(), fake_neighbor_search(), blender::SculptSession::fake_neighbors, fake_neighbors_ensure(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by fake_neighbors_ensure(), and blender::ed::sculpt_paint::pose::ik_chain_init().
| void blender::ed::sculpt_paint::fake_neighbors_free | ( | Object & | ob | ) |
Definition at line 6249 of file sculpt.cc.
References fake_neighbors_free(), pose_fake_neighbors_free(), blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by fake_neighbors_free(), flush_update_done(), and blender::ed::sculpt_paint::pose::ik_chain_init().
|
static |
Definition at line 2011 of file paint_vertex.cc.
References blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_from_object(), blender::DEG_id_tag_update(), fill_active_color(), fill_mesh_color(), blender::ID_RECALC_SYNC_TO_EVAL, blender::ME_EDIT_PAINT_FACE_SEL, and blender::ME_EDIT_PAINT_VERT_SEL.
Referenced by fill_active_color(), object_active_color_init(), and blender::vertex_color_set_exec().
|
static |
Definition at line 1884 of file paint_vertex.cc.
References blender::BKE_paint_is_bmesh_face_hidden(), blender::bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, blender::BM_ELEM_SELECT, blender::BM_FACES_OF_MESH, BM_ITER_MESH, fill_bm_face_or_corner_attribute(), blender::l, blender::BMFace::l_first, blender::BMLoop::next, T, and blender::BMLoop::v.
Referenced by fill_bm_face_or_corner_attribute(), and fill_mesh_color().
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float > | r_factors ) |
Definition at line 7116 of file sculpt.cc.
References blender::BLI_assert(), BM_elem_flag_test_bool, blender::BM_ELEM_HIDDEN, blender::Editor, fill_factor_from_hide(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 7094 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::fill(), fill_factor_from_hide(), blender::CCGKey::grid_area, blender::SubdivCCG::grid_hidden, blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | Span< bool > | hide_vert, |
| Span< int > | verts, | ||
| MutableSpan< float > | r_factors ) |
Calculate initial influence factors based on vertex visibility.
Definition at line 7077 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::fill(), fill_factor_from_hide(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::calculate_average_color(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), fill_factor_from_hide(), fill_factor_from_hide(), fill_factor_from_hide(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | const BMesh & | bm, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 7154 of file sculpt.cc.
References blender::BLI_assert(), blender::bm, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, blender::BM_ELEM_HIDDEN, blender::CD_PROP_FLOAT, blender::CustomData_get_offset_named(), blender::Editor, fill_factor_from_hide_and_mask(), PRF_scope, blender::MutableSpan< T >::size(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::BMesh::vdata.
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 7173 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), blender::CCGKey::grid_area, blender::SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::SubdivCCG::masks, PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | Span< bool > | hide_vert, |
| Span< float > | mask, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | r_factors ) |
Calculate initial influence factors based on vertex visibility and masking.
Definition at line 7128 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by 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::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush_task(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
|
static |
Definition at line 1960 of file paint_vertex.cc.
References attribute, blender::BKE_editmesh_bmesh_get_for_write(), blender::bm, blender::BM_data_layer_lookup(), blender::bke::ColorByte, blender::bke::ColorFloat, blender::BMDataLayerLookup::domain, blender::color::encode(), fill_bm_face_or_corner_attribute(), fill_mesh_color(), fill_mesh_face_or_corner_attribute(), blender::BMDataLayerLookup::offset, and blender::BMDataLayerLookup::type.
Referenced by fill_active_color(), and fill_mesh_color().
|
static |
Definition at line 1912 of file paint_vertex.cc.
References blender::BKE_mesh_tessface_clear(), blender::data, blender::bke::Face, fill_mesh_face_or_corner_attribute(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::bke::Point, and T.
Referenced by fill_mesh_color(), and fill_mesh_face_or_corner_attribute().
| void blender::ed::sculpt_paint::filter_above_plane_factors | ( | Span< float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 8286 of file sculpt.cc.
References blender::Editor, filter_above_plane_factors(), blender::Span< T >::index_range(), blender::plane_point_side_v3(), and PRF_scope.
| void blender::ed::sculpt_paint::filter_above_plane_factors | ( | Span< float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 8273 of file sculpt.cc.
References blender::Editor, filter_above_plane_factors(), blender::Span< T >::index_range(), blender::plane_point_side_v3(), and PRF_scope.
Referenced by filter_above_plane_factors(), and filter_above_plane_factors().
| void blender::ed::sculpt_paint::filter_below_plane_factors | ( | Span< float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 8261 of file sculpt.cc.
References blender::Editor, filter_below_plane_factors(), blender::Span< T >::index_range(), blender::plane_point_side_v3(), and PRF_scope.
| void blender::ed::sculpt_paint::filter_below_plane_factors | ( | Span< float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Ignore points below the plane.
Definition at line 8248 of file sculpt.cc.
References blender::Editor, filter_below_plane_factors(), blender::Span< T >::index_range(), blender::plane_point_side_v3(), and PRF_scope.
Referenced by filter_below_plane_factors(), and filter_below_plane_factors().
| void blender::ed::sculpt_paint::filter_distances_with_radius | ( | float | radius, |
| Span< float > | distances, | ||
| MutableSpan< float > | factors ) |
Set the factor to zero for all distances greater than the radius.
Definition at line 7422 of file sculpt.cc.
References blender::Editor, filter_distances_with_radius(), blender::Span< T >::index_range(), and PRF_scope.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), filter_distances_with_radius(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::filter_plane_trim_limit_factors | ( | const Brush & | brush, |
| const StrokeCache & | cache, | ||
| Span< float3 > | translations, | ||
| MutableSpan< float > | factors ) |
Ignore points that fall below the "plane trim" threshold for the brush.
Definition at line 8231 of file sculpt.cc.
References blender::BRUSH_PLANE_TRIM, blender::Editor, filter_plane_trim_limit_factors(), blender::Span< T >::index_range(), blender::math::length_squared(), blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, PRF_scope, and blender::ed::sculpt_paint::StrokeCache::radius_squared.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::brushes::calc_grids(), and filter_plane_trim_limit_factors().
| void blender::ed::sculpt_paint::filter_region_clip_factors | ( | const SculptSession & | ss, |
| Span< float3 > | positions, | ||
| MutableSpan< float > | factors ) |
Definition at line 7314 of file sculpt.cc.
References blender::BLI_assert(), blender::SculptSession::cache, blender::ED_view3d_clipping_test(), blender::Editor, filter_region_clip_factors(), blender::MatBase< float, 4, 4 >::identity(), blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::SculptSession::rv3d, blender::ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::math::transform_point(), blender::SculptSession::v3d, blender::ViewContext::v3d, and blender::ed::sculpt_paint::StrokeCache::vc.
| void blender::ed::sculpt_paint::filter_region_clip_factors | ( | const SculptSession & | ss, |
| Span< float3 > | vert_positions, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | factors ) |
When the 3D view's clipping planes are enabled, brushes shouldn't have any effect on vertices outside of the planes, because they're not visible. This function disables the factors for those vertices.
Definition at line 7285 of file sculpt.cc.
References blender::BLI_assert(), blender::SculptSession::cache, blender::ED_view3d_clipping_test(), blender::Editor, filter_region_clip_factors(), blender::MatBase< float, 4, 4 >::identity(), blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::SculptSession::rv3d, blender::ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::math::transform_point(), blender::SculptSession::v3d, blender::ViewContext::v3d, and blender::ed::sculpt_paint::StrokeCache::vc.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), filter_region_clip_factors(), filter_region_clip_factors(), blender::ed::sculpt_paint::face_set::gesture_apply_bmesh(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::filter_translations | ( | MutableSpan< float3 > | translations, |
| Span< float > | factors ) |
Definition at line 7827 of file sculpt.cc.
References blender::Editor, filter_translations(), blender::MutableSpan< T >::index_range(), and PRF_scope.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), and filter_translations().
|
static |
Definition at line 192 of file sculpt_transform.cc.
References BLI_NOINLINE, filter_translations_with_symmetry(), blender::Span< T >::index_range(), blender::PAINT_SYMM_X, blender::PAINT_SYMM_Y, blender::PAINT_SYMM_Z, transform_mirror_max_distance_eps, blender::x, y, and z().
Referenced by filter_translations_with_symmetry(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| void blender::ed::sculpt_paint::filter_verts_outside_symmetry_area | ( | Span< float3 > | positions, |
| const float3 & | pivot, | ||
| ePaintSymmetryFlags | symm, | ||
| MutableSpan< float > | factors ) |
Ignores verts outside of a symmetric area defined by a pivot point.
Definition at line 8216 of file sculpt.cc.
References blender::BLI_assert(), check_vertex_pivot_symmetry(), blender::Editor, filter_verts_outside_symmetry_area(), blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), and filter_verts_outside_symmetry_area().
| std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 692 of file sculpt_expand.cc.
References BLI_assert_unreachable, blender::bke::pbvh::BMesh, find_all_symm_verts(), find_all_symm_verts_bmesh(), find_all_symm_verts_grids(), find_all_symm_verts_mesh(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, and blender::bke::object::pbvh_get().
Referenced by blender::ed::sculpt_paint::auto_mask::cache_init(), and find_all_symm_verts().
| std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts_bmesh | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 778 of file sculpt_expand.cc.
References blender::bm, blender::SculptSession::bm, BM_elem_index_get, blender::BM_vert_at_index(), blender::BMVert::co, find_all_symm_verts_bmesh(), is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), nearest_vert_calc_bmesh(), PAINT_SYMM_AREAS, blender::bke::object::pbvh_get(), and symmetry_flip().
Referenced by find_all_symm_verts(), and find_all_symm_verts_bmesh().
| std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts_grids | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 745 of file sculpt_expand.cc.
References blender::BKE_subdiv_ccg_key_top_level(), find_all_symm_verts_grids(), is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), nearest_vert_calc_grids(), PAINT_SYMM_AREAS, blender::bke::object::pbvh_get(), blender::SubdivCCG::positions, blender::SculptSession::subdiv_ccg, and symmetry_flip().
Referenced by find_all_symm_verts(), and find_all_symm_verts_grids().
| std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts_mesh | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| int | original_vert, | ||
| float | max_distance = std::numeric_limits< float >::max() ) |
Similar to find_symm_verts, but returns an unsorted set of all vertex indices.
Definition at line 710 of file sculpt_expand.cc.
References blender::data, find_all_symm_verts_mesh(), is_symmetry_iteration_valid(), blender::bke::AttributeAccessor::lookup(), mesh_symmetry_xyz_get(), nearest_vert_calc_mesh(), PAINT_SYMM_AREAS, blender::bke::object::pbvh_get(), blender::bke::Point, symmetry_flip(), and blender::bke::pbvh::vert_positions_eval().
Referenced by find_all_symm_verts(), and find_all_symm_verts_mesh().
|
static |
Determine the 3D position of a brush based on curve segments under a screen position.
Definition at line 55 of file sculpt_brush.cc.
References b, blender::closest_to_line_segment_v2(), blender::closest_to_line_segment_v3(), blender::ed::sculpt_paint::BrushPositionCandidate::depth_sq_cu, blender::ed::sculpt_paint::BrushPositionCandidate::distance_sq_re, blender::math::distance_squared(), blender::IndexRange::drop_back(), blender::ED_view3d_ob_project_mat_get(), blender::ED_view3d_project_float_v2_m4(), find_curves_brush_position(), blender::IndexRange::first(), FLT_MAX, blender::bke::subdiv::init(), blender::math::interpolate(), blender::threading::parallel_reduce(), blender::ed::sculpt_paint::BrushPositionCandidate::position_cu, blender::pow2f(), blender::IndexRange::size(), and UI_UNIT_X.
Referenced by find_curves_brush_position(), and sample_curves_3d_brush().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 674 of file sculpt_expand.cc.
References BLI_assert_unreachable, blender::bke::pbvh::BMesh, find_symm_verts(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, and blender::bke::object::pbvh_get().
Referenced by blender::ed::sculpt_paint::expand::boundary_topology_falloff_create(), blender::ed::sculpt_paint::expand::diagonals_falloff_create(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), find_symm_verts(), blender::ed::sculpt_paint::expand::geodesic_falloff_create(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), and blender::ed::sculpt_paint::expand::topology_falloff_create().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_bmesh | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 642 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bm, blender::SculptSession::bm, BM_elem_index_get, blender::BM_vert_at_index(), blender::BMVert::co, find_symm_verts_bmesh(), is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), nearest_vert_calc_bmesh(), blender::bke::object::pbvh_get(), and symmetry_flip().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), find_symm_verts(), find_symm_verts_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_grids | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 609 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_subdiv_ccg_key_top_level(), find_symm_verts_grids(), is_symmetry_iteration_valid(), mesh_symmetry_xyz_get(), nearest_vert_calc_grids(), blender::bke::object::pbvh_get(), blender::SubdivCCG::positions, blender::SculptSession::subdiv_ccg, and symmetry_flip().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), find_symm_verts(), find_symm_verts_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_mesh | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| int | original_vert, | ||
| float | max_distance = std::numeric_limits< float >::max() ) |
Utility functions to get the closest vertices after flipping an original vertex position for all symmetry passes. The returned vector is sorted.
Definition at line 574 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::data, find_symm_verts_mesh(), is_symmetry_iteration_valid(), blender::bke::AttributeAccessor::lookup(), mesh_symmetry_xyz_get(), nearest_vert_calc_mesh(), blender::bke::object::pbvh_get(), blender::bke::Point, symmetry_flip(), and blender::bke::pbvh::vert_positions_eval().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), find_symm_verts(), find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh().
Definition at line 92 of file sculpt_transform.cc.
References blender::BKE_paint_get_active_from_context(), C, blender::CTX_wm_region(), blender::Object::data, blender::ED_region_tag_redraw(), finish_pivot_change(), NC_GEOM, ND_SELECT, blender::SculptSession::pivot_pos, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::bke::paint::stroke_set_location(), and blender::WM_event_add_notifier().
Referenced by end_transform(), finish_pivot_change(), and set_pivot_position_exec().
|
static |
Definition at line 3017 of file sculpt.cc.
References flip_qt(), and flip_qt_qt().
Referenced by flip_qt(), and flip_quat_by_symm_area().
|
static |
Definition at line 2994 of file sculpt.cc.
References angle(), blender::axis_angle_normalized_to_quat(), flip_qt_qt(), blender::gpu::shader::metadata::in, blender::normalize_v3(), blender::gpu::shader::metadata::out, blender::PAINT_SYMM_X, blender::PAINT_SYMM_Y, blender::PAINT_SYMM_Z, and blender::quat_to_axis_angle().
Referenced by cache_calc_brushdata_symm(), flip_qt(), and flip_qt_qt().
| void blender::ed::sculpt_paint::flip_quat_by_symm_area | ( | float | quat[4], |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] ) |
Definition at line 3043 of file sculpt.cc.
References flip_qt(), and flip_quat_by_symm_area().
Referenced by blender::ed::sculpt_paint::pose::do_pose_brush(), flip_quat_by_symm_area(), and transform_matrices_init().
| float3 blender::ed::sculpt_paint::flip_v3_by_symm_area | ( | const float3 & | vector, |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float3 & | pivot ) |
Definition at line 3022 of file sculpt.cc.
References flip_v3_by_symm_area(), blender::result, and symmetry_flip().
Referenced by blender::ed::sculpt_paint::pose::align_pivot_local_space(), blender::ed::sculpt_paint::pose::do_pose_brush(), flip_v3_by_symm_area(), and transform_matrices_init().
| bke::SpanAttributeWriter< float > blender::ed::sculpt_paint::float_selection_ensure | ( | Curves & | curves_id | ) |
Definition at line 14 of file sculpt_selection.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::Bool, blender::bke::Float, float_selection_ensure(), blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::VArrayCommon< T >::materialize(), blender::bke::MutableAttributeAccessor::remove(), and blender::VArrayCommon< T >::size().
Referenced by blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), float_selection_ensure(), blender::ed::sculpt_paint::select_grow::select_grow_update(), and blender::ed::sculpt_paint::select_random::select_random_exec().
| void blender::ed::sculpt_paint::flush_update_done | ( | bContext * | C, |
| Object & | ob, | ||
| UpdateType | update_type ) |
Triggers redraws, updates, and dependency graph tags as necessary when a brush stroke finishes.
Definition at line 5131 of file sculpt.cc.
References C, blender::CTX_data_depsgraph_pointer(), blender::CTX_wm_manager(), blender::ED_view3d_viewcontext_init(), and flush_update_done().
Referenced by blender::ed::sculpt_paint::SculptPaintStroke::done(), blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), end_transform(), blender::ed::sculpt_paint::expand::finish(), flush_update_done(), flush_update_done(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_end(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_end().
| void blender::ed::sculpt_paint::flush_update_done | ( | ViewContext & | vc, |
| const wmWindowManager & | wm, | ||
| Object & | ob, | ||
| const UpdateType | update_type ) |
Definition at line 5138 of file sculpt.cc.
References blender::bScreen::areabase, blender::BKE_pbvh_bmesh_after_stroke(), blender::BKE_sculptsession_use_pbvh_draw(), blender::SculptSession::bm, blender::bke::pbvh::BMesh, blender::Object::data, blender::DEG_id_tag_update(), blender::ED_region_tag_redraw(), fake_neighbors_free(), flush_update_done(), blender::Object::id, ID_REAL_USERS, blender::ID_RECALC_GEOMETRY, blender::bke::object::pbvh_get(), Position, blender::ScrArea::regionbase, blender::ARegion::regiondata, blender::ARegion::regiontype, blender::RegionView3D::rflag, blender::RGN_TYPE_WINDOW, blender::Object::runtime, blender::ViewContext::rv3d, blender::RV3D_PAINTING, blender::bke::ObjectRuntime::sculpt_session, blender::SPACE_VIEW3D, blender::ScrArea::spacedata, blender::SpaceLink::spacetype, blender::bke::pbvh::store_bounds_orig(), and blender::WM_window_get_active_screen().
| void blender::ed::sculpt_paint::flush_update_step | ( | bContext * | C, |
| UpdateType | update_type ) |
Triggers redraws, updates, and dependency graph tags as necessary after each brush calculation.
Definition at line 5090 of file sculpt.cc.
References C, blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::ED_view3d_viewcontext_init(), and flush_update_step().
Referenced by blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), flush_update_step(), flush_update_step(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_apply(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_apply(), blender::ed::sculpt_paint::expand::update_for_vert(), update_modal_transform(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
| void blender::ed::sculpt_paint::flush_update_step | ( | ViewContext & | vc, |
| Object & | object, | ||
| const UpdateType | update_type ) |
Definition at line 5096 of file sculpt.cc.
References blender::BKE_sculptsession_use_pbvh_draw(), blender::DEG_id_tag_update(), blender::ViewContext::depsgraph, blender::ED_region_tag_redraw(), blender::Editor, flush_update_step(), blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SHADING, blender::bke::pbvh::Mesh, blender::MULTIRES_COORDS_MODIFIED, blender::multires_mark_as_modified(), blender::SculptSession::multires_modifier, blender::bke::object::pbvh_get(), Position, PRF_scope, blender::ViewContext::region, blender::RegionView3D::rflag, blender::ViewContext::rv3d, blender::RV3D_PAINTING, blender::SculptSession::shapekey_active, and tag_mesh_positions_changed().
| void blender::ed::sculpt_paint::gather_bmesh_normals | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float3 > | normals ) |
Definition at line 6517 of file sculpt.cc.
References blender::Editor, gather_bmesh_normals(), and PRF_scope.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), gather_bmesh_normals(), and blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh().
| void blender::ed::sculpt_paint::gather_bmesh_positions | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float3 > | positions ) |
Definition at line 6497 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, gather_bmesh_positions(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), elastic_transform_node_bmesh(), gather_bmesh_positions(), gather_bmesh_positions(), and blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh().
|
inline |
Definition at line 161 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_bmesh_positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
| IndexMask blender::ed::sculpt_paint::gather_brush_nodes | ( | const Object & | ob, |
| const Brush & | brush, | ||
| IndexMaskMemory & | memory, | ||
| FunctionRef< bool(const bke::pbvh::Node &)> | node_ignore_fn ) |
Query the BVH based on the current brush being used.
TODO: Merge this implementation with #pbvh_gather_generic
Definition at line 467 of file mesh_paint.cc.
References BLI_assert_unreachable, blender::SculptSession::cache, blender::dist_squared_ray_to_aabb_v3_precalc(), gather_brush_nodes(), blender::ed::sculpt_paint::StrokeCache::location_symm, node, node_in_cylinder(), node_in_sphere(), blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::radius_squared, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::bke::pbvh::search_nodes(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by blender::ed::sculpt_paint::image::ops::paint::do_brush_action(), gather_brush_nodes(), blender::vpaint_do_paint(), and blender::wpaint_do_paint().
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_bmesh | ( | const Span< T > | src, |
| const Set< BMVert *, 0 > & | verts, | ||
| Vector< T > & | dst ) |
Definition at line 127 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_data_bmesh(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
| void blender::ed::sculpt_paint::gather_data_bmesh | ( | Span< T > | src, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< T > | node_data ) |
Definition at line 6545 of file sculpt.cc.
References blender::BLI_assert(), BM_elem_index_get, blender::Editor, gather_data_bmesh(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), gather_data_bmesh(), gather_data_bmesh(), gather_data_bmesh< float >(), gather_data_bmesh< float3 >(), and gather_data_bmesh< int >().
| template void blender::ed::sculpt_paint::gather_data_bmesh< float > | ( | Span< float > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float > | ) |
References gather_data_bmesh().
| template void blender::ed::sculpt_paint::gather_data_bmesh< float3 > | ( | Span< float3 > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float3 > | ) |
References gather_data_bmesh().
| template void blender::ed::sculpt_paint::gather_data_bmesh< int > | ( | Span< int > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< int > | ) |
References gather_data_bmesh().
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| const Span< T > | src, | ||
| const Span< int > | grids, | ||
| Vector< T > & | dst ) |
Definition at line 113 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::BKE_subdiv_ccg_key_top_level(), gather_data_grids(), blender::CCGKey::grid_area, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::gather_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| Span< T > | src, | ||
| Span< int > | grids, | ||
| MutableSpan< T > | node_data ) |
Definition at line 6528 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::MutableSpan< T >::copy_from(), blender::Editor, gather_data_grids(), blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), gather_data_grids(), gather_data_grids(), gather_data_grids< float >(), gather_data_grids< float3 >(), gather_data_grids< int >(), gather_grids_normals(), gather_grids_positions(), blender::ed::sculpt_paint::mask::gather_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::mask::sharpen_mask_grids(), blender::ed::sculpt_paint::mask::smooth_mask_grids(), blender::ed::sculpt_paint::undo::store_mask_grids(), and blender::ed::sculpt_paint::undo::store_positions_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< float > | ( | const SubdivCCG & | , |
| Span< float > | , | ||
| Span< int > | , | ||
| MutableSpan< float > | ) |
References gather_data_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< float3 > | ( | const SubdivCCG & | , |
| Span< float3 > | , | ||
| Span< int > | , | ||
| MutableSpan< float3 > | ) |
References gather_data_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< int > | ( | const SubdivCCG & | , |
| Span< int > | , | ||
| Span< int > | , | ||
| MutableSpan< int > | ) |
References gather_data_grids().
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_mesh | ( | const Span< T > | src, |
| const Span< int > | indices, | ||
| Vector< T > & | dst ) |
Definition at line 101 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_data_mesh(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::gather_data_mesh | ( | Span< T > | src, |
| Span< int > | indices, | ||
| MutableSpan< T > | dst ) |
Gather data from an array aligned with all geometry vertices.
Definition at line 94 of file mesh_brush_common.hh.
References blender::Editor, blender::array_utils::gather(), gather_data_mesh(), PRF_scope, and blender::exec_mode::serial.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), elastic_transform_node_mesh(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), gather_data_mesh(), gather_data_mesh(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::smooth_mask_mesh(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), blender::ed::sculpt_paint::undo::store_face_sets(), blender::ed::sculpt_paint::undo::store_mask_mesh(), blender::ed::sculpt_paint::undo::store_positions_mesh(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().
| void blender::ed::sculpt_paint::gather_grids_normals | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float3 > | normals ) |
Fill the output array with all normals in the grids referenced by the indices.
Definition at line 6509 of file sculpt.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Editor, gather_data_grids(), gather_grids_normals(), blender::SubdivCCG::normals, and PRF_scope.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), gather_grids_normals(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().
|
inline |
Fill the output array with all positions in the geometry referenced by the indices.
Definition at line 150 of file mesh_brush_common.hh.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_subdiv_ccg_key_top_level(), blender::Editor, gather_data_grids(), gather_grids_positions(), blender::CCGKey::grid_area, blender::SubdivCCG::positions, PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::project::apply_projection_grids(), calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), elastic_transform_node_grids(), gather_grids_positions(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().
| IndexMask blender::ed::sculpt_paint::gather_nodes | ( | const bke::pbvh::Tree & | pbvh, |
| const eBrushFalloffShape | falloff_shape, | ||
| const bool | use_original, | ||
| const float3 & | location, | ||
| const float | radius_sq, | ||
| const std::optional< float3 > & | ray_direction, | ||
| IndexMaskMemory & | memory ) |
Definition at line 2696 of file sculpt.cc.
References blender::BLI_assert(), BLI_assert_unreachable, blender::dist_squared_ray_to_aabb_v3_precalc(), blender::Editor, gather_nodes(), node, node_fully_masked_or_hidden(), node_in_cylinder(), node_in_sphere(), blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, PRF_scope, and blender::bke::pbvh::search_nodes().
Referenced by calc_brush_node_mask(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), and gather_nodes().
|
static |
Definition at line 81 of file sculpt_mask_extract.cc.
References blender::ed::sculpt_paint::GeometryExtractParams::add_boundary_loop, blender::ed::sculpt_paint::GeometryExtractParams::add_solidify, blender::ed::object::add_type(), blender::ed::sculpt_paint::GeometryExtractParams::apply_shrinkwrap, blender::BKE_id_copy(), blender::BKE_id_free(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_from_bmesh_nomain(), blender::BKE_mesh_nomain_to_mesh(), blender::BKE_modifiers_findby_name(), blender::BKE_shrinkwrap_mesh_nearest_surface_deform(), blender::bm, blender::BM_EDGE, blender::BM_edge_is_boundary(), blender::BM_EDGES_OF_MESH, BM_elem_flag_set, blender::BM_ELEM_SELECT, blender::BM_ELEM_TAG, blender::BM_FACE, BM_ITER_MESH, blender::BM_mesh_bm_from_me(), blender::BM_mesh_create(), blender::BM_mesh_delete_hflag_context(), blender::BM_mesh_elem_hflag_disable_all(), blender::BM_mesh_free(), blender::BM_VERT, blender::BM_vert_is_boundary(), blender::BM_VERTS_OF_MESH, BMALLOC_TEMPLATE_FROM_ME, C, blender::BMeshFromMeshParams::calc_face_normal, blender::BMeshToMeshParams::calc_object_remap, blender::BMeshFromMeshParams::calc_vert_normal, blender::BMVert::co, blender::CTX_data_active_object(), blender::CTX_data_depsgraph_on_load(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::DEG_relations_tag_update(), blender::DEL_FACES, blender::EDBM_extrude_edges_indiv(), blender::EDBM_smooth_vert(), blender::eModifierType_Solidify, geometry_extract_apply(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::Object::loc, blender::View3D::local_view_uid, blender::View3D::localvd, blender::ed::object::modifier_add(), blender::mul_v3_v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, blender::ed::sculpt_paint::GeometryExtractParams::num_smooth_iterations, blender::OB_MESH, object_sculpt_mode_exit(), blender::SolidifyModifierData::offset, blender::OPERATOR_FINISHED, blender::wmOperator::reports, blender::Object::rot, blender::Object::scale, blender::BMeshCreateParams::use_toolflags, blender::v, blender::Mesh::verts_num, and blender::WM_event_add_notifier().
Referenced by face_set_extract_invoke(), geometry_extract_apply(), and paint_mask_extract_exec().
|
static |
Definition at line 51 of file sculpt_mask_extract.cc.
References blender::SculptSession::bm, C, blender::CTX_data_active_object(), blender::CTX_wm_operator_poll_msg_set(), blender::ED_operator_object_active_editable_mesh(), geometry_extract_poll(), blender::Object::mode, blender::OB_MODE_SCULPT, blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by geometry_extract_poll(), SCULPT_OT_face_set_extract(), SCULPT_OT_paint_mask_extract(), and SCULPT_OT_paint_mask_slice().
|
static |
Definition at line 284 of file sculpt_mask_extract.cc.
References geometry_extract_props(), INT_MAX, blender::RNA_def_boolean(), and blender::RNA_def_int().
Referenced by geometry_extract_props(), SCULPT_OT_face_set_extract(), and SCULPT_OT_paint_mask_extract().
|
static |
Definition at line 235 of file sculpt_mask_extract.cc.
References blender::ed::sculpt_paint::GeometryExtractParams::active_face_set, blender::bm, blender::BM_EDGE, BM_ELEM_CD_GET_INT, BM_elem_flag_set, blender::BM_ELEM_TAG, blender::BM_FACE, blender::BM_FACES_OF_MESH, BM_ITER_MESH, blender::BM_mesh_elem_hflag_disable_all(), blender::BM_VERT, blender::CD_PROP_INT32, blender::CustomData_get_offset_named(), geometry_extract_tag_face_set(), and blender::BMesh::pdata.
Referenced by face_set_extract_invoke(), and geometry_extract_tag_face_set().
|
static |
Definition at line 206 of file sculpt_mask_extract.cc.
References blender::bm, blender::BM_EDGE, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_set, BM_elem_flag_test_bool, blender::BM_ELEM_HIDDEN, blender::BM_ELEM_TAG, blender::BM_FACE, blender::BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, blender::BM_mesh_elem_hflag_disable_all(), blender::BM_VERT, blender::BM_VERTS_OF_FACE, blender::CD_PROP_FLOAT, blender::CustomData_get_offset_named(), geometry_extract_tag_masked_faces(), blender::ed::sculpt_paint::GeometryExtractParams::mask_threshold, blender::v, and blender::BMesh::vdata.
Referenced by geometry_extract_tag_masked_faces(), and paint_mask_extract_exec().
|
static |
Definition at line 206 of file mesh/paint_cursor.cc.
References blender::BRUSH_GRAB_ACTIVE_VERTEX, blender::SculptSession::deform_modifiers_active, geometry_preview_lines_draw(), blender::GPU_DEPTH_LESS_EQUAL, blender::GPU_DEPTH_NONE, blender::GPU_depth_test(), blender::GPU_depth_test_get(), blender::GPU_line_width(), blender::GPU_PRIM_LINES, blender::immBegin(), blender::immEnd(), blender::immUniformColor4f(), blender::immVertex3fv(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), blender::SculptSession::preview_verts, blender::Array< T, InlineBufferCapacity, Allocator >::size(), and vert_positions_for_grab_active_get().
Referenced by geometry_preview_lines_draw(), mesh_cursor_active_draw(), and object_space_overlays_draw().
| void blender::ed::sculpt_paint::geometry_preview_lines_update | ( | Depsgraph & | depsgraph, |
| Object & | object, | ||
| SculptSession & | ss, | ||
| float | radius ) |
Definition at line 232 of file grab.cc.
References blender::SculptSession::active_vert(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_sculptsession_update_for_edit(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::data, blender::SculptSession::deform_modifiers_active, blender::math::distance_squared(), blender::bke::Face, geometry_preview_lines_update(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), blender::SculptSession::preview_verts, blender::SculptSession::shapekey_active, blender::Span< T >::size(), vert_neighbors_get_mesh(), and blender::bke::pbvh::vert_positions_eval().
Referenced by geometry_preview_lines_update(), and object_space_overlays_draw().
|
static |
Definition at line 534 of file mesh/paint_cursor.cc.
References blender::SculptSession::active_vert(), blender::SculptSession::active_vert_position(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_GRAB_ACTIVE_VERTEX, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, get_active_vertex_position(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ViewContext::obact, blender::bke::object::pbvh_get(), blender::Sculpt, blender::SCULPT_BRUSH_TYPE_GRAB, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::ed::sculpt_paint::PaintCursorContext::vc, and vert_positions_for_grab_active_get().
Referenced by get_active_vertex_position(), and screen_space_overlays_draw().
|
static |
Definition at line 677 of file brush_asset_ops.cc.
References BLI_assert_unreachable, C, blender::CTX_wm_reports(), blender::ed::asset::find_asset_from_weak_ref(), get_asset_library_reference(), and ID_IS_ASSET.
Referenced by brush_asset_revert_poll(), brush_asset_save_poll(), and get_asset_library_reference().
|
static |
Definition at line 1374 of file draw_ops.cc.
References blender::BLI_assert(), blender::VArray< T >::from_std_func(), get_fill_boundary_layers(), blender::GP_FILL_GPLMODE_ABOVE, blender::GP_FILL_GPLMODE_ACTIVE, blender::GP_FILL_GPLMODE_ALL_ABOVE, blender::GP_FILL_GPLMODE_ALL_BELOW, blender::GP_FILL_GPLMODE_BELOW, blender::GP_FILL_GPLMODE_VISIBLE, and blender::IndexRange::size().
Referenced by get_fill_boundary_layers(), and grease_pencil_apply_fill().
|
static |
Definition at line 104 of file draw_ops.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), BLI_assert_unreachable, C, blender::Erase, get_stroke_operation(), blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPAINT_BRUSH_TYPE_ERASE, blender::GPAINT_BRUSH_TYPE_FILL, blender::GPAINT_BRUSH_TYPE_TINT, blender::GPencil, blender::GPSCULPT_BRUSH_TYPE_CLONE, blender::GPSCULPT_BRUSH_TYPE_GRAB, blender::GPSCULPT_BRUSH_TYPE_PINCH, blender::GPSCULPT_BRUSH_TYPE_PUSH, blender::GPSCULPT_BRUSH_TYPE_RANDOMIZE, blender::GPSCULPT_BRUSH_TYPE_SMOOTH, blender::GPSCULPT_BRUSH_TYPE_STRENGTH, blender::GPSCULPT_BRUSH_TYPE_THICKNESS, blender::GPSCULPT_BRUSH_TYPE_TWIST, blender::GPVERTEX_BRUSH_TYPE_AVERAGE, blender::GPVERTEX_BRUSH_TYPE_BLUR, blender::GPVERTEX_BRUSH_TYPE_DRAW, blender::GPVERTEX_BRUSH_TYPE_REPLACE, blender::GPVERTEX_BRUSH_TYPE_SMEAR, blender::GPVERTEX_BRUSH_TYPE_TINT, blender::GPWEIGHT_BRUSH_TYPE_AVERAGE, blender::GPWEIGHT_BRUSH_TYPE_BLUR, blender::GPWEIGHT_BRUSH_TYPE_DRAW, blender::GPWEIGHT_BRUSH_TYPE_SMEAR, blender::ed::sculpt_paint::greasepencil::new_clone_operation(), blender::ed::sculpt_paint::greasepencil::new_erase_operation(), blender::ed::sculpt_paint::greasepencil::new_grab_operation(), blender::ed::sculpt_paint::greasepencil::new_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_pinch_operation(), blender::ed::sculpt_paint::greasepencil::new_push_operation(), blender::ed::sculpt_paint::greasepencil::new_randomize_operation(), blender::ed::sculpt_paint::greasepencil::new_smooth_operation(), blender::ed::sculpt_paint::greasepencil::new_strength_operation(), blender::ed::sculpt_paint::greasepencil::new_thickness_operation(), blender::ed::sculpt_paint::greasepencil::new_tint_operation(), blender::ed::sculpt_paint::greasepencil::new_twist_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_average_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_replace_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_smear_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_average_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_draw_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_smear_operation(), blender::wmOperator::ptr, blender::RNA_enum_get(), blender::SculptGPencil, blender::Smooth, blender::VertexGPencil, and blender::WeightGPencil.
Referenced by get_stroke_operation(), and blender::ed::sculpt_paint::GreasePencilPaintStroke::update_step().
| Vector< float4x4 > blender::ed::sculpt_paint::get_symmetry_brush_transforms | ( | const eCurvesSymmetryType | symmetry | ) |
Definition at line 311 of file sculpt_brush.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::CURVES_SYMMETRY_X, blender::CURVES_SYMMETRY_Y, blender::CURVES_SYMMETRY_Z, get_symmetry_brush_transforms(), blender::MatBase< float, 4, 4 >::identity(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::x, y, and z().
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::comb_projected_with_symmetry(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), blender::ed::sculpt_paint::CutOperationExecutor::cut_curves(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected_with_symmetry(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected_with_symmetry(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::CutOperationExecutor::find_projected_points_in_stroke_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CutOperationExecutor::find_spherical_points_in_stroke_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), get_symmetry_brush_transforms(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical_with_symmetry(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry().
|
static |
Definition at line 5267 of file sculpt.cc.
References blender::CD_MDEFORMVERT, blender::CustomData_get_layer_index(), and get_vertex_group_sharing_info().
Referenced by get_vertex_group_sharing_info(), and store_mesh_from_eval().
| ePaintSymmetryAreas blender::ed::sculpt_paint::get_vertex_symm_area | ( | const float | co[3] | ) |
Definition at line 2979 of file sculpt.cc.
References get_vertex_symm_area(), PAINT_SYMM_AREA_DEFAULT, blender::PAINT_SYMM_AREA_X, blender::PAINT_SYMM_AREA_Y, and blender::PAINT_SYMM_AREA_Z.
Referenced by blender::ed::sculpt_paint::pose::calc_segment_translations(), calc_symm_area_transform_translations(), get_vertex_symm_area(), and transform_radius_elastic().
| float3 blender::ed::sculpt_paint::grab_delta_get | ( | const Brush & | brush, |
| const StrokeCache & | cache ) |
Definition at line 718 of file sculpt.cc.
References grab_delta_get(), blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::StrokeToggleSettings::invert, blender::bke::brush::normal_weight_get(), sculpt_project_v3_normal_align(), and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), blender::ed::sculpt_paint::brushes::do_snake_hook_brush(), and grab_delta_get().
|
static |
Definition at line 1627 of file draw_ops.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::blender::IndexRange::after(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_brush_tag_unsaved_changes(), blender::BKE_paint_brush(), blender::BKE_report(), blender::BLI_rcti_isect_pt_v(), C, blender::ed::greasepencil::calculate_texture_space(), blender::bke::AttributeAccessor::contains(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::bke::Curve, blender::bke::curves_new_nomain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::wmOperator::customdata, blender::data, blender::ED_view3d_viewcontext_init(), ensure_editable_drawings(), blender::bke::SpanAttributeWriter< T >::finish(), blender::ed::greasepencil::FitToView, blender::bke::GeometrySet::from_curves(), blender::bke::GeometrySet::get_curves_for_write(), get_fill_boundary_layers(), blender::GP_BRUSH_FILL_AUTO_REMOVE_FILL_GUIDES, blender::GP_BRUSH_FILL_HIDE, blender::GP_BRUSH_FILL_INTERNAL_GAPS, blender::GP_FILL_SOLVER_DELAUNAY, blender::ToolSettings::gp_paint, blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::ToolSettings::gpencil_flags, grease_pencil_apply_fill(), grease_pencil_fill_get_extension_data(), blender::GroupedSpan< T >::GroupedSpan(), blender::bke::GeometrySet::has_curves(), blender::IndexRange::IndexRange(), blender::bke::CurvesGeometry::is_empty(), blender::geometry::join_geometries(), layer, blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::wmEvent::mval, blender::GpPaint::paint, blender::ed::greasepencil::remove_fill_guides(), blender::wmOperator::reports, blender::RPT_ERROR, set_fill_attributes(), simplify_fixed(), smooth_fill_strokes(), blender::ViewContext::v3d, blender::ARegion::winrct, blender::WM_cursor_modal_restore(), and blender::wmEvent::xy.
Referenced by grease_pencil_apply_fill(), grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().
|
static |
Definition at line 341 of file draw_ops.cc.
References C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::wmOperator::customdata, and grease_pencil_brush_stroke_cancel().
Referenced by grease_pencil_brush_stroke_cancel(), and GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 278 of file draw_ops.cc.
References C, blender::wmOperator::customdata, blender::ed::sculpt_paint::PaintStroke::exec(), blender::GPencil, grease_pencil_brush_stroke_exec(), blender::ed::greasepencil::grease_pencil_draw_operator_begin(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, and use_duplicate_previous_key().
Referenced by grease_pencil_brush_stroke_exec(), and GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 297 of file draw_ops.cc.
References blender::wmTabletData::active, C, blender::wmOperator::customdata, blender::Erase, blender::EVT_TABLET_ERASER, blender::GPencil, grease_pencil_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_draw_operator_begin(), blender::wmOperatorType::modal, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::ptr, blender::RNA_enum_set(), blender::wmEvent::tablet, blender::wmOperator::type, use_duplicate_previous_key(), and blender::WM_event_add_modal_handler().
Referenced by grease_pencil_brush_stroke_invoke(), and GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 327 of file draw_ops.cc.
References C, blender::wmOperator::customdata, ELEM, grease_pencil_brush_stroke_modal(), blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, and blender::OPERATOR_FINISHED.
Referenced by grease_pencil_brush_stroke_modal(), and GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 244 of file draw_ops.cc.
References C, grease_pencil_brush_stroke_poll(), blender::ed::greasepencil::grease_pencil_painting_poll(), and blender::WM_toolsystem_active_tool_is_brush().
Referenced by grease_pencil_brush_stroke_poll(), and GREASE_PENCIL_OT_brush_stroke().
| void blender::ed::sculpt_paint::grease_pencil_cursor_draw | ( | PaintCursorContext & | pcontext | ) |
Definition at line 77 of file grease_pencil/paint_cursor.cc.
References blender::BKE_brush_color_get(), blender::BKE_brush_radius_get(), blender::BKE_brush_size_set(), blender::BKE_brush_unprojected_radius_get(), blender::BKE_grease_pencil_object_material_from_brush_get(), blender::BLI_rcti_isect_pt(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_LOCK_SIZE, blender::BRUSH_SMOOTH_STROKE, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::ToolSettings::gp_paint, blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPAINT_BRUSH_TYPE_ERASE, blender::GPAINT_BRUSH_TYPE_FILL, blender::GPAINT_BRUSH_TYPE_TINT, blender::GPencil, blender::GPU_line_width(), grease_pencil_cursor_draw(), grease_pencil_eraser_draw(), blender::IMB_colormanagement_scene_linear_to_srgb_v3(), blender::imm_draw_circle_wire_2d(), blender::immUniformColor4f(), layer, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::OB_GREASE_PENCIL, blender::ed::sculpt_paint::PaintCursorContext::object, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::greasepencil::DrawingPlacement::project(), project_brush_radius_grease_pencil(), blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::MaterialGPencilStyle::stroke_rgba, blender::ed::greasepencil::DrawingPlacement::to_world_space(), blender::Scene::toolsettings, blender::math::transform_point(), blender::ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::VertexGPencil, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by grease_pencil_cursor_draw(), and paint_draw_2D_view_brush_cursor().
|
static |
Definition at line 2346 of file draw_ops.cc.
References C, blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::DEG_get_evaluated(), ensure_drawing_for_autokey(), grease_pencil_erase_box_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Bounds< T >::is_empty(), blender::OPERATOR_FINISHED, blender::threading::parallel_for(), blender::ed::greasepencil::retrieve_editable_drawings(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::WM_operator_properties_border_to_bounds().
Referenced by grease_pencil_erase_box_exec(), and GREASE_PENCIL_OT_erase_box().
|
static |
Definition at line 2234 of file draw_ops.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), C, blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::DEG_get_evaluated(), ensure_drawing_for_autokey(), grease_pencil_erase_lasso_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Bounds< T >::max, blender::Bounds< T >::min, blender::bounds::min_max(), blender::OPERATOR_FINISHED, blender::threading::parallel_for(), blender::ed::greasepencil::retrieve_editable_drawings(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::WM_gesture_lasso_path_to_array().
Referenced by grease_pencil_erase_lasso_exec(), and GREASE_PENCIL_OT_erase_lasso().
|
static |
Definition at line 50 of file grease_pencil/paint_cursor.cc.
References float, blender::GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, blender::GPU_viewport_size_get_f(), grease_pencil_eraser_draw(), blender::imm_draw_circle_fill_2d(), blender::imm_draw_circle_wire_2d(), blender::immBindBuiltinProgram(), blender::immUnbindProgram(), blender::immUniform1f(), blender::immUniform1i(), blender::immUniform2f(), blender::immUniformColor4f(), blender::immUniformColor4ub(), blender::max_ii(), blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by grease_pencil_cursor_draw(), and grease_pencil_eraser_draw().
|
static |
Definition at line 2132 of file draw_ops.cc.
References C, grease_pencil_fill_cancel(), and grease_pencil_fill_exit().
Referenced by grease_pencil_fill_cancel(), and GREASE_PENCIL_OT_fill().
|
static |
Definition at line 1957 of file draw_ops.cc.
References BLI_assert_unreachable, C, Cancel, Confirm, blender::CTX_wm_window(), blender::wmOperator::customdata, blender::math::distance(), ExtensionCollide, ExtensionDrag, ExtensionLengthen, ExtensionModeToggle, ExtensionShorten, blender::GP_FILL_EMODE_EXTEND, blender::GP_FILL_EMODE_RADIUS, grease_pencil_apply_fill(), grease_pencil_fill_event_modal_map(), grease_pencil_update_extend(), Invert, blender::KM_PRESS, blender::KM_RELEASE, blender::wmEvent::mval, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, Precision, blender::wmEvent::val, blender::WM_CURSOR_EW_ARROW, blender::WM_cursor_modal_set(), blender::WM_CURSOR_PAINT_BRUSH, blender::WM_cursor_set(), blender::WM_event_add_notifier(), and blender::WM_main_add_notifier().
Referenced by grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().
|
static |
Definition at line 1870 of file draw_ops.cc.
References C, blender::CTX_data_active_object(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::Object::data, blender::DEG_id_tag_update(), blender::ED_region_draw_cb_exit(), blender::ED_workspace_status_text(), grease_pencil_fill_exit(), blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_TRANSFORM, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, blender::ARegion::runtime, blender::bke::ARegionRuntime::type, blender::WM_cursor_modal_restore(), blender::WM_event_add_notifier(), and blender::WM_main_add_notifier().
Referenced by grease_pencil_fill_cancel(), grease_pencil_fill_exit(), grease_pencil_fill_invoke(), and grease_pencil_fill_modal().
|
static |
Definition at line 771 of file draw_ops.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::BLI_bvhtree_balance(), blender::BLI_bvhtree_free(), blender::BLI_bvhtree_insert(), blender::BLI_bvhtree_new(), blender::BLI_bvhtree_ray_cast(), BLI_SCOPED_DEFER, C, blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::CTX_wm_region_view3d(), blender::data, blender::offset_indices::OffsetIndices< T >::data(), blender::BVHTreeRayHit::dist, blender::math::distance(), blender::ed::greasepencil::DrawingInfo::drawing, blender::IndexRange::drop_back(), ELEM, blender::IndexRange::first(), FLT_MAX, grease_pencil_fill_extension_cut(), blender::BVHTreeRayHit::index, blender::IndexRange::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::math::interpolate(), blender::math::isect_seg_seg(), blender::IndexRange::last(), layer, blender::ed::greasepencil::DrawingInfo::layer_index, length(), blender::ed::greasepencil::ExtensionData::lines, blender::BVHTreeRayHit::no, blender::math::normalize_and_get_length(), blender::result, blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::greasepencil::Drawing::strokes(), blender::math::transform_point(), and blender::RegionView3D::viewmat.
Referenced by grease_pencil_fill_extension_cut(), and grease_pencil_fill_get_extension_data().
|
static |
Definition at line 940 of file draw_ops.cc.
References blender::IndexRange::after(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::math::average(), BLI_assert_unreachable, C, blender::ed::greasepencil::ExtensionData::circles, blender::IndexRange::contains(), blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::CTX_wm_region_view3d(), blender::data, blender::array_utils::gather(), grease_pencil_fill_extension_lines_from_circles(), blender::IndexRange::index_range(), blender::IndexRange::IndexRange(), blender::kdtree_balance(), blender::kdtree_free(), blender::kdtree_insert(), blender::kdtree_new(), blender::kdtree_range_search_cb(), blender::ed::greasepencil::ExtensionData::lines, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::math::to_scale(), blender::math::transform_point(), UNUSED_VARS, and blender::RegionView3D::viewmat.
Referenced by grease_pencil_fill_extension_lines_from_circles(), and grease_pencil_fill_get_extension_data().
|
static |
Definition at line 1051 of file draw_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), C, blender::ed::greasepencil::ExtensionData::circles, blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::data, blender::ed::greasepencil::DrawingInfo::drawing, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_cut, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_length, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_mode, blender::IndexRange::first(), blender::GP_FILL_EMODE_EXTEND, blender::GP_FILL_EMODE_RADIUS, grease_pencil_fill_extension_cut(), grease_pencil_fill_extension_lines_from_circles(), grease_pencil_fill_get_extension_data(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::last(), blender::ed::greasepencil::DrawingInfo::layer_index, length(), blender::ed::greasepencil::ExtensionData::lines, blender::math::normalize(), blender::math::normalize_and_get_length(), blender::bke::greasepencil::Drawing::radii(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::bke::greasepencil::Drawing::strokes(), and blender::math::transform_point().
Referenced by grease_pencil_apply_fill(), grease_pencil_fill_get_extension_data(), and grease_pencil_fill_overlay_pixel_cb().
|
static |
Definition at line 1822 of file draw_ops.cc.
References blender::BKE_brush_init_gpencil_settings(), blender::BKE_curvemapping_init(), blender::BKE_grease_pencil_object_material_ensure_from_brush(), blender::BKE_object_material_index_get(), blender::BKE_paint_brush(), blender::BKE_report(), C, blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::wmOperator::customdata, blender::Object::data, blender::ed::sculpt_paint::GreasePencilFillOpData::from_context(), blender::ToolSettings::gp_paint, grease_pencil_fill_init(), invert(), layer, blender::GpPaint::paint, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RPT_WARNING, and blender::Scene::toolsettings.
Referenced by grease_pencil_fill_init(), and grease_pencil_fill_invoke().
|
static |
Definition at line 1899 of file draw_ops.cc.
References blender::Object::actcol, blender::BKE_object_material_get(), blender::BKE_paint_brush(), blender::BKE_report(), C, blender::ed::greasepencil::check_brush_needs_new_material(), blender::CTX_data_active_object(), blender::CTX_data_tool_settings(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::Object::data, blender::DEG_id_tag_update(), blender::GP_BRUSH_MATERIAL_PINNED, blender::ToolSettings::gp_paint, grease_pencil_fill_exit(), grease_pencil_fill_init(), grease_pencil_fill_invoke(), grease_pencil_fill_status_indicators(), grease_pencil_fill_update_overlay(), blender::Object::id, ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_TRANSFORM, NA_EDITED, NC_GPENCIL, blender::OPERATOR_CANCELLED, blender::OPERATOR_RUNNING_MODAL, blender::GpPaint::paint, blender::wmOperator::reports, blender::RPT_ERROR, blender::WM_cursor_modal_set(), blender::WM_CURSOR_PAINT_BRUSH, blender::WM_event_add_modal_handler(), and blender::WM_event_add_notifier().
Referenced by grease_pencil_fill_invoke(), and GREASE_PENCIL_OT_fill().
|
static |
Definition at line 2047 of file draw_ops.cc.
References C, blender::CTX_data_active_object(), blender::CTX_wm_region_view3d(), blender::wmOperator::customdata, blender::math::distance(), blender::ED_view3d_pixel_size(), blender::EVT_MODAL_MAP, grease_pencil_apply_fill(), grease_pencil_fill_event_modal_map(), grease_pencil_fill_exit(), grease_pencil_fill_modal(), grease_pencil_update_extend(), blender::KM_RELEASE, blender::LEFTMOUSE, blender::Object::loc, blender::MOUSEMOVE, blender::wmEvent::mval, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, blender::wmEvent::type, blender::wmEvent::val, blender::WM_event_add_notifier(), and blender::WM_main_add_notifier().
Referenced by grease_pencil_fill_modal(), and GREASE_PENCIL_OT_fill().
|
static |
Definition at line 1334 of file draw_ops.cc.
References C, grease_pencil_fill_overlay_cb(), grease_pencil_fill_overlay_delaunay_cb(), and grease_pencil_fill_overlay_pixel_cb().
Referenced by grease_pencil_fill_overlay_cb(), and grease_pencil_fill_update_overlay().
|
static |
Definition at line 1283 of file draw_ops.cc.
References blender::BKE_brush_color_get(), blender::BKE_grease_pencil_object_material_ensure_from_brush(), blender::BKE_paint_brush(), blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), C, blender::ed::greasepencil::image_render::clear_view_matrix(), blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_tool_settings(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::CTX_wm_view3d(), blender::ToolSettings::gp_paint, grease_pencil_fill_overlay_delaunay_cb(), blender::ed::sculpt_paint::GreasePencilFillOpData::mouse_positions, blender::GpPaint::paint, blender::threading::parallel_for(), and blender::RegionView3D::viewmat.
Referenced by grease_pencil_fill_overlay_cb(), and grease_pencil_fill_overlay_delaunay_cb().
|
static |
Definition at line 1203 of file draw_ops.cc.
References C, blender::ed::greasepencil::ExtensionData::circles, blender::ed::greasepencil::image_render::clear_view_matrix(), blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::data, blender::ed::greasepencil::image_render::draw_circles(), blender::ed::greasepencil::image_render::draw_grease_pencil_strokes(), blender::ed::greasepencil::image_render::draw_lines(), blender::VArray< T >::from_single(), blender::VArray< T >::from_span(), grease_pencil_fill_get_extension_data(), grease_pencil_fill_overlay_pixel_cb(), blender::IndexRange::is_empty(), blender::ed::greasepencil::ExtensionData::lines, blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::sculpt_paint::GreasePencilFillOpData::show_boundaries, blender::ed::sculpt_paint::GreasePencilFillOpData::show_extension, blender::IndexRange::size(), blender::RegionView3D::viewmat, blender::ARegion::winx, and blender::ARegion::winy.
Referenced by grease_pencil_fill_overlay_cb(), and grease_pencil_fill_overlay_pixel_cb().
|
static |
Definition at line 1180 of file draw_ops.cc.
References C, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_cut, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_length, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_mode, blender::GP_FILL_EMODE_EXTEND, grease_pencil_fill_status_indicators(), IFACE_, blender::ed::sculpt_paint::GreasePencilFillOpData::is_delaunay_method, blender::WorkspaceStatus::item(), and blender::WorkspaceStatus::item_bool().
Referenced by grease_pencil_fill_invoke(), grease_pencil_fill_status_indicators(), and grease_pencil_update_extend().
|
static |
Definition at line 1346 of file draw_ops.cc.
References blender::ED_region_draw_cb_activate(), blender::ED_region_draw_cb_exit(), grease_pencil_fill_overlay_cb(), grease_pencil_fill_update_overlay(), blender::ed::sculpt_paint::GreasePencilFillOpData::is_delaunay_method, blender::ed::sculpt_paint::GreasePencilFillOpData::overlay_cb_handle, REGION_DRAW_POST_VIEW, blender::ARegion::runtime, blender::ed::sculpt_paint::GreasePencilFillOpData::show_boundaries, blender::ed::sculpt_paint::GreasePencilFillOpData::show_extension, and blender::bke::ARegionRuntime::type.
Referenced by grease_pencil_fill_invoke(), grease_pencil_fill_update_overlay(), and grease_pencil_update_extend().
|
static |
Definition at line 347 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, grease_pencil_brush_stroke_cancel(), grease_pencil_brush_stroke_exec(), grease_pencil_brush_stroke_invoke(), grease_pencil_brush_stroke_modal(), grease_pencil_brush_stroke_poll(), GREASE_PENCIL_OT_brush_stroke(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_UNDO, blender::paint_stroke_operator_properties(), and blender::wmOperatorType::poll.
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 2407 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, grease_pencil_erase_box_exec(), GREASE_PENCIL_OT_erase_box(), blender::ed::greasepencil::grease_pencil_painting_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::WM_gesture_box_cancel(), blender::WM_gesture_box_invoke(), blender::WM_gesture_box_modal(), and blender::WM_operator_properties_border().
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_erase_box().
|
static |
Definition at line 2329 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, grease_pencil_erase_lasso_exec(), GREASE_PENCIL_OT_erase_lasso(), blender::ed::greasepencil::grease_pencil_painting_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::WM_gesture_lasso_cancel(), blender::WM_gesture_lasso_invoke(), blender::WM_gesture_lasso_modal(), and blender::WM_operator_properties_gesture_lasso().
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_erase_lasso().
|
static |
Definition at line 2137 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::flag, grease_pencil_fill_cancel(), grease_pencil_fill_invoke(), grease_pencil_fill_modal(), GREASE_PENCIL_OT_fill(), blender::ed::greasepencil::grease_pencil_painting_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::PROP_SKIP_SAVE, blender::RNA_def_boolean(), blender::RNA_def_property_flag(), and blender::wmOperatorType::srna.
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_fill().
|
static |
Definition at line 464 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::flag, GREASE_PENCIL_OT_sculpt_paint(), grease_pencil_sculpt_paint_cancel(), grease_pencil_sculpt_paint_invoke(), grease_pencil_sculpt_paint_modal(), grease_pencil_sculpt_paint_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::paint_stroke_operator_properties(), and blender::wmOperatorType::poll.
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_sculpt_paint().
|
static |
Definition at line 673 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::flag, GREASE_PENCIL_OT_vertex_brush_stroke(), grease_pencil_vertex_brush_stroke_cancel(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_vertex_brush_stroke_modal(), grease_pencil_vertex_brush_stroke_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::paint_stroke_operator_properties(), and blender::wmOperatorType::poll.
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_vertex_brush_stroke().
|
static |
Definition at line 563 of file draw_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::flag, GREASE_PENCIL_OT_weight_brush_stroke(), grease_pencil_weight_brush_stroke_cancel(), grease_pencil_weight_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_modal(), grease_pencil_weight_brush_stroke_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::paint_stroke_operator_properties(), and blender::wmOperatorType::poll.
Referenced by blender::ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_weight_brush_stroke().
|
static |
Definition at line 458 of file draw_ops.cc.
References C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::wmOperator::customdata, and grease_pencil_sculpt_paint_cancel().
Referenced by GREASE_PENCIL_OT_sculpt_paint(), and grease_pencil_sculpt_paint_cancel().
|
static |
Definition at line 383 of file draw_ops.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), C, blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::wmOperator::customdata, blender::ed::greasepencil::ensure_active_keyframe(), grease_pencil_sculpt_paint_invoke(), blender::ed::greasepencil::has_editable_layer(), layer, blender::wmOperatorType::modal, NA_EDITED, NC_GPENCIL, blender::OB_GREASE_PENCIL, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::reports, blender::RPT_ERROR, blender::SculptGPencil, blender::wmOperator::type, use_duplicate_previous_key(), blender::WM_event_add_modal_handler(), and blender::WM_event_add_notifier().
Referenced by GREASE_PENCIL_OT_sculpt_paint(), and grease_pencil_sculpt_paint_invoke().
|
static |
Definition at line 443 of file draw_ops.cc.
References C, blender::wmOperator::customdata, ELEM, grease_pencil_sculpt_paint_modal(), blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, and blender::OPERATOR_FINISHED.
Referenced by GREASE_PENCIL_OT_sculpt_paint(), and grease_pencil_sculpt_paint_modal().
|
static |
Definition at line 372 of file draw_ops.cc.
References C, grease_pencil_sculpt_paint_poll(), blender::ed::greasepencil::grease_pencil_sculpting_poll(), and blender::WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_sculpt_paint(), and grease_pencil_sculpt_paint_poll().
|
static |
Definition at line 1366 of file draw_ops.cc.
References C, blender::CTX_wm_region(), grease_pencil_fill_status_indicators(), grease_pencil_fill_update_overlay(), grease_pencil_update_extend(), NA_EDITED, NC_GPENCIL, and blender::WM_event_add_notifier().
Referenced by grease_pencil_fill_event_modal_map(), grease_pencil_fill_modal(), and grease_pencil_update_extend().
|
static |
Definition at line 667 of file draw_ops.cc.
References C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::wmOperator::customdata, and grease_pencil_vertex_brush_stroke_cancel().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke(), and grease_pencil_vertex_brush_stroke_cancel().
|
static |
Definition at line 596 of file draw_ops.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), C, blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::wmOperator::customdata, blender::ed::greasepencil::ensure_active_keyframe(), grease_pencil_vertex_brush_stroke_invoke(), blender::ed::greasepencil::has_editable_layer(), layer, blender::wmOperatorType::modal, NA_EDITED, NC_GPENCIL, blender::OB_GREASE_PENCIL, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::reports, blender::RPT_ERROR, blender::wmOperator::type, use_duplicate_previous_key(), blender::VertexGPencil, blender::WM_event_add_modal_handler(), and blender::WM_event_add_notifier().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke(), and grease_pencil_vertex_brush_stroke_invoke().
|
static |
Definition at line 653 of file draw_ops.cc.
References C, blender::wmOperator::customdata, ELEM, grease_pencil_vertex_brush_stroke_modal(), blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, and blender::OPERATOR_FINISHED.
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke(), and grease_pencil_vertex_brush_stroke_modal().
|
static |
Definition at line 585 of file draw_ops.cc.
References C, grease_pencil_vertex_brush_stroke_poll(), blender::ed::greasepencil::grease_pencil_vertex_painting_poll(), and blender::WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke(), and grease_pencil_vertex_brush_stroke_poll().
|
static |
Definition at line 557 of file draw_ops.cc.
References C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::wmOperator::customdata, and grease_pencil_weight_brush_stroke_cancel().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke(), and grease_pencil_weight_brush_stroke_cancel().
|
static |
Definition at line 497 of file draw_ops.cc.
References blender::BKE_object_defgroup_active_index_get(), blender::BKE_object_defgroup_active_is_locked(), blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), C, blender::CTX_data_active_object(), blender::CTX_data_scene(), blender::wmOperator::customdata, grease_pencil_weight_brush_stroke_invoke(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::wmOperatorType::modal, blender::OB_GREASE_PENCIL, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::reports, blender::ed::greasepencil::retrieve_editable_drawings(), blender::RPT_ERROR, blender::RPT_WARNING, blender::wmOperator::type, blender::WeightGPencil, and blender::WM_event_add_modal_handler().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke(), and grease_pencil_weight_brush_stroke_invoke().
|
static |
Definition at line 543 of file draw_ops.cc.
References C, blender::wmOperator::customdata, ELEM, grease_pencil_weight_brush_stroke_modal(), blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, and blender::OPERATOR_FINISHED.
Referenced by GREASE_PENCIL_OT_weight_brush_stroke(), and grease_pencil_weight_brush_stroke_modal().
|
static |
Definition at line 486 of file draw_ops.cc.
References C, grease_pencil_weight_brush_stroke_poll(), blender::ed::greasepencil::grease_pencil_weight_painting_poll(), and blender::WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke(), and grease_pencil_weight_brush_stroke_poll().
|
static |
Definition at line 116 of file paint_sample_color.cc.
References blender::bke::mesh_surface_sample::compute_bary_coord_in_triangle(), blender::ViewContext::depsgraph, blender::ED_view3d_win_to_segment_clipped(), imapaint_pick_face(), blender::math::normalize(), blender::ViewContext::obact, blender::bke::bvh::Tree::ray_intersect(), blender::ViewContext::region, blender::math::transform_point(), and blender::ViewContext::v3d.
Referenced by imapaint_pick_face(), and sample_texture_paint_color().
|
static |
Definition at line 79 of file paint_sample_color.cc.
References bary_coord, blender::BKE_object_material_get(), blender::bke::Corner, blender::bke::Face, blender::ToolSettings::imapaint, imapaint_pick_uv(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::ImagePaintSettings::mode, blender::PAINT_CANVAS_SOURCE_MATERIAL, blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), blender::Scene::toolsettings, and blender::TexPaintSlot::uvname.
Referenced by imapaint_pick_uv(), and sample_texture_paint_color().
|
static |
Definition at line 442 of file mesh/paint_cursor.cc.
References blender::BKE_brush_alpha_get(), blender::BKE_brush_has_cube_tip(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::GPU_line_width(), blender::gpu::imm_draw_rounded_box_wire_3d(), blender::immUniformColor3fvAlpha(), inactive_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::Brush::tip_roundness, blender::Brush::tip_scale_x, and blender::ed::sculpt_paint::PaintCursorContext::translation.
Referenced by inactive_cursor_draw(), and mesh_cursor_inactive_draw().
|
static |
Definition at line 4029 of file sculpt.cc.
References blender::BKE_base_is_visible(), blender::BKE_object_get_evaluated_mesh(), blender::BKE_view_layer_object_bases_get(), blender::DEG_get_evaluated(), blender::Mesh::faces_num, init_scene_project_brush_targets(), blender::OB_MESH, and blender::ed::sculpt_paint::StrokeCache::project_targets.
Referenced by init_scene_project_brush_targets(), and stroke_cache_update().
|
static |
Definition at line 62 of file mesh_paint.cc.
References blender::BKE_scene_graph_evaluated_ensure(), blender::BKE_sculptsession_update_for_edit(), blender::BLI_assert(), blender::DEG_id_tag_update(), ensure_valid_pivot(), blender::Object::id, blender::ID_RECALC_GEOMETRY, init_session(), blender::SculptSession::mode_type, blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by init_session(), and mode_enter_generic().
| void blender::ed::sculpt_paint::init_transform | ( | bContext * | C, |
| Object & | ob, | ||
| const float | mval_fl[2], | ||
| const char * | undo_name ) |
Definition at line 56 of file sculpt_transform.cc.
References blender::BKE_sculptsession_update_for_edit(), C, blender::ed::sculpt_paint::filter::cache_init(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::SculptSession::filter_cache, Incremental, blender::SculptSession::init_pivot_pos, blender::SculptSession::init_pivot_rot, blender::SculptSession::init_pivot_scale, init_transform(), Original, blender::SculptSession::pivot_pos, blender::SculptSession::pivot_rot, blender::SculptSession::pivot_scale, blender::ed::sculpt_paint::undo::Position, blender::SculptSession::prev_pivot_pos, blender::SculptSession::prev_pivot_rot, blender::SculptSession::prev_pivot_scale, blender::ed::sculpt_paint::undo::push_begin_ex(), blender::Object::runtime, blender::SCE_XFORM_SCULPT_PIVOT, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, blender::ToolSettings::transform_flag, blender::Sculpt::transform_mode, and vert_random_access_ensure().
Referenced by blender::ed::transform::createTransSculpt(), and init_transform().
|
static |
While most non-brush tools in sculpt mode do not use the brush cursor, the trim tools and the filter tools are expected to have the cursor visible so that some functionality is easier to visually estimate.
See: #122856
Definition at line 3823 of file sculpt.cc.
References blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), C, blender::CTX_data_active_object(), blender::CTX_wm_area(), blender::CTX_wm_region(), ELEM, is_brush_related_tool(), blender::bToolRef_Runtime::keymap, blender::ARegion::regiontype, blender::RGN_TYPE_WINDOW, blender::bToolRef::runtime, blender::ScrArea::runtime, blender::SPACE_IMAGE, blender::SPACE_VIEW3D, blender::ScrArea::spacetype, blender::ScrArea_Runtime::tool, and blender::WM_operatortype_find().
Referenced by brush_cursor_poll(), and is_brush_related_tool().
|
static |
Definition at line 147 of file paint_image_2d_curve_mask.cc.
References blender::CurveMaskCache::curve_mask_size, diameter_to_curve_mask_size(), and is_curve_mask_size_valid().
Referenced by is_curve_mask_size_valid(), and blender::paint_curve_mask_cache_update().
|
inlinestatic |
Definition at line 2211 of file draw_ops.cc.
References is_point_inside_bounds().
Referenced by is_point_inside_bounds().
|
inlinestatic |
Definition at line 2228 of file draw_ops.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::data(), is_point_inside_lasso(), blender::isect_point_poly_v2_int(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().
Referenced by is_point_inside_lasso().
|
static |
Definition at line 112 of file paint_image_2d_curve_mask.cc.
References is_sampled_curve_valid(), blender::CurveMaskCache::last_curve_timestamp, and blender::CurveMaskCache::sampled_curve.
Referenced by is_sampled_curve_valid(), and blender::paint_curve_mask_cache_update().
|
inline |
Determines whether a given symmetry pass is valid.
Uses the ePaintSymmetryFlags enum.
symm is a bit combination of XYZ. 1 is X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ
Definition at line 602 of file paint_intern.hh.
References ELEM, and is_symmetry_iteration_valid().
Referenced by blender::ed::sculpt_paint::gesture::apply(), blender::ed::sculpt_paint::auto_mask::cache_init(), calc_symmetry_feather(), do_symmetrical_brush_actions(), do_symmetrical_brush_actions_with_tiling_and_feathering(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), find_all_symm_verts_bmesh(), find_all_symm_verts_grids(), find_all_symm_verts_mesh(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), is_symmetry_iteration_valid(), is_vertex_inside_brush_radius_symm(), point_with_symmetry_draw(), transform_radius_elastic(), and blender::ed::sculpt_paint::pose::vert_inside_brush_radius().
| bool blender::ed::sculpt_paint::is_vertex_inside_brush_radius_symm | ( | const float | vertex[3], |
| const float | br_co[3], | ||
| float | radius, | ||
| char | symm ) |
Checks if a vertex is inside the brush radius from any of its mirrored axis.
Definition at line 878 of file sculpt.cc.
References is_symmetry_iteration_valid(), is_vertex_inside_brush_radius_symm(), blender::len_squared_v3v3(), symmetry_flip(), and vertex.
Referenced by 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(), and is_vertex_inside_brush_radius_symm().
| void blender::ed::sculpt_paint::keymap_sculpt | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1459 of file mesh/sculpt_ops.cc.
References keymap_sculpt(), and blender::ed::sculpt_paint::filter::modal_keymap().
Referenced by blender::ED_spacetypes_keymap(), and keymap_sculpt().
|
static |
Definition at line 750 of file mesh/paint_cursor.cc.
References blender::GPU_line_width(), blender::GPU_matrix_mul(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::MatBase< float, 4, 4 >::identity(), blender::imm_draw_circle_wire_3d(), blender::immUniformColor3fvAlpha(), layer_brush_height_preview_draw(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), and blender::math::translate().
Referenced by cursor_space_overlays_draw(), and layer_brush_height_preview_draw().
|
static |
Definition at line 214 of file paint_cursor.cc.
References blender::BKE_brush_radius_get(), blender::BKE_image_pool_free(), blender::BKE_image_pool_new(), blender::BLI_parallel_range_settings_defaults(), blender::BLI_task_parallel_range(), blender::MTex::brush_map_mode, blender::data, blender::bke::bNodeTreeRuntime::execdata, blender::bke::paint::get_overlay_flags(), blender::GPU_DATA_UBYTE, blender::GPU_texture_create_2d(), blender::GPU_texture_free(), blender::GPU_texture_swizzle_set(), blender::GPU_texture_update(), blender::GPU_TEXTURE_USAGE_ATTACHMENT, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::bke::subdiv::init(), blender::bke::paint::InvalidTexturePrimary, blender::bke::paint::InvalidTextureSecondary, load_tex(), load_tex_task_cb_ex(), make_tex_snap(), blender::Brush::mask_mtex, blender::MEM_new_array_uninitialized(), blender::Brush::mtex, blender::MTEX_MAP_MODE_STENCIL, blender::MTEX_MAP_MODE_VIEW, blender::Tex::nodetree, blender::ntreeTexBeginExecTree(), blender::ntreeTexEndExecTree(), blender::bke::paint::TexSnapshot::old_col, blender::bke::paint::TexSnapshot::old_size, blender::bke::paint::TexSnapshot::overlay_texture, blender::MTex::rot, blender::bNodeTree::runtime, same_tex_snap(), and blender::MTex::tex.
Referenced by load_tex(), and paint_draw_tex_overlay().
Definition at line 369 of file paint_cursor.cc.
References blender::BKE_brush_radius_get(), blender::BKE_curvemapping_init(), blender::BLI_parallel_range_settings_defaults(), blender::BLI_task_parallel_range(), blender::Brush::curve_distance_falloff, blender::Brush::curve_distance_falloff_preset, blender::data, blender::bke::paint::get_overlay_flags(), blender::GPU_DATA_UBYTE, blender::GPU_texture_create_2d(), blender::GPU_texture_free(), blender::GPU_texture_swizzle_set(), blender::GPU_texture_update(), blender::GPU_TEXTURE_USAGE_ATTACHMENT, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::bke::subdiv::init(), blender::bke::paint::InvalidCurve, load_tex_cursor(), load_tex_cursor_task_cb(), and blender::MEM_new_array_uninitialized().
Referenced by load_tex_cursor(), and paint_draw_cursor_overlay().
|
static |
Definition at line 337 of file paint_cursor.cc.
References blender::BKE_brush_curve_strength_clamped(), blender::data, float, len(), load_tex_cursor_task_cb(), sqrtf, blender::x, and y.
Referenced by load_tex_cursor(), and load_tex_cursor_task_cb().
|
static |
Definition at line 112 of file paint_cursor.cc.
References angle(), atan2f, blender::BKE_image_pool_acquire_ibuf(), blender::BKE_image_pool_release_ibuf(), blender::BLI_task_parallel_thread_id(), blender::MTex::brush_map_mode, blender::ImBuf::byte_buffer, CLAMP, blender::clamp_v4(), blender::ImBufByteBuffer::colorspace, cosf, blender::data, ELEM, float, blender::ImBuf::float_data(), blender::Tex::ima, blender::IMB_colormanagement_colorspace_to_scene_linear_v3(), blender::Tex::iuser, len(), blender::linearrgb_to_srgb_v3_v3(), load_tex_task_cb_ex(), blender::MTEX_MAP_MODE_STENCIL, blender::MTEX_MAP_MODE_TILED, blender::paint_get_tex_pixel(), blender::ViewContext::region, sinf, sqrtf, blender::MTex::tex, blender::TEX_IMAGE, blender::Brush::texture_sample_bias, blender::Tex::type, blender::ARegion::winx, blender::ARegion::winy, blender::x, and y.
Referenced by load_tex(), and load_tex_task_cb_ex().
|
static |
Definition at line 720 of file mesh/paint_cursor.cc.
References blender::BKE_brush_alpha_get(), blender::BKE_brush_has_cube_tip(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::GPU_line_width(), blender::gpu::imm_draw_rounded_box_wire_3d(), blender::immUniformColor3fvAlpha(), main_inactive_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::radius, blender::Brush::tip_roundness, and blender::Brush::tip_scale_x.
Referenced by cursor_space_overlays_draw(), and main_inactive_cursor_draw().
|
static |
Definition at line 91 of file paint_cursor.cc.
References make_tex_snap(), blender::ViewContext::region, snap(), blender::ARegion::winx, and blender::ARegion::winy.
Referenced by load_tex(), and make_tex_snap().
|
static |
Definition at line 825 of file sculpt_transform.cc.
References BLI_NOINLINE, blender::Span< T >::index_range(), and mask_border_weight_calc().
Referenced by mask_border_weight_calc().
|
static |
Definition at line 4011 of file sculpt.cc.
References blender::BKE_brush_size_set(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set(), mask_brush_toggle_off(), blender::ed::sculpt_paint::StrokeToggleSettings::original_active_brush, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_size, blender::SCULPT_BRUSH_TYPE_MASK, and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by blender::ed::sculpt_paint::SculptPaintStroke::done(), and mask_brush_toggle_off().
|
static |
Definition at line 3981 of file sculpt.cc.
References blender::BKE_brush_size_get(), blender::BKE_brush_size_set(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set(), blender::BKE_paint_brush_set_essentials(), CLOG_WARN, blender::LOG, mask_brush_toggle_on(), blender::Brush::mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_active_brush, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_size, blender::Brush::sculpt_brush_type, and blender::SCULPT_BRUSH_TYPE_MASK.
Referenced by create_toggle_settings(), and mask_brush_toggle_on().
| void blender::ed::sculpt_paint::mask_overlay_check | ( | bContext & | C, |
| wmOperator & | op ) |
Definition at line 8298 of file sculpt.cc.
References blender::BKE_report(), C, blender::CTX_wm_view3d(), blender::View3DOverlay::flag, blender::View3D::flag2, mask_overlay_check(), NC_SPACE, ND_SPACE_VIEW3D, blender::View3D::overlay, blender::wmOperator::reports, RPT_, blender::RPT_WARNING, blender::View3DOverlay::sculpt_mode_mask_opacity, blender::V3D_HIDE_OVERLAYS, blender::V3D_OVERLAY_SCULPT_SHOW_MASK, and blender::WM_event_add_notifier().
Referenced by blender::ed::sculpt_paint::mask::gesture_box_exec(), blender::ed::sculpt_paint::mask::gesture_lasso_exec(), blender::ed::sculpt_paint::mask::gesture_line_exec(), blender::ed::sculpt_paint::mask::gesture_polyline_exec(), 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(), mask_overlay_check(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), and blender::ed::sculpt_paint::mask::sculpt_mask_init_exec().
| void blender::ed::sculpt_paint::mesh_cursor_active_draw | ( | PaintCursorContext & | pcontext | ) |
Definition at line 248 of file mesh/paint_cursor.cc.
References blender::BLI_assert(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_CLOTH_FORCE_FALLOFF_PLANE, blender::BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, blender::BRUSH_CLOTH_SIMULATION_AREA_LOCAL, blender::SculptSession::cache, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), blender::Draw, blender::ED_view3d_draw_setup_view(), geometry_preview_lines_draw(), blender::GPU_matrix_mul(), blender::GPU_matrix_pop(), blender::GPU_matrix_pop_projection(), blender::GPU_matrix_push(), blender::GPU_matrix_push_projection(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::location, mesh_cursor_active_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, stroke_is_first_brush_step_of_symmetry_pass(), blender::ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, blender::wmViewport(), and blender::wmWindowViewport().
Referenced by mesh_cursor_active_draw(), and paint_cursor_draw_3D_view_brush_cursor().
| void blender::ed::sculpt_paint::mesh_cursor_inactive_draw | ( | PaintCursorContext & | pcontext | ) |
Definition at line 808 of file mesh/paint_cursor.cc.
References blender::BLI_assert(), cursor_space_drawing_setup(), cursor_space_overlays_draw(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::Draw, blender::ED_view3d_draw_setup_view(), blender::GPU_matrix_mul(), blender::GPU_matrix_pop(), blender::GPU_matrix_pop_projection(), blender::GPU_matrix_push(), blender::GPU_matrix_push_projection(), inactive_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, mesh_cursor_inactive_draw(), blender::ViewContext::obact, object_space_overlays_draw(), object_space_radius_update(), PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, screen_space_overlays_draw(), blender::ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, vert_random_access_ensure(), blender::ed::sculpt_paint::PaintCursorContext::win, blender::ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, blender::wmViewport(), and blender::wmWindowViewport().
Referenced by mesh_cursor_inactive_draw(), and paint_cursor_draw_3D_view_brush_cursor().
| void blender::ed::sculpt_paint::mesh_cursor_update_and_init | ( | PaintCursorContext & | pcontext | ) |
Definition at line 150 of file mesh/paint_cursor.cc.
References blender::SculptSession::active_vert_index(), blender::ed::sculpt_paint::PaintCursorContext::base, blender::BKE_brush_size_set(), blender::BKE_brush_use_locked_size(), blender::BLI_assert(), blender::ed::sculpt_paint::PaintCursorContext::brush, brush_unprojected_size_update(), cursor_geometry_info_update(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::Editor, blender::Brush::falloff_shape, float, blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::bke::PaintRuntime::last_hit, blender::bke::PaintRuntime::last_location, blender::ed::sculpt_paint::CursorGeometryInfo::location, blender::ed::sculpt_paint::PaintCursorContext::location, mesh_cursor_update_and_init(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::CursorGeometryInfo::normal, blender::ed::sculpt_paint::PaintCursorContext::normal, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::bke::object::pbvh_ensure(), blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, pixel_radius_update(), blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::region, blender::Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, blender::bke::paint::supports_scene_size(), blender::ed::sculpt_paint::PaintCursorContext::vc, vert_random_access_ensure(), blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by mesh_cursor_update_and_init(), and paint_cursor_draw_3D_view_brush_cursor().
| ePaintSymmetryFlags blender::ed::sculpt_paint::mesh_symmetry_xyz_get | ( | const Object & | object | ) |
Definition at line 192 of file sculpt.cc.
References blender::data, blender::ME_SYMMETRY_XYZ, and mesh_symmetry_xyz_get().
Referenced by blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::pose::do_pose_brush(), do_symmetrical_brush_actions(), do_symmetrical_brush_actions_with_tiling_and_feathering(), 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::expand::find_active_connected_components_from_vert(), find_all_symm_verts_bmesh(), find_all_symm_verts_grids(), find_all_symm_verts_mesh(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), 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::gesture::init_common(), mesh_symmetry_xyz_get(), point_with_symmetry_draw(), blender::ed::sculpt_paint::expand::reposition_pivot(), sculpt_transform_all_vertices(), set_pivot_position_exec(), transform_node_bmesh(), transform_node_grids(), transform_node_mesh(), and transform_radius_elastic().
| void blender::ed::sculpt_paint::mode_enter_generic | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob, | ||
| const eObjectMode | mode_flag ) |
Definition at line 76 of file mesh_paint.cc.
References blender::BKE_object_free_derived_caches(), blender::BKE_paint_brushes_validate(), blender::BKE_paint_get_active_from_paintmode(), blender::BKE_paint_init(), blender::BKE_sculptsession_free(), blender::BLI_assert(), brush_cursor_poll(), blender::SculptSession::cache, blender::ED_image_tools_paint_poll(), blender::ED_paint_cursor_start(), init_session(), blender::Object::mode, mode_enter_generic(), blender::OB_MODE_SCULPT, blender::OB_MODE_TEXTURE_PAINT, blender::OB_MODE_VERTEX_PAINT, blender::OB_MODE_WEIGHT_PAINT, blender::Object::runtime, blender::Sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::Texture3D, blender::Vertex, blender::vertex_paint_poll(), blender::Weight, and blender::weight_paint_poll().
Referenced by blender::ED_object_texture_paint_mode_enter_ex(), blender::ED_object_vpaintmode_enter_ex(), blender::ED_object_wpaintmode_enter_ex(), mode_enter_generic(), and object_sculpt_mode_enter().
| void blender::ed::sculpt_paint::mode_exit_generic | ( | Scene & | scene, |
| Object & | ob, | ||
| const eObjectMode | mode_flag ) |
Definition at line 128 of file mesh_paint.cc.
References blender::BKE_mesh_from_object(), blender::BKE_object_free_derived_caches(), blender::BKE_paint_get_active_from_paintmode(), blender::BKE_sculptsession_free(), blender::BLI_assert(), blender::SculptSession::cache, blender::bke::paint::cursor_reinitialize_textures(), blender::DEG_id_tag_update(), ELEM, blender::Object::id, blender::ID_RECALC_SYNC_TO_EVAL, blender::ME_EDIT_PAINT_FACE_SEL, blender::ME_EDIT_PAINT_VERT_SEL, blender::bke::mesh_select_face_flush(), blender::bke::mesh_select_vert_flush(), blender::Object::mode, mode_exit_generic(), blender::OB_MODE_SCULPT, blender::OB_MODE_TEXTURE_PAINT, blender::OB_MODE_VERTEX_PAINT, blender::OB_MODE_WEIGHT_PAINT, blender::Object::runtime, blender::Sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::Texture3D, blender::Vertex, and blender::Weight.
Referenced by blender::ED_object_texture_paint_mode_exit_ex(), blender::ED_object_vpaintmode_exit_ex(), blender::ED_object_wpaintmode_exit_ex(), mode_exit_generic(), and object_sculpt_mode_exit().
| void blender::ed::sculpt_paint::move_last_point_and_resample | ( | MoveAndResampleBuffers & | buffer, |
| MutableSpan< float3 > | positions, | ||
| const float3 & | new_last_position ) |
| buffer | Reused memory to avoid reallocations when the function is called many times. |
Definition at line 354 of file sculpt_brush.cc.
References blender::length_parameterize::accumulate_lengths(), blender::MutableSpan< T >::copy_from(), blender::math::distance(), blender::MutableSpan< T >::drop_back(), blender::length_parameterize::interpolate(), blender::MutableSpan< T >::last(), move_last_point_and_resample(), blender::ed::sculpt_paint::MoveAndResampleBuffers::new_lengths, blender::ed::sculpt_paint::MoveAndResampleBuffers::new_positions, blender::ed::sculpt_paint::MoveAndResampleBuffers::orig_lengths, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), lexit::Vector< T >::resize(), blender::math::safe_divide(), blender::length_parameterize::sample_at_lengths(), blender::ed::sculpt_paint::MoveAndResampleBuffers::sample_factors, blender::ed::sculpt_paint::MoveAndResampleBuffers::sample_indices, blender::length_parameterize::segments_num(), and blender::MutableSpan< T >::size().
Referenced by move_last_point_and_resample(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook().
| std::optional< BMVert * > blender::ed::sculpt_paint::nearest_vert_calc_bmesh | ( | const bke::pbvh::Tree & | pbvh, |
| const float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 831 of file sculpt.cc.
References b, blender::BKE_pbvh_bmesh_node_unique_verts(), BM_elem_flag_test, blender::BM_ELEM_HIDDEN, blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), nearest_vert_calc_bmesh(), node, node_in_sphere(), blender::threading::parallel_reduce(), blender::bke::pbvh::search_nodes(), and blender::index_mask::IndexMask::slice().
Referenced by find_all_symm_verts_bmesh(), find_symm_verts_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::boundary::init_boundary_bmesh(), and nearest_vert_calc_bmesh().
| std::optional< SubdivCCGCoord > blender::ed::sculpt_paint::nearest_vert_calc_grids | ( | const bke::pbvh::Tree & | pbvh, |
| const SubdivCCG & | subdiv_ccg, | ||
| const float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 777 of file sculpt.cc.
References b, blender::BKE_subdiv_ccg_foreach_visible_grid_vert(), blender::BKE_subdiv_ccg_key_top_level(), blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), blender::SubdivCCG::grid_hidden, blender::SubdivCCGCoord::grid_index, blender::bke::ccg::grid_range(), blender::CCGKey::grid_size, blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), nearest_vert_calc_grids(), node, node_in_sphere(), blender::threading::parallel_reduce(), blender::SubdivCCG::positions, blender::bke::pbvh::search_nodes(), blender::index_mask::IndexMask::slice(), blender::SubdivCCGCoord::x, and blender::SubdivCCGCoord::y.
Referenced by find_all_symm_verts_grids(), find_symm_verts_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::boundary::init_boundary_grids(), and nearest_vert_calc_grids().
| std::optional< int > blender::ed::sculpt_paint::nearest_vert_calc_mesh | ( | const bke::pbvh::Tree & | pbvh, |
| const Span< float3 > | vert_positions, | ||
| const Span< bool > | hide_vert, | ||
| const float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 730 of file sculpt.cc.
References b, blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), blender::Span< T >::is_empty(), nearest_vert_calc_mesh(), node, node_in_sphere(), blender::threading::parallel_reduce(), blender::bke::pbvh::search_nodes(), and blender::index_mask::IndexMask::slice().
Referenced by find_all_symm_verts_mesh(), find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::boundary::init_boundary_mesh(), and nearest_vert_calc_mesh().
|
static |
Definition at line 4108 of file sculpt.cc.
References blender::BRUSH_CLOTH_DEFORM_GRAB, ELEM, need_delta_for_tip_orientation(), blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PINCH, and blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK.
Referenced by brush_delta_update(), and need_delta_for_tip_orientation().
|
static |
Definition at line 4081 of file sculpt.cc.
References blender::BRUSH_CLOTH_DEFORM_GRAB, blender::BRUSH_STROKE_ANCHORED, ELEM, need_delta_from_anchored_origin(), blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_SMEAR, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by brush_delta_update(), and need_delta_from_anchored_origin().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_add_operation | ( | ) |
Definition at line 501 of file sculpt_add.cc.
References new_add_operation().
Referenced by new_add_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_comb_operation | ( | ) |
Definition at line 414 of file sculpt_comb.cc.
References new_comb_operation().
Referenced by new_comb_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_cut_operation | ( | ) |
Definition at line 511 of file sculpt_cut.cc.
References new_cut_operation().
Referenced by new_cut_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_delete_operation | ( | ) |
Definition at line 279 of file sculpt_delete.cc.
References new_delete_operation().
Referenced by new_delete_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_density_operation | ( | BrushStrokeMode | brush_mode, |
| const Scene & | scene, | ||
| const Depsgraph & | depsgraph, | ||
| const ARegion & | region, | ||
| const View3D & | v3d, | ||
| const Object & | object, | ||
| const StrokeExtension & | stroke_start ) |
Definition at line 871 of file sculpt_density.cc.
References new_density_operation(), and use_add_density_mode().
Referenced by new_density_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_grow_shrink_operation | ( | const BrushStrokeMode | brush_mode, |
| const Scene & | scene ) |
Definition at line 511 of file sculpt_grow_shrink.cc.
References blender::BKE_paint_brush_for_read(), blender::BRUSH_CURVES_SCULPT_FLAG_SCALE_UNIFORM, blender::BRUSH_DIR_IN, blender::ToolSettings::curves_sculpt, blender::Invert, new_grow_shrink_operation(), blender::CurvesSculpt::paint, and blender::Scene::toolsettings.
Referenced by new_grow_shrink_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_pinch_operation | ( | BrushStrokeMode | brush_mode, |
| const Scene & | scene ) |
Definition at line 297 of file curves/sculpt_pinch.cc.
References blender::BKE_paint_brush_for_read(), blender::BRUSH_DIR_IN, blender::ToolSettings::curves_sculpt, blender::Invert, new_pinch_operation(), blender::CurvesSculpt::paint, and blender::Scene::toolsettings.
Referenced by new_pinch_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_puff_operation | ( | ) |
Definition at line 355 of file sculpt_puff.cc.
References new_puff_operation().
Referenced by new_puff_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_selection_paint_operation | ( | BrushStrokeMode | brush_mode, |
| BrushSwitchMode | brush_switch_mode, | ||
| const Scene & | scene ) |
Definition at line 393 of file sculpt_selection_paint.cc.
References blender::BKE_paint_brush(), blender::BRUSH_DIR_IN, blender::ToolSettings::curves_sculpt, ELEM, blender::Invert, new_selection_paint_operation(), blender::CurvesSculpt::paint, blender::Smooth, and blender::Scene::toolsettings.
Referenced by new_selection_paint_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_slide_operation | ( | ) |
Definition at line 505 of file sculpt_slide.cc.
References new_slide_operation().
Referenced by new_slide_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_smooth_operation | ( | ) |
Definition at line 264 of file curves/sculpt_smooth.cc.
References new_smooth_operation().
Referenced by new_smooth_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_snake_hook_operation | ( | ) |
Definition at line 307 of file sculpt_snake_hook.cc.
References new_snake_hook_operation().
Referenced by new_snake_hook_operation(), and start_brush_operation().
|
static |
Definition at line 202 of file mesh/sculpt_ops.cc.
References C, blender::CTX_data_active_object(), blender::bke::pbvh::Grids, no_multires_poll(), blender::OB_MESH, blender::bke::object::pbvh_get(), blender::Object::runtime, sculpt_mode_poll(), blender::bke::ObjectRuntime::sculpt_session, and blender::Object::type.
Referenced by no_multires_poll(), and SCULPT_OT_symmetrize().
| bool blender::ed::sculpt_paint::node_fully_masked_or_hidden | ( | const bke::pbvh::Node & | node | ) |
Definition at line 2500 of file sculpt.cc.
References blender::BKE_pbvh_node_fully_hidden_get(), blender::BKE_pbvh_node_fully_masked_get(), node, and node_fully_masked_or_hidden().
Referenced by average_mask_border_position(), average_unmasked_position(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), blender::ed::sculpt_paint::image::ops::paint::do_brush_action(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), gather_nodes(), node_fully_masked_or_hidden(), pbvh_gather_generic(), and pbvh_gather_generic_cube().
| bool blender::ed::sculpt_paint::node_in_box | ( | const float4x4 & | mat, |
| const Bounds< float3 > & | bounds, | ||
| const float3 & | brush_center = float3(0.0f, 0.0f, 0.0f), | ||
| const float3 & | brush_half_lengths = float3(1.0f, 1.0f, 1.0f), | ||
| const bool | test_z_axis = true ) |
Calculates whether the node intersects a local-space volume. By default, this is the [-1, 1] x [-1, 1] x [-1, 1] cube centered at the origin, but the dimensions can be specified. If test_z_axis is false, then the brush is treated as an infinite cuboid along the view direction.
Intersection is tested using the Separating Axis Theorem. Two boxes (not necessarily axis-aligned) intersect if and only if there does not exist an axis that separates them. In particular, it is necessary and sufficient to:
Definition at line 2536 of file sculpt.cc.
References blender::math::abs(), blender::math::cross(), blender::math::dot(), node_in_box(), blender::math::transform_point(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), node_in_box(), node_in_box_positive_z(), and pbvh_gather_generic_cube().
| bool blender::ed::sculpt_paint::node_in_box_positive_z | ( | const float4x4 & | mat, |
| const Bounds< float3 > & | bounds ) |
Calculates whether node intersects the [-1,1] x [-1,1] x [0,1] volume in local space.
Used for brushes similar to Clay strips that only affect vertices below the brush plane.
The local coordinate system is oriented so that the vertices below the plane have positive local z-coordinates.
Definition at line 2606 of file sculpt.cc.
References node_in_box(), and node_in_box_positive_z().
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), and node_in_box_positive_z().
| bool blender::ed::sculpt_paint::node_in_cylinder | ( | const DistRayAABB_Precalc & | ray_dist_precalc, |
| const bke::pbvh::Node & | node, | ||
| const float | radius_sq, | ||
| const bool | original ) |
Definition at line 2521 of file sculpt.cc.
References blender::dist_squared_ray_to_aabb_v3(), node, and node_in_cylinder().
Referenced by gather_brush_nodes(), gather_nodes(), node_in_cylinder(), and pbvh_gather_generic().
| bool blender::ed::sculpt_paint::node_in_sphere | ( | const bke::pbvh::Node & | node, |
| const float3 & | location, | ||
| const float | radius_sq, | ||
| const bool | original ) |
Definition at line 2511 of file sculpt.cc.
References blender::math::clamp(), blender::math::distance_squared(), node, and node_in_sphere().
Referenced by blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), fake_neighbor_search(), gather_brush_nodes(), gather_nodes(), nearest_vert_calc_bmesh(), nearest_vert_calc_grids(), nearest_vert_calc_mesh(), node_in_sphere(), pbvh_gather_cursor_update(), and pbvh_gather_generic().
Fills the entire object's active color attribute layer with the fill color.
Definition at line 2040 of file paint_vertex.cc.
References fill_active_color(), and object_active_color_init().
Referenced by blender::ed::geometry::geometry_color_attribute_add_exec(), object_active_color_init(), and blender::proj_paint_color_attribute_create().
| void blender::ed::sculpt_paint::object_sculpt_mode_enter | ( | bContext * | C, |
| Depsgraph & | depsgraph, | ||
| ReportList * | reports ) |
Definition at line 417 of file mesh/sculpt_ops.cc.
References blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), C, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), and object_sculpt_mode_enter().
| void blender::ed::sculpt_paint::object_sculpt_mode_enter | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob, | ||
| bool | force_dyntopo, | ||
| ReportList * | reports ) |
Definition at line 324 of file mesh/sculpt_ops.cc.
References blender::ed::sculpt_paint::dyntopo::ATTRIBUTES, blender::BKE_mesh_from_object(), blender::BKE_report(), blender::BKE_reportf(), blender::BKE_sculpt_multires_active(), BLI_assert_unreachable, blender::ed::sculpt_paint::dyntopo::check_attribute_warning(), blender::Object::data, blender::DEG_id_tag_update(), blender::ed::sculpt_paint::undo::DyntopoBegin, blender::ed::sculpt_paint::dyntopo::enable_ex(), fabsf, blender::ed::sculpt_paint::face_set::find_next_available_id(), blender::Object::id, blender::ID_RECALC_SYNC_TO_EVAL, blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::is_negative_m4(), blender::ME_SCULPT_DYNAMIC_TOPOLOGY, mode_enter_generic(), blender::ed::sculpt_paint::dyntopo::MODIFIER, blender::OB_MODE_SCULPT, object_sculpt_mode_enter(), blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), RPT_, blender::RPT_WARNING, blender::Object::scale, and blender::Main::wm.
Referenced by blender::ED_editors_init(), object_sculpt_mode_enter(), object_sculpt_mode_enter(), sculpt_mode_toggle_exec(), and blender::ed::sculpt_paint::undo::step_decode().
| void blender::ed::sculpt_paint::object_sculpt_mode_exit | ( | bContext * | C, |
| Depsgraph & | depsgraph ) |
Definition at line 449 of file mesh/sculpt_ops.cc.
References blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), C, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), and object_sculpt_mode_exit().
| void blender::ed::sculpt_paint::object_sculpt_mode_exit | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob ) |
Definition at line 427 of file mesh/sculpt_ops.cc.
References blender::BKE_mesh_from_object(), blender::DEG_id_tag_update(), blender::ed::sculpt_paint::dyntopo::disable_with_undo(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, mode_exit_generic(), blender::multires_flush_sculpt_updates(), blender::OB_MODE_SCULPT, and object_sculpt_mode_exit().
Referenced by blender::ed::object::ed_object_mode_generic_exit_ex(), geometry_extract_apply(), object_sculpt_mode_exit(), object_sculpt_mode_exit(), and sculpt_mode_toggle_exec().
|
static |
Definition at line 646 of file mesh/paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_GRAB_ACTIVE_VERTEX, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::ed::sculpt_paint::boundary::edges_preview_draw(), geometry_preview_lines_draw(), geometry_preview_lines_update(), blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ViewContext::obact, object_space_overlays_draw(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::boundary::pivot_line_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, pose_brush_segments_draw(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_POSE, blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by mesh_cursor_inactive_draw(), and object_space_overlays_draw().
| float blender::ed::sculpt_paint::object_space_radius_get | ( | const ViewContext & | vc, |
| const Paint & | paint, | ||
| const Brush & | brush, | ||
| const float3 & | location, | ||
| float | scale_factor = 1.0 ) |
Retrieve or calculate the object space radius depending on brush settings.
Definition at line 121 of file sculpt.cc.
References blender::BKE_brush_radius_get(), blender::BKE_brush_unprojected_radius_get(), blender::BKE_brush_use_locked_size(), object_space_radius_get(), and blender::paint_calc_object_space_radius().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::trim::calculate_depth(), cursor_geometry_info_update(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), object_space_radius_get(), object_space_radius_update(), paint_space_stroke_spacing(), blender::ed::sculpt_paint::image::ops::paint::stroke_cache_update(), stroke_cache_update(), and stroke_get_location_bvh_ex().
|
static |
Definition at line 470 of file mesh/paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::location, object_space_radius_get(), object_space_radius_update(), blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::radius, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by mesh_cursor_inactive_draw(), and object_space_radius_update().
| void blender::ed::sculpt_paint::operatortypes_sculpt | ( | ) |
Definition at line 1417 of file mesh/sculpt_ops.cc.
References operatortypes_sculpt(), SCULPT_OT_brush_stroke(), blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter(), blender::ed::sculpt_paint::color::SCULPT_OT_color_filter(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_detail_flood_fill(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dyntopo_detail_size_edit(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), SCULPT_OT_face_set_extract(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_boundary(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_cavity(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init(), blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), SCULPT_OT_paint_mask_extract(), SCULPT_OT_paint_mask_slice(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), SCULPT_OT_sculptmode_toggle(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_OT_symmetrize(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture(), and blender::WM_operatortype_append().
Referenced by blender::ED_spacetypes_init(), and operatortypes_sculpt().
|
static |
Definition at line 168 of file mesh/sculpt_ops.cc.
References blender::BKE_sculptsession_free_pbvh(), C, blender::CTX_data_active_object(), blender::DEG_id_tag_update(), blender::Object::id, blender::ID_RECALC_GEOMETRY, NC_OBJECT, ND_DRAW, blender::OPERATOR_FINISHED, optimize_exec(), and blender::WM_event_add_notifier().
Referenced by optimize_exec(), and SCULPT_OT_optimize().
|
inline |
Definition at line 897 of file mesh/sculpt_intern.hh.
References node, orig_color_data_get_mesh(), and orig_color_data_lookup_mesh().
Referenced by blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), and orig_color_data_get_mesh().
| std::optional< Span< float4 > > blender::ed::sculpt_paint::orig_color_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2558 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::Node::col, blender::ed::sculpt_paint::undo::Color, blender::ed::sculpt_paint::undo::get_node(), node, and orig_color_data_lookup_mesh().
Referenced by orig_color_data_get_mesh(), orig_color_data_lookup_mesh(), and blender::ed::sculpt_paint::undo::restore_color_from_undo_step().
| std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2578 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::Node::face_sets, blender::ed::sculpt_paint::undo::FaceSet, blender::ed::sculpt_paint::undo::get_node(), node, and orig_face_set_data_lookup_grids().
Referenced by orig_face_set_data_lookup_grids(), and blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step().
| std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2568 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::Node::face_sets, blender::ed::sculpt_paint::undo::FaceSet, blender::ed::sculpt_paint::undo::get_node(), node, and orig_face_set_data_lookup_mesh().
Referenced by orig_face_set_data_lookup_mesh(), and blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step().
| std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2598 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::undo::Node::mask, node, and orig_mask_data_lookup_grids().
Referenced by orig_mask_data_lookup_grids(), and blender::ed::sculpt_paint::undo::restore_mask_from_undo_step().
| std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2588 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::undo::Node::mask, node, and orig_mask_data_lookup_mesh().
Referenced by orig_mask_data_lookup_mesh(), and blender::ed::sculpt_paint::undo::restore_mask_from_undo_step().
| void blender::ed::sculpt_paint::orig_position_data_gather_bmesh | ( | const BMLog & | bm_log, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float3 > | positions, | ||
| MutableSpan< float3 > | normals ) |
Definition at line 2538 of file sculpt_undo.cc.
References blender::BM_log_original_vert_data(), blender::MutableSpan< T >::is_empty(), and orig_position_data_gather_bmesh().
Referenced by calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), orig_position_data_gather_bmesh(), and transform_node_bmesh().
|
inline |
Definition at line 882 of file mesh/sculpt_intern.hh.
References blender::BLI_assert(), node, orig_position_data_get_grids(), orig_position_data_lookup_grids(), and blender::result.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), orig_position_data_get_grids(), and transform_node_grids().
|
inline |
Definition at line 872 of file mesh/sculpt_intern.hh.
References blender::BLI_assert(), node, orig_position_data_get_mesh(), orig_position_data_lookup_mesh(), and blender::result.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), orig_position_data_get_mesh(), and transform_node_mesh().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2528 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::get_node(), node, blender::ed::sculpt_paint::undo::Node::normal, orig_position_data_lookup_grids(), blender::ed::sculpt_paint::undo::Position, and blender::ed::sculpt_paint::undo::Node::position.
Referenced by calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), orig_position_data_get_grids(), orig_position_data_lookup_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), sculpt_find_nearest_to_ray_cb(), and sculpt_raycast_cb().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2516 of file sculpt_undo.cc.
References node, orig_position_data_lookup_mesh(), orig_position_data_lookup_mesh_all_verts(), and blender::result.
Referenced by calc_area_normal_and_center_node_mesh(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), orig_position_data_get_mesh(), orig_position_data_lookup_mesh(), and blender::ed::sculpt_paint::undo::restore_position_from_undo_step().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_mesh_all_verts | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Retrieve positions from the latest undo state. This is often used for modal actions that depend on the initial state of the geometry from before the start of the action.
Definition at line 2506 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::get_node(), node, blender::ed::sculpt_paint::undo::Node::normal, orig_position_data_lookup_mesh_all_verts(), blender::ed::sculpt_paint::undo::Position, and blender::ed::sculpt_paint::undo::Node::position.
Referenced by orig_position_data_lookup_mesh(), orig_position_data_lookup_mesh_all_verts(), sculpt_find_nearest_to_ray_cb(), and sculpt_raycast_cb().
|
static |
Definition at line 5405 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::ED_view3d_viewcontext_init(), over_mesh(), blender::Sculpt::paint, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::ToolSettings::sculpt, and stroke_get_location_bvh_ex().
Referenced by over_mesh(), over_mesh(), sculpt_brush_stroke_invoke(), and blender::ed::sculpt_paint::SculptPaintStroke::test_start().
|
static |
Definition at line 5419 of file sculpt.cc.
References over_mesh(), blender::Sculpt::paint, blender::PAINT_FALLOFF_SHAPE_TUBE, and stroke_get_location_bvh_ex().
| bool blender::ed::sculpt_paint::paint_brush_cursor_poll | ( | bContext * | C | ) |
Returns true if the brush cursor should be activated.
Definition at line 1771 of file paint_stroke.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_from_tool(), brush_tool_get(), C, blender::CTX_data_active_object(), blender::CTX_wm_area(), blender::CTX_wm_region(), blender::bToolRef_Runtime::cursor, paint_brush_cursor_poll(), blender::bToolRef::runtime, blender::Texture2D, and blender::WM_CURSOR_DEFAULT.
Referenced by brush_cursor_poll(), blender::ed::sculpt_paint::PaintStroke::modal(), and paint_brush_cursor_poll().
| bool blender::ed::sculpt_paint::paint_brush_tool_poll | ( | bContext * | C | ) |
Returns true if the active tool uses brushes.
Definition at line 1736 of file paint_stroke.cc.
References blender::BKE_paint_get_active_from_context(), C, blender::CTX_data_active_object(), blender::CTX_wm_area(), blender::CTX_wm_region(), and paint_brush_tool_poll().
Referenced by paint_brush_tool_poll(), paint_brush_tool_poll(), paint_cursor_context_init(), and sculpt_mode_and_brush_poll().
| bool blender::ed::sculpt_paint::paint_brush_tool_poll | ( | const ScrArea * | area, |
| const ARegion * | region, | ||
| const Paint * | paint, | ||
| const Object * | ob ) |
Definition at line 1745 of file paint_stroke.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paintmode_get_from_tool(), brush_tool_get(), paint_brush_tool_poll(), and blender::Texture2D.
|
static |
Definition at line 198 of file paint_stroke.cc.
References blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, ELEM, and paint_brush_type_raycast_original().
Referenced by paint_brush_type_raycast_original(), and blender::ed::sculpt_paint::PaintStroke::PaintStroke().
|
static |
Definition at line 203 of file paint_stroke.cc.
References blender::BRUSH_STROKE_ANCHORED, ELEM, paint_brush_type_require_inbetween_mouse_events(), blender::Sculpt, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_brush_type_require_inbetween_mouse_events().
|
static |
Definition at line 152 of file paint_stroke.cc.
References ELEM, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), paint_brush_type_require_location(), blender::Sculpt, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by paint_brush_type_require_location().
|
static |
Definition at line 1188 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::alpha_overlay_drawn, blender::ed::sculpt_paint::PaintCursorContext::brush, blender::Draw, blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_cursor_check_and_draw_alpha_overlays(), paint_draw_alpha_overlay(), PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::vc, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.
Referenced by paint_cursor_check_and_draw_alpha_overlays(), and paint_draw_cursor().
|
static |
Definition at line 946 of file paint_cursor.cc.
References blender::Brush::add_col, blender::ed::sculpt_paint::PaintCursorContext::base, blender::BKE_brush_radius_get(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_DIR_IN, blender::BRUSH_STROKE_CURVE, C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_area(), blender::CTX_wm_manager(), blender::CTX_wm_region(), blender::CTX_wm_screen(), blender::CTX_wm_window(), Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::SculptSession::draw_faded_cursor, blender::ED_view3d_viewcontext_init(), blender::Editor, ELEM, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::Brush::flag, float, blender::get_imapaint_zoom(), blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, blender::max_ff(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::object, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_brush_tool_poll(), paint_cursor_context_init(), paint_use_2d_cursor(), PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ARegion::regiontype, blender::RGN_TYPE_WINDOW, blender::Object::runtime, blender::Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::screen, blender::Sculpt, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, blender::Brush::stroke_method, blender::Brush::sub_col, blender::bke::brush::supports_secondary_cursor_color(), blender::Texture3D, blender::ed::sculpt_paint::PaintCursorContext::tilt, blender::ed::sculpt_paint::PaintCursorContext::translation, blender::Paint::unified_paint_settings, blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::Vertex, blender::Weight, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ed::sculpt_paint::PaintCursorContext::wm, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.
Referenced by paint_cursor_context_init(), and paint_draw_cursor().
|
static |
Definition at line 1113 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::alpha_overlay_drawn, blender::BLI_assert(), blender::ed::sculpt_paint::PaintCursorContext::brush, ELEM, blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, mesh_cursor_active_draw(), mesh_cursor_inactive_draw(), mesh_cursor_update_and_init(), blender::ed::sculpt_paint::PaintCursorContext::mode, paint_cursor_draw_3D_view_brush_cursor(), paint_draw_legacy_3D_view_brush_cursor(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::Sculpt, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::Texture3D, blender::U, USER_EXPERIMENTAL_TEST, blender::Vertex, and blender::Weight.
Referenced by paint_cursor_draw_3D_view_brush_cursor(), and paint_draw_cursor().
|
static |
Definition at line 1151 of file paint_cursor.cc.
References paint_cursor_is_3d_view_navigating(), blender::RegionView3D::rflag, blender::ViewContext::rv3d, blender::RV3D_NAVIGATING, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_is_3d_view_navigating(), and paint_draw_cursor().
|
static |
Definition at line 1157 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, ELEM, blender::Paint::flags, blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_FILL, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_cursor_is_brush_cursor_enabled(), blender::PAINT_SHOW_BRUSH, blender::Texture2D, and blender::Texture3D.
Referenced by paint_cursor_is_brush_cursor_enabled(), and paint_draw_cursor().
|
static |
Definition at line 1232 of file paint_cursor.cc.
References blender::GPU_blend(), blender::GPU_BLEND_NONE, blender::GPU_line_smooth(), blender::immUnbindProgram(), and paint_cursor_restore_drawing_state().
Referenced by paint_cursor_restore_drawing_state(), and paint_draw_cursor().
|
static |
Definition at line 1212 of file paint_cursor.cc.
References blender::GPU_blend(), blender::GPU_BLEND_ALPHA, blender::GPU_line_smooth(), blender::GPU_line_width(), blender::GPU_SHADER_3D_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::immBindBuiltinProgram(), blender::immVertexFormat(), paint_cursor_setup_2D_drawing(), and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by paint_cursor_setup_2D_drawing(), and paint_draw_cursor().
|
static |
Definition at line 1222 of file paint_cursor.cc.
References blender::GPU_blend(), blender::GPU_BLEND_ALPHA, blender::GPU_line_smooth(), blender::GPU_line_width(), blender::GPU_SHADER_3D_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::immBindBuiltinProgram(), blender::immVertexFormat(), paint_cursor_setup_3D_drawing(), and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by paint_cursor_setup_3D_drawing(), and paint_draw_cursor().
|
static |
Definition at line 1201 of file paint_cursor.cc.
References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::bke::PaintRuntime::draw_anchored, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_cursor_update_anchored_location(), blender::ed::sculpt_paint::PaintCursorContext::region, blender::Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::translation, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by paint_cursor_update_anchored_location(), and paint_draw_cursor().
|
static |
Definition at line 1170 of file paint_cursor.cc.
References blender::BKE_paint_calculate_rake_rotation(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::Editor, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_cursor_update_rake_rotation(), PRF_scope, blender::ViewContext::region, blender::Paint::runtime, blender::bke::PaintRuntime::stroke_active, blender::ed::sculpt_paint::PaintCursorContext::translation, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by paint_cursor_update_rake_rotation(), and paint_draw_cursor().
|
static |
Definition at line 1091 of file paint_cursor.cc.
References blender::Draw, blender::GPencil, grease_pencil_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, paint_draw_2D_view_brush_cursor(), paint_draw_2D_view_brush_cursor_default(), PRF_scope, and blender::VertexGPencil.
Referenced by paint_draw_2D_view_brush_cursor(), and paint_draw_cursor().
|
static |
Definition at line 1070 of file paint_cursor.cc.
References blender::BKE_brush_use_size_pressure(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::GPU_line_width(), blender::imm_draw_circle_wire_2d(), blender::immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_draw_2D_view_brush_cursor_default(), blender::ed::sculpt_paint::PaintCursorContext::pos, blender::Paint::runtime, blender::bke::PaintRuntime::size_pressure_value, blender::bke::PaintRuntime::stroke_active, and blender::ed::sculpt_paint::PaintCursorContext::translation.
Referenced by paint_draw_2D_view_brush_cursor(), and paint_draw_2D_view_brush_cursor_default().
|
static |
Definition at line 694 of file paint_cursor.cc.
References ELEM, blender::bke::paint::get_overlay_flags(), blender::GPU_blend(), blender::GPU_blend_get(), blender::GPU_depth_test(), blender::GPU_depth_test_get(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_matrix_translate_2f(), blender::bke::paint::OverrideCursor, blender::bke::paint::OverridePrimary, blender::bke::paint::OverrideSecondary, paint_draw_alpha_overlay(), paint_draw_cursor_overlay(), paint_draw_tex_overlay(), blender::ViewContext::region, blender::Texture2D, blender::Texture3D, blender::Vertex, blender::Weight, blender::ARegion::winrct, blender::x, blender::rcti::xmin, y, and blender::rcti::ymin.
Referenced by paint_cursor_check_and_draw_alpha_overlays(), and paint_draw_alpha_overlay().
|
static |
Definition at line 1239 of file paint_cursor.cc.
References BLI_assert_unreachable, blender::ed::sculpt_paint::PaintCursorContext::brush, C, Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, blender::Default, blender::GPencil, blender::wmWindow::modalcursor, blender::ed::sculpt_paint::PaintCursorContext::mode, paint_cursor_check_and_draw_alpha_overlays(), paint_cursor_context_init(), 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_cursor(), paint_draw_curve_cursor(), paint_update_mouse_cursor(), PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, blender::WM_CURSOR_DOT, and blender::WM_cursor_set().
Referenced by blender::ED_paint_cursor_start(), and paint_draw_cursor().
|
static |
Definition at line 609 of file paint_cursor.cc.
References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_radius_get(), blender::BKE_brush_use_size_pressure(), blender::BRUSH_OVERLAY_CURSOR, blender::copy_v2_v2(), blender::bke::PaintRuntime::draw_anchored, blender::GPU_blend(), blender::GPU_BLEND_ALPHA_PREMULT, blender::GPU_color_mask(), blender::GPU_DEPTH_NONE, blender::GPU_depth_test(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_matrix_scale_1f(), blender::GPU_matrix_translate_2f(), blender::GPU_matrix_translate_2fv(), blender::GPU_PRIM_TRI_FAN, blender::GPU_SHADER_3D_IMAGE_COLOR, blender::GPU_texture_unbind(), blender::GPU_vertformat_attr_add(), blender::immAttr2f(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immBindTextureSampler(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4fv(), blender::immVertex2f(), blender::immVertexFormat(), load_tex_cursor(), blender::mul_v4_fl(), paint_draw_cursor_overlay(), blender::bke::PaintRuntime::size_pressure_value, blender::bke::PaintRuntime::stroke_active, blender::U, UNPACK3, blender::x, blender::rctf::xmax, blender::rctf::xmin, y, blender::rctf::ymax, and blender::rctf::ymin.
Referenced by paint_draw_alpha_overlay(), and paint_draw_cursor_overlay().
|
static |
Definition at line 841 of file paint_cursor.cc.
References blender::PaintCurvePoint::bez, blender::BKE_curve_forward_diff_bezier(), blender::data, blender::Draw, draw_bezier_handle_lines(), draw_rect_point(), draw_tri_point(), blender::BezTriple::f1, blender::BezTriple::f2, blender::BezTriple::f3, float, blender::ui::theme::get_color_type_4fv(), blender::GPU_blend(), blender::GPU_BLEND_ALPHA, blender::GPU_BLEND_NONE, blender::GPU_line_smooth(), blender::GPU_line_width(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_matrix_translate_2f(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_SHADER_3D_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4f(), blender::immVertex2fv(), blender::immVertexFormat(), PAINT_CURVE_NUM_SEGMENTS, paint_draw_curve_cursor(), blender::PaintCurve::points, PRF_scope, blender::ViewContext::region, blender::SPACE_VIEW3D, blender::TH_GIZMO_PRIMARY, blender::TH_GIZMO_SECONDARY, blender::TH_VERTEX_SELECT, blender::PaintCurve::tot_points, blender::v, blender::BezTriple::vec, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by paint_draw_cursor(), and paint_draw_curve_cursor().
|
static |
Definition at line 1104 of file paint_cursor.cc.
References blender::Draw, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::GPU_line_width(), blender::imm_draw_circle_wire_3d(), blender::immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, paint_draw_legacy_3D_view_brush_cursor(), blender::ed::sculpt_paint::PaintCursorContext::pos, PRF_scope, and blender::ed::sculpt_paint::PaintCursorContext::translation.
Referenced by paint_cursor_draw_3D_view_brush_cursor(), and paint_draw_legacy_3D_view_brush_cursor().
|
static |
Definition at line 100 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::constrain_line, blender::ed::sculpt_paint::PaintStroke::constrained_pos, blender::GPU_line_smooth(), blender::GPU_PRIM_LINES, blender::GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::GPU_viewport_size_get_f(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniform1f(), blender::immUniform1i(), blender::immUniform2f(), blender::immUniform4f(), blender::immVertex2f(), blender::immVertex2fv(), blender::immVertexFormat(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, paint_draw_line_cursor(), blender::ViewContext::region, blender::ed::sculpt_paint::PaintStroke::vc, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_draw_line_cursor().
|
static |
Definition at line 59 of file paint_stroke.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), C, blender::CTX_wm_region(), blender::data, blender::GPencil, blender::GPU_blend(), blender::GPU_BLEND_ALPHA, blender::GPU_BLEND_NONE, blender::GPU_line_smooth(), blender::GPU_PRIM_LINES, blender::GPU_SHADER_3D_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4ubv(), blender::immVertex2f(), blender::immVertex2fv(), blender::immVertexFormat(), paint_draw_smooth_cursor(), blender::PAINT_SHOW_BRUSH, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_draw_smooth_cursor().
|
static |
Definition at line 455 of file paint_cursor.cc.
References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_radius_get(), blender::BKE_brush_use_size_pressure(), blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::MTex::brush_map_mode, blender::BRUSH_OVERLAY_PRIMARY, blender::BRUSH_OVERLAY_SECONDARY, blender::bke::PaintRuntime::brush_rotation, blender::bke::PaintRuntime::brush_rotation_sec, blender::copy_v3_v3(), blender::bke::PaintRuntime::draw_anchored, ELEM, blender::GPU_blend(), blender::GPU_BLEND_ALPHA_PREMULT, blender::GPU_color_mask(), blender::GPU_DEPTH_NONE, blender::GPU_depth_test(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_matrix_rotate_2d(), blender::GPU_matrix_scale_2f(), blender::GPU_matrix_translate_2f(), blender::GPU_matrix_translate_2fv(), blender::GPU_PRIM_TRI_FAN, blender::GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER, blender::GPU_SAMPLER_EXTEND_MODE_REPEAT, blender::GPU_SAMPLER_FILTERING_LINEAR, blender::GPU_SHADER_3D_IMAGE_COLOR, blender::GPU_texture_unbind(), blender::GPU_vertformat_attr_add(), blender::IMAGE_PAINT_BRUSH_TYPE_DRAW, blender::immAttr2f(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immBindTextureSampler(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4fv(), blender::immVertex2f(), blender::immVertexFormat(), load_tex(), blender::MTEX_MAP_MODE_STENCIL, blender::MTEX_MAP_MODE_TILED, blender::MTEX_MAP_MODE_VIEW, blender::mul_v4_fl(), paint_draw_tex_overlay(), RAD2DEGF, blender::ViewContext::region, blender::MTex::rot, scale(), blender::bke::PaintRuntime::size_pressure_value, blender::bke::PaintRuntime::stroke_active, blender::MTex::tex, texture(), blender::Texture3D, blender::U, blender::ARegion::winrct, blender::x, blender::rctf::xmax, blender::rctf::xmin, y, blender::rctf::ymax, and blender::rctf::ymin.
Referenced by paint_draw_alpha_overlay(), and paint_draw_tex_overlay().
|
static |
Definition at line 251 of file sculpt_mask_extract.cc.
References blender::ed::sculpt_paint::GeometryExtractParams::add_boundary_loop, blender::ed::sculpt_paint::GeometryExtractParams::add_solidify, blender::ed::sculpt_paint::GeometryExtractParams::apply_shrinkwrap, C, blender::CTX_data_active_object(), blender::Object::data, blender::ED_undo_push_op(), geometry_extract_apply(), geometry_extract_tag_masked_faces(), blender::ed::sculpt_paint::GeometryExtractParams::mask_threshold, blender::ed::sculpt_paint::GeometryExtractParams::num_smooth_iterations, blender::OPERATOR_CANCELLED, paint_mask_extract_exec(), blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_float_get(), and blender::RNA_int_get().
Referenced by paint_mask_extract_exec(), and SCULPT_OT_paint_mask_extract().
|
static |
Definition at line 278 of file sculpt_mask_extract.cc.
References C, blender::e, IFACE_, paint_mask_extract_invoke(), and blender::WM_operator_props_popup_confirm_ex().
Referenced by paint_mask_extract_invoke(), and SCULPT_OT_paint_mask_extract().
|
static |
Definition at line 434 of file sculpt_mask_extract.cc.
References blender::ed::object::add_type(), blender::BKE_id_copy(), blender::BKE_id_free(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_from_bmesh_nomain(), blender::BKE_mesh_nomain_to_mesh(), blender::BKE_sculptsession_free_pbvh(), blender::bm, blender::BM_mesh_bm_from_me(), blender::BM_mesh_create(), blender::BM_mesh_free(), BMALLOC_TEMPLATE_FROM_ME, C, blender::BMeshFromMeshParams::calc_face_normal, blender::BMeshToMeshParams::calc_object_remap, blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::DEG_relations_tag_update(), blender::ed::sculpt_paint::face_set::find_next_available_id(), blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::Object::loc, blender::View3D::local_view_uid, blender::View3D::localvd, blender::Object::mode, NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, blender::OB_MESH, blender::OB_MODE_SCULPT, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, paint_mask_slice_exec(), blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_float_get(), blender::Object::rot, slice_paint_mask(), blender::BMeshCreateParams::use_toolflags, and blender::WM_event_add_notifier().
Referenced by paint_mask_slice_exec(), and SCULPT_OT_paint_mask_slice().
| void blender::ed::sculpt_paint::PAINT_OT_sample_color | ( | wmOperatorType * | ot | ) |
Definition at line 577 of file paint_sample_color.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, INT_MAX, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_DEPENDS_ON_CURSOR, blender::OPTYPE_REGISTER, PAINT_OT_sample_color(), blender::wmOperatorType::poll, blender::PROP_HIDDEN, blender::PROP_SKIP_SAVE, blender::RNA_def_boolean(), blender::RNA_def_int_vector(), blender::RNA_def_property_flag(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), sample_color_poll(), and blender::wmOperatorType::srna.
Referenced by blender::ED_operatortypes_paint(), and PAINT_OT_sample_color().
|
static |
Definition at line 311 of file paint_sample_color.cc.
References blender::BKE_paintmode_get_active_from_context(), blender::BKE_sculptsession_update_for_edit(), blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), blender::BLI_assert(), C, blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::CTX_wm_space_image(), blender::CTX_wm_view3d(), blender::CTX_wm_window(), blender::ColorManagedDisplaySettings::display_device, blender::Scene::display_settings, blender::ED_space_image_color_sample(), blender::ED_view3d_viewcontext_init(), ELEM, blender::IMB_colormanagement_display_get_named(), blender::IMB_colormanagement_display_to_scene_linear_v3(), paint_sample_color(), sample_mesh_attribute_color(), sample_texture_paint_color(), blender::Sculpt, blender::Texture3D, blender::Vertex, blender::ARegion::winrct, blender::WM_window_pixels_read_sample(), blender::rcti::xmin, and blender::rcti::ymin.
Referenced by paint_sample_color(), sample_color_exec(), sample_color_invoke(), and sample_color_modal().
|
static |
Definition at line 579 of file paint_stroke.cc.
References blender::math::distance_squared(), blender::math::interpolate(), paint_smooth_stroke(), paint_supports_smooth_stroke(), sample, and blender::square_f().
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_smooth_stroke().
Returns true if the stroke dots should be spaced.
Definition at line 1020 of file paint_stroke.cc.
References blender::BRUSH_STROKE_SPACE, blender::Brush::curves_sculpt_brush_type, curves_sculpt_brush_uses_spacing(), ELEM, blender::GPencil, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), paint_space_stroke_enabled(), paint_supports_dynamic_size(), blender::Brush::sculpt_brush_type, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SculptCurves, blender::SculptGPencil, and blender::Brush::stroke_method.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_space_stroke_enabled().
|
static |
Definition at line 610 of file paint_stroke.cc.
References blender::BKE_brush_radius_get(), blender::BKE_curvemapping_evaluateF(), blender::BRUSH_SPACING_PRESSURE, blender::BRUSH_STROKE_SPACE, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), blender::max_ff(), blender::ViewContext::obact, object_space_radius_get(), blender::paint_calc_object_space_radius(), paint_space_stroke_spacing(), paint_stroke_use_scene_spacing(), and blender::math::transform_point().
Referenced by paint_space_stroke_spacing(), paint_space_stroke_spacing_no_pressure(), and paint_space_stroke_spacing_variable().
|
static |
Definition at line 665 of file paint_stroke.cc.
References paint_space_stroke_spacing(), and paint_space_stroke_spacing_no_pressure().
Referenced by paint_space_stroke_spacing_no_pressure().
|
static |
Definition at line 725 of file paint_stroke.cc.
References blender::BKE_brush_use_size_pressure(), blender::BKE_curvemapping_evaluateF(), length(), paint_space_stroke_spacing(), and paint_space_stroke_spacing_variable().
Referenced by paint_space_stroke_spacing_variable().
|
static |
Definition at line 702 of file paint_stroke.cc.
References blender::BRUSH_SPACE_ATTEN, fabs(), blender::Brush::flag, max, paint_stroke_integrate_overlap(), paint_stroke_overlapped_curve(), and blender::Brush::spacing.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_stroke_integrate_overlap().
| float2 blender::ed::sculpt_paint::paint_stroke_jitter_pos | ( | Paint * | paint, |
| PaintMode | mode, | ||
| const Brush & | brush, | ||
| float | pressure, | ||
| BrushStrokeMode | stroke_mode, | ||
| float | zoom_2d, | ||
| const float2 & | mval ) |
Definition at line 453 of file paint_stroke.cc.
References blender::BKE_brush_jitter_pos(), blender::BKE_curvemapping_evaluateF(), blender::BRUSH_JITTER_PRESSURE, blender::Invert, paint_stroke_jitter_pos(), and paint_stroke_use_jitter().
Referenced by blender::ed::sculpt_paint::PaintStroke::exec(), and paint_stroke_jitter_pos().
|
static |
Definition at line 1379 of file paint_stroke.cc.
References angle(), atan2f, cosf, float, floorf, len(), blender::math::length(), M_PI, M_PI_4, paint_stroke_line_constrain(), and sinf.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and paint_stroke_line_constrain().
|
static |
Definition at line 678 of file paint_stroke.cc.
References blender::BKE_brush_curve_strength(), fabsf, blender::max_ff(), paint_stroke_overlapped_curve(), and blender::x.
Referenced by paint_stroke_integrate_overlap(), and paint_stroke_overlapped_curve().
|
static |
Definition at line 433 of file paint_stroke.cc.
References blender::BRUSH_STROKE_CURVE, blender::BRUSH_STROKE_LINE, blender::BRUSH_STROKE_SPACE, ELEM, and paint_stroke_use_dash().
Referenced by paint_stroke_use_dash().
|
static |
Definition at line 439 of file paint_stroke.cc.
References blender::BRUSH_ABSOLUTE_JITTER, blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, ELEM, blender::IMAGE_PAINT_BRUSH_TYPE_CLONE, invert(), paint_stroke_use_jitter(), blender::Texture2D, and blender::Texture3D.
Referenced by paint_stroke_jitter_pos(), and paint_stroke_use_jitter().
|
static |
Definition at line 180 of file paint_stroke.cc.
References blender::BRUSH_SCENE_SPACING, blender::bke::brush::implements_3d_texture_paint(), paint_stroke_use_scene_spacing(), blender::Sculpt, blender::Texture3D, blender::U, and USER_EXPERIMENTAL_TEST.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), paint_space_stroke_spacing(), and paint_stroke_use_scene_spacing().
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1065 of file paint_stroke.cc.
References blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_USE_GRADIENT, blender::Brush::flag, blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_FILL, paint_supports_dynamic_size(), blender::Sculpt, blender::Brush::stroke_method, blender::bke::brush::supports_size_pressure(), blender::Texture2D, and blender::Texture3D.
Referenced by paint_space_stroke_enabled(), paint_supports_dynamic_size(), blender::ed::sculpt_paint::image::ops::paint::stroke_cache_update(), stroke_cache_update(), and blender::ed::sculpt_paint::vwpaint::update_cache_variants().
| bool blender::ed::sculpt_paint::paint_supports_dynamic_tex_coords | ( | const Brush & | br, |
| PaintMode | mode ) |
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1126 of file paint_stroke.cc.
References blender::BRUSH_STROKE_ANCHORED, paint_supports_dynamic_tex_coords(), blender::Sculpt, sculpt_is_grab_tool(), and blender::Brush::stroke_method.
Referenced by paint_supports_dynamic_tex_coords().
| bool blender::ed::sculpt_paint::paint_supports_smooth_stroke | ( | const Brush & | brush, |
| PaintMode | mode, | ||
| BrushSwitchMode | brush_switch_mode ) |
Definition at line 1089 of file paint_stroke.cc.
References blender::BRUSH_SMOOTH_STROKE, blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, blender::BRUSH_STROKE_LINE, ELEM, blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPencil, paint_supports_smooth_stroke(), blender::Sculpt, sculpt_is_grab_tool(), and blender::Smooth.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), paint_smooth_stroke(), and paint_supports_smooth_stroke().
| bool blender::ed::sculpt_paint::paint_supports_texture | ( | PaintMode | mode | ) |
Definition at line 1119 of file paint_stroke.cc.
References ELEM, paint_supports_texture(), blender::Sculpt, blender::Texture2D, blender::Texture3D, and blender::Vertex.
Referenced by paint_supports_texture(), and blender::stencil_control_poll().
|
static |
Definition at line 1042 of file paint_cursor.cc.
References blender::BKE_brush_size_get(), blender::BKE_screen_find_region_type(), blender::ed::sculpt_paint::PaintCursorContext::brush, ELEM, blender::GPencil, blender::wmWindow::grabcursor, blender::wmWindow::modalcursor, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_update_mouse_cursor(), blender::bScreen::regionbase, blender::RGN_TYPE_TEMPORARY, blender::ed::sculpt_paint::PaintCursorContext::screen, blender::VertexGPencil, blender::ed::sculpt_paint::PaintCursorContext::win, blender::WM_CURSOR_DOT, blender::WM_CURSOR_PAINT, and blender::WM_cursor_set().
Referenced by paint_draw_cursor(), and paint_update_mouse_cursor().
Definition at line 921 of file paint_cursor.cc.
References BLI_assert_unreachable, blender::GPencil, blender::bke::brush::implements_3d_texture_paint(), blender::Invalid, paint_use_2d_cursor(), blender::Sculpt, blender::SculptCurves, blender::SculptGPencil, blender::Texture2D, blender::Texture3D, blender::U, USER_EXPERIMENTAL_TEST, blender::Vertex, blender::VertexGPencil, blender::Weight, and blender::WeightGPencil.
Referenced by paint_cursor_context_init(), and paint_use_2d_cursor().
|
static |
Definition at line 2611 of file sculpt.cc.
References blender::SculptSession::cache, blender::SculptSession::cursor_location, blender::SculptSession::cursor_radius, blender::ed::sculpt_paint::StrokeCache::location_symm, node, node_in_sphere(), pbvh_gather_cursor_update(), blender::bke::object::pbvh_get(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, and blender::bke::pbvh::search_nodes().
Referenced by cursor_geometry_info_update(), and pbvh_gather_cursor_update().
|
static |
Definition at line 2622 of file sculpt.cc.
References blender::SculptSession::cache, blender::dist_squared_ray_to_aabb_v3_precalc(), blender::ed::sculpt_paint::StrokeCache::location_symm, node, node_fully_masked_or_hidden(), node_in_cylinder(), node_in_sphere(), blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, pbvh_gather_generic(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::radius, blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_MASK, blender::bke::ObjectRuntime::sculpt_session, blender::bke::pbvh::search_nodes(), blender::math::square(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_brush_node_mask(), dynamic_topology_update(), and pbvh_gather_generic().
|
static |
Definition at line 2659 of file sculpt.cc.
References BLI_assert_msg, BLI_assert_unreachable, blender::math::is_zero(), node, node_fully_masked_or_hidden(), node_in_box(), blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, pbvh_gather_generic_cube(), blender::bke::object::pbvh_get(), blender::SCULPT_BRUSH_TYPE_MASK, and blender::bke::pbvh::search_nodes().
Referenced by calc_brush_node_mask(), and pbvh_gather_generic_cube().
|
static |
Definition at line 93 of file mesh/paint_cursor.cc.
References blender::BKE_brush_radius_get(), blender::BKE_brush_unprojected_radius_get(), blender::ed::sculpt_paint::PaintCursorContext::brush, brush_radius_project(), blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::ed::sculpt_paint::PaintCursorContext::location, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, pixel_radius_update(), blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, blender::math::transform_point(), and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by mesh_cursor_update_and_init(), and pixel_radius_update().
|
static |
Definition at line 397 of file mesh/paint_cursor.cc.
References angle(), blender::Object::data, is_symmetry_iteration_valid(), M_PI, mesh_symmetry_xyz_get(), blender::mul_m4_v3(), point_with_symmetry_draw(), blender::rotate_m4(), screen_space_point_draw(), blender::bke::paint::supports_symmetry_tiling(), symmetry_flip(), tiling_preview_draw(), and blender::unit_m4().
Referenced by point_with_symmetry_draw(), and screen_space_overlays_draw().
|
static |
Definition at line 494 of file mesh/paint_cursor.cc.
References blender::immUniformColor4f(), blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::pos, pose_brush_origins_draw(), blender::SculptSession::pose_ik_chain_preview, blender::ed::sculpt_paint::PaintCursorContext::region, screen_space_point_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by pose_brush_origins_draw(), and screen_space_overlays_draw().
|
static |
Definition at line 476 of file mesh/paint_cursor.cc.
References blender::BLI_assert(), blender::GPU_line_width(), blender::GPU_PRIM_LINES, blender::immBegin(), blender::immEnd(), blender::immUniformColor4f(), blender::immVertex3fv(), blender::ed::sculpt_paint::PaintCursorContext::pos, pose_brush_segments_draw(), blender::SculptSession::pose_ik_chain_preview, and blender::ed::sculpt_paint::PaintCursorContext::ss.
Referenced by object_space_overlays_draw(), and pose_brush_segments_draw().
|
static |
Definition at line 5975 of file sculpt.cc.
References blender::SculptFakeNeighbors::fake_neighbor_index, blender::SculptSession::fake_neighbors, and pose_fake_neighbors_free().
Referenced by fake_neighbors_free(), and pose_fake_neighbors_free().
|
static |
Definition at line 875 of file paint_stroke.cc.
References print_pressure_status_enabled(), blender::U, and blender::USER_TABLET_SHOW_DEBUG_VALUES.
Referenced by blender::ed::sculpt_paint::PaintStroke::modal(), and print_pressure_status_enabled().
|
static |
Definition at line 29 of file grease_pencil/paint_cursor.cc.
References blender::ED_view3d_calc_zfac_ex(), blender::ED_view3d_win_to_delta(), blender::math::length(), project_brush_radius_grease_pencil(), blender::ViewContext::region, blender::ViewContext::rv3d, blender::math::safe_divide(), scale(), and blender::math::transform_direction().
Referenced by grease_pencil_cursor_draw(), and project_brush_radius_grease_pencil().
| void blender::ed::sculpt_paint::project_translations | ( | MutableSpan< float3 > | translations, |
| const float3 & | plane ) |
Align the translations with plane normal.
Definition at line 7638 of file sculpt.cc.
References blender::math::dot(), blender::Editor, blender::MutableSpan< T >::index_range(), blender::math::length_squared(), PRF_scope, project_translations(), and blender::math::rcp().
Referenced by project_translations().
|
static |
Definition at line 3362 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, brush_type_is_paint(), blender::SculptSession::cache, blender::ed::sculpt_paint::undo::Color, blender::Editor, blender::ed::sculpt_paint::undo::FaceSet, blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::undo::Position, PRF_scope, blender::ed::sculpt_paint::undo::push_nodes(), push_undo_nodes(), blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_MASK, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::StrokeCache::supports_gravity, and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by do_brush_action(), and push_undo_nodes().
|
static |
Definition at line 972 of file sculpt.cc.
References blender::ed::sculpt_paint::SculptRakeData::follow_co, blender::ed::sculpt_paint::SculptRakeData::follow_dist, blender::interp_v3_v3v3(), blender::len_v3v3(), and rake_data_update().
Referenced by brush_delta_update(), and rake_data_update().
| float blender::ed::sculpt_paint::raycast_init | ( | ViewContext * | vc, |
| const float2 & | mval, | ||
| float3 & | r_ray_start, | ||
| float3 & | r_ray_end, | ||
| float3 & | r_ray_normal, | ||
| bool | original ) |
Definition at line 4471 of file sculpt.cc.
References blender::bke::pbvh::clip_ray_ortho(), blender::ViewContext::depsgraph, blender::math::distance(), blender::ED_view3d_win_to_origin(), blender::ED_view3d_win_to_segment_clipped(), blender::RegionView3D::is_persp, blender::math::normalize_and_get_length(), blender::ViewContext::obact, blender::bke::object::pbvh_get(), raycast_init(), blender::ViewContext::region, blender::ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::math::transform_point(), and blender::ViewContext::v3d.
Referenced by active_element_info_get(), cursor_geometry_info_update(), raycast_init(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), stroke_get_location_bvh_ex(), and vertex_is_occluded().
|
static |
Definition at line 5924 of file sculpt.cc.
References redo_empty_ui().
Referenced by redo_empty_ui(), and SCULPT_OT_brush_stroke().
| void blender::ed::sculpt_paint::remember_stroke_position | ( | CurvesSculpt & | curves_sculpt, |
| const float3 & | brush_position_wo ) |
Updates the position of the stroke so that it can be used by the orbit-around-selection navigation method.
Definition at line 339 of file sculpt_brush.cc.
References blender::CurvesSculpt::paint, remember_stroke_position(), and blender::bke::paint::stroke_set_location().
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point(), and remember_stroke_position().
|
static |
Definition at line 2187 of file draw_ops.cc.
References blender::geometry::grease_pencil_remove_points_and_split(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), remove_points_and_split_from_drawings(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::bke::greasepencil::Drawing::tag_topology_changed().
Referenced by remove_points_and_split_from_drawings().
|
static |
Definition at line 5201 of file sculpt.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::GSpan::data(), blender::GVArrayCommon::get_internal_span(), blender::bke::subdiv::init(), blender::GVArrayCommon::is_span(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::remove(), replace_attribute(), blender::bke::GAttributeReader::sharing_info, and blender::bke::GAttributeReader::varray.
Referenced by replace_attribute(), and store_mesh_from_eval().
| void blender::ed::sculpt_paint::report_cyclic_not_supported | ( | ReportList * | reports | ) |
Definition at line 434 of file sculpt_brush.cc.
References blender::BKE_report(), report_cyclic_not_supported(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::CutOperationExecutor::execute(), and report_cyclic_not_supported().
| void blender::ed::sculpt_paint::report_empty_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 409 of file sculpt_brush.cc.
References blender::BKE_report(), report_empty_evaluated_surface(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and report_empty_evaluated_surface().
| void blender::ed::sculpt_paint::report_empty_original_surface | ( | ReportList * | reports | ) |
Definition at line 404 of file sculpt_brush.cc.
References blender::BKE_report(), report_empty_original_surface(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and report_empty_original_surface().
| void blender::ed::sculpt_paint::report_invalid_uv_map | ( | ReportList * | reports | ) |
Definition at line 429 of file sculpt_brush.cc.
References blender::BKE_report(), report_invalid_uv_map(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), and report_invalid_uv_map().
| void blender::ed::sculpt_paint::report_missing_surface | ( | ReportList * | reports | ) |
Definition at line 414 of file sculpt_brush.cc.
References blender::BKE_report(), report_missing_surface(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and report_missing_surface().
| void blender::ed::sculpt_paint::report_missing_uv_map_on_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 424 of file sculpt_brush.cc.
References blender::BKE_report(), report_missing_uv_map_on_evaluated_surface(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and report_missing_uv_map_on_evaluated_surface().
| void blender::ed::sculpt_paint::report_missing_uv_map_on_original_surface | ( | ReportList * | reports | ) |
Definition at line 419 of file sculpt_brush.cc.
References blender::BKE_report(), report_missing_uv_map_on_original_surface(), and blender::RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and report_missing_uv_map_on_original_surface().
| void blender::ed::sculpt_paint::reset_translations_to_original | ( | MutableSpan< float3 > | translations, |
| Span< float3 > | positions, | ||
| Span< float3 > | orig_positions ) |
Cancel out translations already applied over the course of the operation from the new translations. This is used for tools that calculate new positions based on the original positions for the entirety of an operation. Conceptually this is the same as resetting the positions before each step of the operation, but combining that into the same loop should be preferable for performance.
Definition at line 7572 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, reset_translations_to_original(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), and reset_translations_to_original().
|
static |
Definition at line 4998 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, blender::SculptSession::cache, blender::Editor, ELEM, blender::ed::sculpt_paint::StrokeCache::layer_displacement_factor, blender::Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::paint_brush, PRF_scope, blender::ed::sculpt_paint::undo::restore_from_undo_step(), restore_from_undo_step_if_necessary(), blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_THUMB, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by restore_from_undo_step_if_necessary(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 333 of file brush_asset_ops.cc.
References blender::ed::asset::library_reference_to_rna_enum_itemf(), and rna_asset_library_reference_itemf().
Referenced by BRUSH_OT_asset_save_as(), and rna_asset_library_reference_itemf().
|
static |
Definition at line 78 of file paint_cursor.cc.
References blender::MTex::brush_map_mode, blender::MTEX_MAP_MODE_STENCIL, blender::MTEX_MAP_MODE_TILED, blender::ViewContext::region, same_tex_snap(), snap(), blender::ARegion::winx, and blender::ARegion::winy.
Referenced by load_tex(), and same_tex_snap().
|
static |
Definition at line 394 of file paint_sample_color.cc.
References blender::data, float, and sample_average_color().
Referenced by sample_average_color(), sample_color_exec(), sample_color_invoke(), and sample_color_modal().
|
static |
Definition at line 406 of file paint_sample_color.cc.
References apply_sampled_color(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), C, color_supported_check(), blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, ELEM, NA_EDITED, NC_BRUSH, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, paint_sample_color(), blender::PAINT_SHOW_BRUSH, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RNA_int_get_array(), sample_average_color(), sample_color_exec(), blender::Sculpt, blender::Vertex, blender::ARegion::winx, blender::ARegion::winy, blender::WM_event_add_notifier(), blender::WM_paint_cursor_tag_redraw(), and blender::WM_redraw_windows().
Referenced by PAINT_OT_sample_color(), and sample_color_exec().
|
static |
Definition at line 451 of file paint_sample_color.cc.
References apply_sampled_color(), blender::BKE_brush_color_get(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), C, color_supported_check(), blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, ELEM, blender::wmEvent::mval, NA_EDITED, NC_BRUSH, blender::OPERATOR_CANCELLED, blender::OPERATOR_RUNNING_MODAL, paint_sample_color(), blender::PAINT_SHOW_BRUSH, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RNA_int_set_array(), sample_average_color(), sample_color_invoke(), sample_color_update_header(), blender::Sculpt, blender::wmEvent::type, blender::Vertex, blender::ARegion::winx, blender::ARegion::winy, blender::WM_CURSOR_EYEDROPPER, blender::WM_cursor_modal_set(), blender::WM_event_add_modal_handler(), blender::WM_event_add_notifier(), blender::WM_paint_cursor_tag_redraw(), blender::WM_redraw_windows(), and blender::WM_userdef_event_type_from_keymap_type().
Referenced by PAINT_OT_sample_color(), and sample_color_invoke().
|
static |
Definition at line 504 of file paint_sample_color.cc.
References apply_sampled_color(), blender::BKE_brush_color_set(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), C, blender::CTX_data_main(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::wmOperator::customdata, blender::data, blender::ED_workspace_status_text(), blender::KM_PRESS, blender::KM_RELEASE, blender::LEFTMOUSE, blender::MOUSEMOVE, blender::wmEvent::mval, NA_EDITED, NC_BRUSH, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, paint_sample_color(), blender::PAINT_SHOW_BRUSH, blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RNA_boolean_set(), blender::RNA_int_set_array(), blender::RPT_INFO, sample_average_color(), sample_color_modal(), sample_color_update_header(), blender::wmEvent::type, blender::wmEvent::val, blender::ARegion::winx, blender::ARegion::winy, blender::WM_cursor_modal_restore(), and blender::WM_event_add_notifier().
Referenced by PAINT_OT_sample_color(), and sample_color_modal().
|
static |
Definition at line 566 of file paint_sample_color.cc.
References C, blender::G, blender::ed::greasepencil::grease_pencil_painting_poll(), blender::ed::greasepencil::grease_pencil_vertex_painting_poll(), blender::image_paint_poll_ignore_tool(), sample_color_poll(), sculpt_mode_poll(), and blender::vertex_paint_poll_ignore_tool().
Referenced by PAINT_OT_sample_color(), and sample_color_poll().
|
static |
Definition at line 379 of file paint_sample_color.cc.
References C, blender::CTX_wm_area(), blender::data, blender::ED_workspace_status_text(), IFACE_, sample_color_update_header(), SNPRINTF_UTF8, and UI_MAX_DRAW_STR.
Referenced by sample_color_invoke(), sample_color_modal(), and sample_color_update_header().
| std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_3d_brush | ( | const Depsgraph & | depsgraph, |
| const ARegion & | region, | ||
| const View3D & | v3d, | ||
| const RegionView3D & | rv3d, | ||
| const Object & | curves_object, | ||
| const float2 & | brush_pos_re, | ||
| const float | brush_radius_re ) |
Find 3d brush position based on cursor position for curves sculpting.
Definition at line 174 of file sculpt_brush.cc.
References blender::BKE_object_get_evaluated_mesh(), blender::BKE_object_visibility(), blender::Object::data, blender::DEG_get_evaluated(), blender::DEG_get_mode(), blender::dist_to_line_v3(), blender::math::distance(), blender::ED_view3d_win_to_segment_clipped(), find_curves_brush_position(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::math::invert(), blender::math::normalize(), blender::OB_VISIBLE_SELF, blender::ed::sculpt_paint::CurvesBrush3D::position_cu, blender::bke::crazyspace::GeometryDeformation::positions, blender::ed::sculpt_paint::CurvesBrush3D::radius_cu, blender::bke::bvh::Tree::ray_intersect(), sample_curves_3d_brush(), blender::math::transform_point(), and XRAY_ENABLED.
Referenced by blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point(), and sample_curves_3d_brush().
| std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_surface_3d_brush | ( | const Depsgraph & | depsgraph, |
| const ARegion & | region, | ||
| const View3D & | v3d, | ||
| const CurvesSurfaceTransforms & | transforms, | ||
| const bke::bvh::Tree & | surface_bvh, | ||
| const float2 & | brush_pos_re, | ||
| const float | brush_radius_re ) |
Definition at line 266 of file sculpt_brush.cc.
References blender::dist_to_line_v3(), blender::ED_view3d_win_to_segment_clipped(), blender::bke::bvh::Tree::ray_intersect(), sample_curves_surface_3d_brush(), blender::bke::CurvesSurfaceTransforms::surface_to_curves, blender::math::transform_point(), blender::bke::CurvesSurfaceTransforms::world_to_curves, and blender::bke::CurvesSurfaceTransforms::world_to_surface.
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), sample_curves_surface_3d_brush(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and use_add_density_mode().
|
static |
Definition at line 256 of file paint_sample_color.cc.
References blender::ed::sculpt_paint::color::active_color_attribute(), active_element_info_get(), blender::ed::sculpt_paint::color::color_corner_get(), blender::ed::sculpt_paint::color::color_vert_get(), blender::bke::Corner, blender::data, blender::bke::GAttributeReader::domain, blender::bke::mesh::face_find_corner_from_vert(), blender::bke::Point, and sample_mesh_attribute_color().
Referenced by paint_sample_color(), and sample_mesh_attribute_color().
|
static |
Definition at line 154 of file paint_sample_color.cc.
References bary_coord, blender::BKE_image_acquire_ibuf(), blender::BKE_image_get_tile_from_pos(), blender::BKE_image_release_ibuf(), blender::BKE_imageuser_default(), blender::BKE_object_get_evaluated_mesh(), blender::BKE_object_material_get(), blender::BKE_texpaint_slot_refresh_cache(), BLI_SCOPED_DEFER, blender::ImBuf::byte_buffer, blender::ImBuf::byte_data(), blender::ImagePaintSettings::canvas, blender::math::clamp(), blender::ImBufByteBuffer::colorspace, blender::ImBuf::colorspace_is_data(), blender::DEG_get_evaluated(), blender::bke::Face, blender::ImBuf::float_data(), blender::ImageUser::framenr, blender::IMA_SRC_TILED, IMAGEPAINT_MODE_MATERIAL, blender::ToolSettings::imapaint, imapaint_pick_face(), imapaint_pick_uv(), blender::IMB_colormanagement_colorspace_to_scene_linear_v3(), blender::ImagePaintSettings::interp, interp(), blender::imbuf::interpolate_bilinear_wrap_byte(), blender::imbuf::interpolate_bilinear_wrap_fl(), blender::imbuf::interpolate_nearest_wrap_byte(), blender::imbuf::interpolate_nearest_wrap_fl(), blender::bke::AttributeAccessor::lookup_or_default(), blender::ImagePaintSettings::mode, blender::rgba_uchar_to_float(), sample_texture_paint_color(), blender::SHD_INTERP_CLOSEST, blender::SHD_INTERP_LINEAR, blender::straight_to_premul_v4(), blender::ImageUser::tile, blender::Scene::toolsettings, blender::v, blender::ImBuf::x, and blender::ImBuf::y.
Referenced by paint_sample_color(), and sample_texture_paint_color().
|
static |
Definition at line 121 of file paint_image_2d_curve_mask.cc.
References blender::CurveMaskCache::last_curve_timestamp, blender::CurveMaskCache::sampled_curve, and sampled_curve_free().
Referenced by blender::paint_curve_mask_cache_free_data(), and sampled_curve_free().
| void blender::ed::sculpt_paint::scale_factors | ( | MutableSpan< float > | factors, |
| float | strength ) |
Definition at line 7856 of file sculpt.cc.
References blender::Editor, PRF_scope, and scale_factors().
Referenced by 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::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_wpaint_brush_draw(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_factors(), scale_factors(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), and blender::vpaint_do_draw().
| void blender::ed::sculpt_paint::scale_factors | ( | MutableSpan< float > | factors, |
| Span< float > | strengths ) |
Definition at line 7867 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, scale_factors(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::scale_translations | ( | MutableSpan< float3 > | translations, |
| float | factor ) |
Definition at line 7845 of file sculpt.cc.
References blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, and scale_translations().
| void blender::ed::sculpt_paint::scale_translations | ( | MutableSpan< float3 > | translations, |
| Span< float > | factors ) |
Definition at line 7837 of file sculpt.cc.
References blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, and scale_translations().
Referenced by 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::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_translations(), scale_translations(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| void blender::ed::sculpt_paint::scatter_data_bmesh | ( | Span< T > | node_data, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< T > | dst ) |
Definition at line 6577 of file sculpt.cc.
References blender::BLI_assert(), BM_elem_index_get, blender::Editor, PRF_scope, scatter_data_bmesh(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), scatter_data_bmesh(), scatter_data_bmesh< float >(), and scatter_data_bmesh< float3 >().
| template void blender::ed::sculpt_paint::scatter_data_bmesh< float > | ( | Span< float > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float > | ) |
References scatter_data_bmesh().
| template void blender::ed::sculpt_paint::scatter_data_bmesh< float3 > | ( | Span< float3 > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float3 > | ) |
References scatter_data_bmesh().
| void blender::ed::sculpt_paint::scatter_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| Span< T > | node_data, | ||
| Span< int > | grids, | ||
| MutableSpan< T > | dst ) |
Definition at line 6560 of file sculpt.cc.
References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::MutableSpan< T >::copy_from(), blender::Editor, blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), PRF_scope, scatter_data_grids(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::ed::sculpt_paint::mask::apply_new_mask_grids(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), scatter_data_grids(), scatter_data_grids< float >(), scatter_data_grids< float3 >(), and blender::ed::sculpt_paint::mask::scatter_mask_grids().
| template void blender::ed::sculpt_paint::scatter_data_grids< float > | ( | const SubdivCCG & | , |
| Span< float > | , | ||
| Span< int > | , | ||
| MutableSpan< float > | ) |
References scatter_data_grids().
| template void blender::ed::sculpt_paint::scatter_data_grids< float3 > | ( | const SubdivCCG & | , |
| Span< float3 > | , | ||
| Span< int > | , | ||
| MutableSpan< float3 > | ) |
References scatter_data_grids().
| void blender::ed::sculpt_paint::scatter_data_mesh | ( | Span< T > | src, |
| Span< int > | indices, | ||
| MutableSpan< T > | dst ) |
Scatter data from an array of the node's data to the referenced geometry vertices.
Definition at line 135 of file mesh_brush_common.hh.
References blender::Editor, PRF_scope, blender::array_utils::scatter(), scatter_data_mesh(), and blender::exec_mode::serial.
Referenced by blender::ed::sculpt_paint::cloth::apply_grab_brush(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::mask::apply_new_mask_mesh(), blender::ed::sculpt_paint::cloth::apply_snake_hook_brush(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), scatter_data_mesh(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().
|
static |
Definition at line 556 of file mesh/paint_cursor.cc.
References blender::SculptSession::active_vert_index(), blender::BKE_sculptsession_update_for_edit(), blender::bm, blender::SculptSession::bm, blender::BM_vert_at_index(), blender::bke::pbvh::BMesh, boundary_preview_pivot_draw(), boundary_preview_update(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BMVert::co, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), blender::SculptSession::expand_cache, get_active_vertex_position(), blender::bke::pbvh::Grids, blender::immUniformColor3fvAlpha(), blender::ed::sculpt_paint::expand::Cache::initial_active_vert, blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::bke::object::pbvh_get(), point_with_symmetry_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, pose_brush_origins_draw(), blender::SculptSession::pose_ik_chain_preview, position, blender::SubdivCCG::positions, blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, blender::ed::sculpt_paint::pose::preview_ik_chain_init(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::region, screen_space_overlays_draw(), screen_space_point_draw(), blender::Sculpt, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_POSE, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::PaintCursorContext::vc, and blender::bke::pbvh::vert_positions_eval().
Referenced by mesh_cursor_inactive_draw(), and screen_space_overlays_draw().
|
static |
Definition at line 331 of file mesh/paint_cursor.cc.
References blender::copy_v3_v3(), blender::ED_view3d_project_v3(), blender::imm_draw_circle_fill_3d(), blender::mul_m4_v3(), and screen_space_point_draw().
Referenced by boundary_preview_pivot_draw(), point_with_symmetry_draw(), pose_brush_origins_draw(), screen_space_overlays_draw(), screen_space_point_draw(), and tiling_preview_draw().
|
static |
Test whether the #StrokeCache.sculpt_normal needs update in do_brush_action
Definition at line 943 of file sculpt.cc.
References blender::BKE_brush_has_cube_tip(), blender::BKE_brush_mask_texture_get(), blender::MTex::brush_map_mode, blender::BRUSH_PROJECT_RAY_DIRECTION_PLANE_NORMAL, brush_uses_topology_rake(), blender::SculptSession::cache, ELEM, blender::ed::sculpt_paint::StrokeToggleSettings::invert, blender::MTEX_MAP_MODE_AREA, blender::bke::brush::normal_weight_get(), blender::Sculpt, sculpt_brush_needs_normal(), blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_THUMB, blender::bke::brush::supports_normal_weight(), blender::MTex::tex, and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by do_brush_action(), and sculpt_brush_needs_normal().
|
static |
Definition at line 5895 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), blender::BLI_assert(), C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::wmOperator::customdata, blender::Sculpt::paint, blender::ed::sculpt_paint::undo::restore_from_undo_step(), blender::ToolSettings::sculpt, sculpt_brush_stroke_cancel(), blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), and UNUSED_VARS_NDEBUG.
Referenced by sculpt_brush_stroke_cancel(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 5881 of file sculpt.cc.
References brush_stroke_init(), C, blender::wmOperator::customdata, blender::ed::sculpt_paint::PaintStroke::exec(), blender::OPERATOR_FINISHED, and sculpt_brush_stroke_exec().
Referenced by sculpt_brush_stroke_exec(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 5785 of file sculpt.cc.
References blender::BKE_base_is_visible(), blender::BKE_paint_brush(), blender::BKE_report(), blender::BKE_sculpt_mask_layers_ensure(), blender::BKE_sculpt_multires_active(), blender::BLI_assert(), brush_stroke_init(), brush_type_is_attribute_only(), brush_type_is_mask(), brush_type_is_paint(), C, blender::ed::sculpt_paint::PaintStroke::cancel(), color_supported_check(), blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_view3d(), blender::wmOperator::customdata, ELEM, face_set_overlay_check(), blender::ed::sculpt_paint::PaintStroke::finish(), float, blender::bke::pbvh::Grids, mask_overlay_check(), blender::wmOperatorType::modal, blender::wmEvent::mval, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_PASS_THROUGH, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, over_mesh(), blender::Sculpt::paint, blender::bke::object::pbvh_get(), blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RPT_ERROR, blender::ToolSettings::sculpt, sculpt_brush_stroke_invoke(), blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, shape_key_check(), blender::wmOperator::type, blender::WM_event_add_modal_handler(), and blender::WM_event_tablet_data().
Referenced by sculpt_brush_stroke_invoke(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 3395 of file sculpt.cc.
References blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_INFLATE, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, sculpt_brush_type_name(), blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SMOOTH, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, and blender::SCULPT_BRUSH_TYPE_THUMB.
Referenced by do_brush_action(), sculpt_brush_type_name(), and blender::ed::sculpt_paint::SculptPaintStroke::test_start().
|
static |
Definition at line 294 of file curves/sculpt_ops.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::paint_stroke_operator_properties(), SCULPT_CURVES_OT_brush_stroke(), sculpt_curves_stroke_cancel(), sculpt_curves_stroke_invoke(), and sculpt_curves_stroke_modal().
Referenced by blender::ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 1161 of file curves/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_poll(), blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_DEPENDS_ON_CURSOR, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, and SCULPT_CURVES_OT_min_distance_edit().
Referenced by blender::ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_min_distance_edit().
|
static |
Definition at line 808 of file curves/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::ed::curves::editable_curves_poll(), blender::wmOperatorType::flag, FLT_MAX, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::PROP_DISTANCE, blender::RNA_def_float(), blender::RNA_def_property_subtype(), SCULPT_CURVES_OT_select_grow(), blender::ed::sculpt_paint::select_grow::select_grow_invoke(), blender::ed::sculpt_paint::select_grow::select_grow_modal(), and blender::wmOperatorType::srna.
Referenced by blender::ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_select_grow().
|
static |
Definition at line 507 of file curves/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::ed::curves::editable_curves_poll(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, INT32_MAX, INT32_MIN, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::RNA_def_boolean(), blender::RNA_def_float(), blender::RNA_def_int(), SCULPT_CURVES_OT_select_random(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::ed::sculpt_paint::select_random::select_random_ui(), blender::wmOperatorType::srna, and blender::wmOperatorType::ui.
Referenced by blender::ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_select_random().
|
static |
Definition at line 285 of file curves/sculpt_ops.cc.
References C, blender::ed::sculpt_paint::PaintStroke::cancel(), blender::wmOperator::customdata, and sculpt_curves_stroke_cancel().
Referenced by SCULPT_CURVES_OT_brush_stroke(), and sculpt_curves_stroke_cancel().
|
static |
Definition at line 243 of file curves/sculpt_ops.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_paintmode(), C, blender::CTX_data_scene(), blender::wmOperator::customdata, blender::ed::sculpt_paint::PaintStroke::finish(), blender::wmOperatorType::modal, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, sculpt_curves_stroke_invoke(), blender::SculptCurves, blender::wmOperator::type, and blender::WM_event_add_modal_handler().
Referenced by SCULPT_CURVES_OT_brush_stroke(), and sculpt_curves_stroke_invoke().
|
static |
Definition at line 272 of file curves/sculpt_ops.cc.
References C, blender::wmOperator::customdata, ELEM, blender::ed::sculpt_paint::PaintStroke::modal(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, and sculpt_curves_stroke_modal().
Referenced by SCULPT_CURVES_OT_brush_stroke(), and sculpt_curves_stroke_modal().
|
static |
Definition at line 4418 of file sculpt.cc.
References blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::FindNearestToRayData::corner_tris, blender::ed::sculpt_paint::FindNearestToRayData::corner_verts, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, blender::ed::sculpt_paint::FindNearestToRayData::faces, blender::bke::pbvh::find_nearest_to_ray_node(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::FindNearestToRayData::hide_poly, blender::ed::sculpt_paint::FindNearestToRayData::hit, blender::ed::sculpt_paint::FindNearestToRayData::is_mid_stroke, blender::bke::pbvh::Mesh, node, blender::ed::sculpt_paint::FindNearestToRayData::object, orig_position_data_lookup_grids(), orig_position_data_lookup_mesh_all_verts(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::FindNearestToRayData::ray_normal, blender::ed::sculpt_paint::FindNearestToRayData::ray_start, sculpt_find_nearest_to_ray_cb(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::ed::sculpt_paint::FindNearestToRayData::use_original, and blender::ed::sculpt_paint::FindNearestToRayData::vert_positions.
Referenced by sculpt_find_nearest_to_ray_cb(), and stroke_get_location_bvh_ex().
Noise texture gives different values for the same input coord; this can tear a multi-resolution mesh during sculpting so do a stitch in this case.
Definition at line 3789 of file sculpt.cc.
References blender::BKE_brush_mask_texture_get(), blender::BKE_paint_brush_for_read(), blender::SculptSession::multires_modifier, blender::multires_stitch_grids(), blender::Sculpt::paint, blender::Object::runtime, blender::Sculpt, sculpt_fix_noise_tear(), blender::bke::ObjectRuntime::sculpt_session, blender::MTex::tex, blender::TEX_NOISE, and blender::Tex::type.
Referenced by sculpt_fix_noise_tear(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 3880 of file sculpt.cc.
References blender::SculptSession::cache, blender::ClipX, blender::eModifierMode_Realtime, blender::eModifierType_Mirror, blender::MirrorModifierData::flag, blender::MatBase< float, 4, 4 >::identity(), blender::math::invert(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, blender::MirrorModifierData::mirror_ob, blender::MOD_MIR_AXIS_X, blender::MOD_MIR_CLIPPING, blender::ModifierData::mode, blender::Object::modifiers, blender::mul_m4_m4m4(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), sculpt_init_mirror_clipping(), blender::MirrorModifierData::tolerance, and blender::ModifierData::type.
Referenced by sculpt_init_mirror_clipping(), and stroke_cache_init().
|
static |
Definition at line 1048 of file paint_stroke.cc.
References blender::BRUSH_CLOTH_DEFORM_GRAB, blender::Brush::cloth_deform_type, ELEM, blender::Brush::sculpt_brush_type, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, and sculpt_is_grab_tool().
Referenced by paint_supports_dynamic_tex_coords(), paint_supports_smooth_stroke(), and sculpt_is_grab_tool().
| bool blender::ed::sculpt_paint::sculpt_mode_and_brush_poll | ( | bContext * | C | ) |
Checks for a brush, not just sculpt mode.
Definition at line 3811 of file sculpt.cc.
References C, paint_brush_tool_poll(), sculpt_mode_and_brush_poll(), and sculpt_mode_poll().
Referenced by sculpt_mode_and_brush_poll(), and SCULPT_OT_brush_stroke().
| bool blender::ed::sculpt_paint::sculpt_mode_poll | ( | bContext * | C | ) |
Definition at line 3800 of file sculpt.cc.
References C, blender::CTX_data_active_object(), blender::Object::mode, blender::OB_MODE_SCULPT, and sculpt_mode_poll().
Referenced by brush_cursor_poll(), blender::ED_keymap_paint(), no_multires_poll(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill(), sample_color_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_constant_or_manual_detail_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_dynamic_topology_poll(), sculpt_mode_and_brush_poll(), sculpt_mode_poll(), sculpt_mode_poll_view3d(), blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter(), blender::ed::sculpt_paint::color::SCULPT_OT_color_filter(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_boundary(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_cavity(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init(), blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), and SCULPT_OT_set_persistent_base().
| bool blender::ed::sculpt_paint::sculpt_mode_poll_view3d | ( | bContext * | C | ) |
Definition at line 3806 of file sculpt.cc.
References C, blender::CTX_wm_region_view3d(), sculpt_mode_poll(), and sculpt_mode_poll_view3d().
Referenced by blender::ed::sculpt_paint::hide::PAINT_OT_hide_show(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_all(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_lasso_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_line_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_masked(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_polyline_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_box_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_lasso_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_line_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_polyline_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_filter(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_invert(), sculpt_mode_poll_view3d(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), SCULPT_OT_set_pivot_position(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture(), and blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture().
|
static |
Definition at line 459 of file mesh/sculpt_ops.cc.
References blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), C, blender::CTX_data_depsgraph_on_load(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::CTX_wm_manager(), blender::CTX_wm_message_bus(), blender::Object::data, blender::Object::id, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, blender::Object::mode, blender::ed::object::mode_compat_set(), NC_SCENE, ND_MODE, blender::OB_MODE_SCULPT, object_sculpt_mode_enter(), object_sculpt_mode_exit(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_enter_sculpt_mode(), blender::wmOperator::reports, sculpt_mode_toggle_exec(), blender::WM_event_add_notifier(), WM_msg_publish_rna_prop, and blender::WM_toolsystem_update_from_context_view3d().
Referenced by sculpt_mode_toggle_exec(), and SCULPT_OT_sculptmode_toggle().
| void blender::ed::sculpt_paint::SCULPT_OT_brush_stroke | ( | wmOperatorType * | ot | ) |
Definition at line 5926 of file sculpt.cc.
References brush_stroke_modal(), blender::wmOperatorType::cancel, blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_BLOCKING, blender::paint_stroke_operator_properties(), blender::wmOperatorType::poll, blender::PROP_HIDDEN, blender::PROP_SKIP_SAVE, redo_empty_ui(), blender::RNA_def_boolean(), blender::RNA_def_property_flag(), sculpt_brush_stroke_cancel(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_mode_and_brush_poll(), SCULPT_OT_brush_stroke(), blender::wmOperatorType::srna, and blender::wmOperatorType::ui.
Referenced by operatortypes_sculpt(), and SCULPT_OT_brush_stroke().
| void blender::ed::sculpt_paint::SCULPT_OT_face_set_extract | ( | wmOperatorType * | ot | ) |
Definition at line 365 of file sculpt_mask_extract.cc.
References blender::wmOperatorType::description, face_set_extract_invoke(), blender::wmOperatorType::flag, geometry_extract_poll(), geometry_extract_props(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::OPTYPE_DEPENDS_ON_CURSOR, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, SCULPT_OT_face_set_extract(), and blender::wmOperatorType::srna.
Referenced by operatortypes_sculpt(), and SCULPT_OT_face_set_extract().
|
static |
Definition at line 184 of file mesh/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, optimize_exec(), blender::OPTYPE_REGISTER, blender::wmOperatorType::poll, sculpt_mode_poll(), and SCULPT_OT_optimize().
Referenced by operatortypes_sculpt(), and SCULPT_OT_optimize().
| void blender::ed::sculpt_paint::SCULPT_OT_paint_mask_extract | ( | wmOperatorType * | ot | ) |
Definition at line 313 of file sculpt_mask_extract.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, geometry_extract_poll(), geometry_extract_props(), blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, paint_mask_extract_exec(), paint_mask_extract_invoke(), blender::wmOperatorType::poll, blender::RNA_def_float_factor(), SCULPT_OT_paint_mask_extract(), and blender::wmOperatorType::srna.
Referenced by operatortypes_sculpt(), and SCULPT_OT_paint_mask_extract().
| void blender::ed::sculpt_paint::SCULPT_OT_paint_mask_slice | ( | wmOperatorType * | ot | ) |
Definition at line 527 of file sculpt_mask_extract.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, geometry_extract_poll(), blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, paint_mask_slice_exec(), blender::wmOperatorType::poll, blender::PROP_SKIP_SAVE, blender::RNA_def_boolean(), blender::RNA_def_float(), blender::RNA_def_property_flag(), SCULPT_OT_paint_mask_slice(), and blender::wmOperatorType::srna.
Referenced by operatortypes_sculpt(), and SCULPT_OT_paint_mask_slice().
|
static |
Definition at line 510 of file mesh/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::ED_operator_object_active_editable_mesh_from_view_layer(), blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, sculpt_mode_toggle_exec(), and SCULPT_OT_sculptmode_toggle().
Referenced by operatortypes_sculpt(), and SCULPT_OT_sculptmode_toggle().
|
static |
Definition at line 150 of file mesh/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, sculpt_mode_poll(), SCULPT_OT_set_persistent_base(), and set_persistent_base_exec().
Referenced by operatortypes_sculpt(), and SCULPT_OT_set_persistent_base().
| void blender::ed::sculpt_paint::SCULPT_OT_set_pivot_position | ( | wmOperatorType * | ot | ) |
Definition at line 1026 of file sculpt_transform.cc.
References blender::wmOperatorType::depends_on_cursor, blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, FLT_MAX, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::wmOperatorType::poll_property, prop_sculpt_pivot_position_types, blender::RNA_def_enum(), blender::RNA_def_float(), sculpt_mode_poll_view3d(), SCULPT_OT_set_pivot_position(), set_pivot_depends_on_cursor(), set_pivot_position_exec(), set_pivot_position_invoke(), set_pivot_position_poll_property(), blender::wmOperatorType::srna, and Unmasked.
Referenced by operatortypes_sculpt(), and SCULPT_OT_set_pivot_position().
|
static |
Definition at line 296 of file mesh/sculpt_ops.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::idname, blender::wmOperatorType::name, no_multires_poll(), blender::wmOperatorType::poll, blender::RNA_def_float(), blender::RNA_def_property_ui_range(), SCULPT_OT_symmetrize(), blender::wmOperatorType::srna, and symmetrize_exec().
Referenced by operatortypes_sculpt(), and SCULPT_OT_symmetrize().
|
static |
Align the grab delta to the brush normal.
| grab_delta | Typically from ss.cache->grab_delta_symmetry. |
Definition at line 696 of file sculpt.cc.
References blender::dot_v3v3(), fabsf, FLT_EPSILON, blender::madd_v3_v3fl(), blender::mul_v3_fl(), blender::project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, sculpt_project_v3_normal_align(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by grab_delta_get(), and sculpt_project_v3_normal_align().
|
static |
Definition at line 4320 of file sculpt.cc.
References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::BKE_subdiv_ccg_key_top_level(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::ed::sculpt_paint::RaycastData::depth, distance(), blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Node::FullyHidden, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::bke::pbvh::Mesh, node, blender::bke::pbvh::node_raycast_bmesh(), blender::bke::pbvh::node_raycast_grids(), blender::bke::pbvh::node_raycast_mesh(), blender::ed::sculpt_paint::RaycastData::object, orig_position_data_lookup_grids(), orig_position_data_lookup_mesh_all_verts(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SubdivCCGCoord::to_index(), blender::ed::sculpt_paint::RaycastData::use_original, and blender::ed::sculpt_paint::RaycastData::vert_positions.
Referenced by active_element_info_get(), cursor_geometry_info_update(), sculpt_raycast_cb(), stroke_get_location_bvh_ex(), and vertex_is_occluded().
|
static |
Definition at line 304 of file sculpt_transform.cc.
References blender::bke::pbvh::BMesh, blender::Object::data, blender::SculptSession::filter_cache, blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::SubdivCCG::grid_area, blender::bke::pbvh::Grids, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::filter::Cache::node_mask, blender::bke::object::pbvh_get(), blender::SubdivCCG::positions, blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, sculpt_transform_all_vertices(), blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, transform_matrices_init(), transform_node_bmesh(), transform_node_grids(), transform_node_mesh(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), and blender::bke::pbvh::update_node_bounds_mesh().
Referenced by sculpt_transform_all_vertices(), and update_modal_transform().
|
static |
Definition at line 1544 of file draw_ops.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::bke::MutableAttributeAccessor::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::attribute_filter_from_skip_ref(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_brush_color_get(), blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::copy_v3_v3(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_range(), blender::bke::fill_attribute_range_default(), blender::bke::SpanAttributeWriter< T >::finish(), blender::GP_BRUSH_USE_STROKE, blender::ToolSettings::gp_paint, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::ed::greasepencil::opacity_from_input_sample(), blender::bke::Point, blender::bke::CurvesGeometry::points_range(), blender::bke::CurvesGeometry::positions(), blender::ed::greasepencil::radius_from_input_sample(), blender::ViewContext::region, blender::ViewContext::rv3d, set_fill_attributes(), blender::bke::SpanAttributeWriter< T >::span, and blender::Scene::toolsettings.
Referenced by grease_pencil_apply_fill(), and set_fill_attributes().
|
static |
Definition at line 87 of file mesh/sculpt_ops.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::BKE_base_is_visible(), blender::BKE_sculptsession_update_for_edit(), blender::bke::pbvh::BMesh, C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_wm_view3d(), blender::Object::data, blender::VArray< T >::from_span(), blender::SubdivCCG::grid_size, blender::bke::pbvh::Grids, blender::SubdivCCG::grids_num, blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::SubdivCCG::normals, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::bke::object::pbvh_get(), blender::SculptSession::persistent, blender::bke::Point, blender::SubdivCCG::positions, blender::bke::MutableAttributeAccessor::remove(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, set_persistent_base_exec(), blender::bke::AttributeReader< T >::sharing_info, blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::SculptSession::subdiv_ccg, blender::bke::AttributeReader< T >::varray, and blender::bke::pbvh::vert_normals_eval().
Referenced by SCULPT_OT_set_persistent_base(), and set_persistent_base_exec().
|
static |
Definition at line 683 of file sculpt_transform.cc.
References ActiveVert, CursorSurface, ELEM, blender::RNA_enum_get(), and set_pivot_depends_on_cursor().
Referenced by SCULPT_OT_set_pivot_position(), and set_pivot_depends_on_cursor().
|
static |
Definition at line 958 of file sculpt_transform.cc.
References blender::SculptSession::active_vert_position(), ActiveVert, average_mask_border_position(), average_unmasked_position(), blender::BKE_base_is_visible(), blender::BKE_sculptsession_update_for_edit(), C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_wm_view3d(), cursor_geometry_info_update(), CursorSurface, finish_pivot_change(), MaskBorder, mesh_symmetry_xyz_get(), blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, Origin, blender::SculptSession::pivot_pos, blender::wmOperator::ptr, blender::RNA_enum_get(), blender::RNA_float_get(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, set_pivot_position_exec(), stroke_get_location_bvh(), and Unmasked.
Referenced by SCULPT_OT_set_pivot_position(), set_pivot_position_exec(), and set_pivot_position_invoke().
|
static |
Definition at line 1006 of file sculpt_transform.cc.
References C, blender::wmEvent::mval, blender::wmOperator::ptr, blender::RNA_float_set(), set_pivot_position_exec(), and set_pivot_position_invoke().
Referenced by SCULPT_OT_set_pivot_position(), and set_pivot_position_invoke().
|
static |
Definition at line 1015 of file sculpt_transform.cc.
References ActiveVert, CursorSurface, ELEM, blender::wmOperator::ptr, blender::RNA_enum_get(), blender::RNA_property_identifier(), set_pivot_position_poll_property(), and STRPREFIX.
Referenced by SCULPT_OT_set_pivot_position(), and set_pivot_position_poll_property().
| bool blender::ed::sculpt_paint::shape_key_check | ( | const Object & | ob, |
| ReportList * | reports ) |
Checks if the currently active shape key is able to be sculpted on.
If the active shape key is either muted or locked, an error message will be reported, unless reports is null.
Definition at line 134 of file sculpt.cc.
References blender::BKE_reportf(), blender::KeyBlock::flag, blender::Object::id, blender::KEYBLOCK_LOCKED_SHAPE, blender::KEYBLOCK_MUTE, blender::ID::name, blender::RPT_ERROR, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, shape_key_check(), and blender::SculptSession::shapekey_active.
Referenced by blender::ed::transform::createTransSculpt(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), and shape_key_check().
|
static |
Definition at line 1524 of file draw_ops.cc.
References blender::IndexMask::from_predicate(), blender::math::pow(), blender::return, simplify_fixed(), and step.
Referenced by grease_pencil_apply_fill(), and simplify_fixed().
|
static |
Definition at line 379 of file sculpt_mask_extract.cc.
References blender::BLI_assert(), blender::bm, blender::BM_EDGE, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_set, BM_elem_flag_test_bool, blender::BM_ELEM_HIDDEN, blender::BM_ELEM_TAG, blender::BM_FACE, blender::BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, blender::BM_mesh_delete_hflag_context(), blender::BM_mesh_edgenet(), blender::BM_mesh_elem_hflag_disable_all(), blender::BM_mesh_elem_hflag_enable_all(), blender::BM_mesh_normals_update(), blender::BM_VERT, blender::BM_VERTS_OF_FACE, BMO_FLAG_DEFAULTS, blender::BMO_FLAG_RESPECT_HIDE, blender::BMO_op_callf(), blender::CD_PROP_FLOAT, blender::CustomData_get_offset_named(), blender::DEL_FACES, invert(), slice_paint_mask(), blender::v, and blender::BMesh::vdata.
Referenced by paint_mask_slice_exec(), and slice_paint_mask().
|
static |
Definition at line 3955 of file sculpt.cc.
References blender::BKE_brush_size_set(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set(), ELEM, blender::ed::sculpt_paint::StrokeToggleSettings::original_active_brush, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_size, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, smooth_brush_toggle_off(), and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by blender::ed::sculpt_paint::SculptPaintStroke::done(), and smooth_brush_toggle_off().
|
static |
Definition at line 3917 of file sculpt.cc.
References blender::BKE_brush_size_get(), blender::BKE_brush_size_set(), blender::BKE_paint_brush(), blender::BKE_paint_brush_set(), blender::BKE_paint_brush_set_essentials(), blender::BRUSH_MASK_SMOOTH, brush_type_is_paint(), CLOG_WARN, ELEM, blender::LOG, blender::Brush::mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_active_brush, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_mask_tool, blender::ed::sculpt_paint::StrokeToggleSettings::original_brush_size, blender::Brush::sculpt_brush_type, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, and smooth_brush_toggle_on().
Referenced by create_toggle_settings(), and smooth_brush_toggle_on().
|
static |
Definition at line 1495 of file draw_ops.cc.
References blender::bke::GSpanAttributeWriter::finish(), blender::VArray< T >::from_single(), blender::index_mask::IndexMask::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::geometry::smooth_curve_attribute(), smooth_fill_strokes(), and blender::bke::GSpanAttributeWriter::span.
Referenced by grease_pencil_apply_fill(), and smooth_fill_strokes().
|
static |
Definition at line 126 of file curves/sculpt_ops.cc.
References blender::BKE_paint_brush_for_read(), BLI_assert_unreachable, blender::ToolSettings::curves_sculpt, blender::CURVES_SCULPT_BRUSH_TYPE_ADD, blender::CURVES_SCULPT_BRUSH_TYPE_COMB, blender::CURVES_SCULPT_BRUSH_TYPE_CUT, blender::CURVES_SCULPT_BRUSH_TYPE_DELETE, blender::CURVES_SCULPT_BRUSH_TYPE_DENSITY, blender::CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK, blender::CURVES_SCULPT_BRUSH_TYPE_PINCH, blender::CURVES_SCULPT_BRUSH_TYPE_PUFF, blender::CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT, blender::CURVES_SCULPT_BRUSH_TYPE_SLIDE, blender::CURVES_SCULPT_BRUSH_TYPE_SMOOTH, blender::CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK, new_add_operation(), new_comb_operation(), new_cut_operation(), new_delete_operation(), new_density_operation(), new_grow_shrink_operation(), new_pinch_operation(), new_puff_operation(), new_selection_paint_operation(), new_slide_operation(), new_smooth_operation(), new_snake_hook_operation(), blender::CurvesSculpt::paint, blender::wmOperator::ptr, blender::RNA_enum_get(), blender::Smooth, start_brush_operation(), and blender::Scene::toolsettings.
Referenced by start_brush_operation(), and blender::ed::sculpt_paint::SculptCurvesBrushStroke::update_step().
| void blender::ed::sculpt_paint::store_mesh_from_eval | ( | const wmOperator & | op, |
| const Scene & | scene, | ||
| const Depsgraph & | depsgraph, | ||
| const RegionView3D * | rv3d, | ||
| Object & | object, | ||
| Mesh * | new_mesh ) |
Fully replace the sculpt mesh with a mesh outside of Main. This implements various checks to avoid pushing full geometry-type undo steps when possible, allowing for better performance.
Definition at line 5276 of file sculpt.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::bke::pbvh::all_leaf_nodes(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), attribute, attribute_matches(), blender::BKE_id_free(), blender::BKE_mesh_copy_parameters(), blender::BKE_sculptsession_use_pbvh_draw(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::data, blender::DEG_id_tag_update(), ELEM, blender::bke::Face, blender::ed::sculpt_paint::undo::FaceSet, blender::bke::Float, blender::bke::Float3, blender::bke::AttributeIter::get(), get_vertex_group_sharing_info(), blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SHADING, blender::bke::Int32, blender::ed::sculpt_paint::undo::Mask, blender::bDeformGroup::name, blender::bke::AttributeIter::name, blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::Position, position, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), replace_attribute(), store_mesh_from_eval(), store_sculpt_entire_mesh(), tag_mesh_positions_changed(), and topology_matches().
Referenced by store_mesh_from_eval(), and blender::ed::geometry::store_result_geometry().
|
static |
Definition at line 5255 of file sculpt.cc.
References blender::BKE_mesh_nomain_to_mesh(), blender::BKE_sculptsession_free_pbvh(), blender::data, blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), and store_sculpt_entire_mesh().
Referenced by store_mesh_from_eval(), and store_sculpt_entire_mesh().
| void blender::ed::sculpt_paint::stroke_cache_common_init | ( | ViewContext & | vc, |
| const Paint & | paint, | ||
| const Brush & | brush, | ||
| Object & | object, | ||
| float2 | mval ) |
Initialize common StrokeCache values that do not change over the course of the stroke
Definition at line 431 of file mesh_paint.cc.
References blender::ed::sculpt_paint::StrokeCache::brush, blender::SculptSession::cache, blender::SculptSession::cursor_location, blender::SculptSession::cursor_normal, blender::SculptSession::cursor_sampled_normal, blender::ED_view3d_init_mats_rv3d(), blender::ED_view3d_ob_project_mat_get(), blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::math::invert(), blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::StrokeCache::mouse_event, blender::math::normalize(), blender::ed::sculpt_paint::StrokeCache::paint, blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::ViewContext::rv3d, stroke_cache_common_init(), blender::math::transform_direction(), blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::view_normal, and blender::RegionView3D::viewinv.
Referenced by stroke_cache_common_init(), stroke_cache_init(), blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::test_start(), and blender::ed::sculpt_paint::vwpaint::update_cache_invariants().
|
static |
Definition at line 5446 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_brush_color_jitter_get_settings(), blender::BKE_paint_seed_hsv_jitter(), blender::BLI_dial_init(), blender::BRUSH_ACCUMULATE, brush_flip(), blender::BRUSH_STROKE_ANCHORED, blender::SculptSession::cache, blender::ed::sculpt_paint::StrokeCache::dial, fabsf, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::gravity_direction, blender::Sculpt::gravity_factor, blender::Sculpt::gravity_object, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::max_ff(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, blender::math::normalize(), blender::Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::plane_brush, blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, blender::Object::runtime, blender::ed::sculpt_paint::StrokeCache::scale, blender::Object::scale, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ROTATE, sculpt_init_mirror_clipping(), blender::bke::ObjectRuntime::sculpt_session, stroke_cache_common_init(), stroke_cache_init(), blender::bke::brush::supports_accumulate(), blender::bke::brush::supports_gravity(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, and blender::math::transform_direction().
Referenced by stroke_cache_init(), and blender::ed::sculpt_paint::SculptPaintStroke::test_start().
|
static |
Definition at line 5551 of file sculpt.cc.
References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_unprojected_size_set(), blender::BKE_brush_use_locked_size(), blender::BKE_brush_use_size_pressure(), blender::BKE_curvemapping_evaluateF(), blender::BLI_dial_angle(), brush_delta_update(), brush_dynamic_size_get(), blender::BRUSH_EDGE_TO_EDGE, blender::BRUSH_HARDNESS_PRESSURE, blender::bke::PaintRuntime::brush_rotation, blender::BRUSH_STROKE_ANCHORED, blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, cache_paint_brush_variants_update(), calc_motion_normal_from_angle(), blender::ed::sculpt_paint::StrokeCache::clay_thumb_brush, blender::copy_v2_v2(), blender::ed::sculpt_paint::StrokeCache::dial, blender::bke::PaintRuntime::draw_anchored, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::Editor, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::hardness, init_scene_project_brush_targets(), blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::bke::PaintRuntime::initial_pixel_radius, blender::ed::sculpt_paint::StrokeCache::initial_radius, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), blender::ed::sculpt_paint::StrokeCache::iteration_count, blender::ed::sculpt_paint::PaintStroke::StrokeStep::location, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse_event, blender::ed::sculpt_paint::StrokeCache::mouse_event, object_space_radius_get(), blender::paint_calc_object_space_radius(), paint_supports_dynamic_size(), blender::bke::PaintRuntime::pixel_radius, blender::ed::sculpt_paint::PaintStroke::StrokeStep::pressure, blender::ed::sculpt_paint::StrokeCache::pressure, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::radius_squared, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, stroke_cache_update(), stroke_is_first_brush_step_of_symmetry_pass(), blender::bke::brush::supports_hardness_pressure(), blender::ed::sculpt_paint::PaintStroke::StrokeStep::tilt, blender::ed::sculpt_paint::StrokeCache::tilt, blender::ed::sculpt_paint::StrokeCache::tip_motion_normal, blender::ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::vertex_rotation, and blender::ViewContext::view_layer.
Referenced by stroke_cache_update(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
| std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh | ( | bContext * | C, |
| float2 | mval, | ||
| bool | force_original ) |
Do a ray-cast in the tree to find the 3d brush location (This allows us to ignore the GL depth buffer)
TODO: This should be updated to return std::optional<float3>
Definition at line 4881 of file sculpt.cc.
References blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::ED_view3d_viewcontext_init(), blender::ToolSettings::sculpt, and stroke_get_location_bvh().
| std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh | ( | Depsgraph & | depsgraph, |
| ViewContext & | vc, | ||
| const Paint & | paint, | ||
| const Brush * | brush, | ||
| const float2 | mval, | ||
| const bool | force_original ) |
Definition at line 4868 of file sculpt.cc.
References blender::PAINT_FALLOFF_SHAPE_TUBE, stroke_get_location_bvh(), and stroke_get_location_bvh_ex().
| std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh | ( | Depsgraph & | depsgraph, |
| ViewContext & | vc, | ||
| const Sculpt & | sd, | ||
| const Brush * | brush, | ||
| const float | mval[2], | ||
| const bool | force_original ) |
Definition at line 4855 of file sculpt.cc.
References blender::Sculpt::paint, blender::PAINT_FALLOFF_SHAPE_TUBE, stroke_get_location_bvh(), and stroke_get_location_bvh_ex().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::get_location(), blender::ed::sculpt_paint::SculptPaintStroke::get_location(), blender::VertexPaintStroke::get_location(), blender::WeightPaintStroke::get_location(), set_pivot_position_exec(), stroke_get_location_bvh(), stroke_get_location_bvh(), stroke_get_location_bvh(), and blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::test_start().
|
static |
| check_closest | if true and the ray test fails a point closest to the ray will be found. |
| limit_closest_radius | if true then the closest point will be tested against the active brush radius. |
Definition at line 4735 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_paint_brush_for_read(), blender::SculptSession::cache, blender::ed::sculpt_paint::FindNearestToRayData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::FindNearestToRayData::corner_verts, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::Object::data, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, blender::bke::Face, blender::ed::sculpt_paint::FindNearestToRayData::faces, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::find_nearest_to_ray(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::FindNearestToRayData::hide_poly, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::FindNearestToRayData::hit, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::FindNearestToRayData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::ViewContext::obact, blender::ed::sculpt_paint::FindNearestToRayData::object, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::FindNearestToRayData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::FindNearestToRayData::ray_start, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::Object::runtime, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, stroke_get_location_bvh_ex(), stroke_modifiers_check(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::FindNearestToRayData::use_original, blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::FindNearestToRayData::vert_positions, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), and vert_random_access_ensure().
Referenced by over_mesh(), over_mesh(), stroke_get_location_bvh(), stroke_get_location_bvh(), and stroke_get_location_bvh_ex().
| bool blender::ed::sculpt_paint::stroke_is_first_brush_step | ( | const ed::sculpt_paint::StrokeCache & | cache | ) |
Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes enabled.
This should be used for functionality that needs to be computed once per stroke of a particular tool (allocating memory, updating random seeds...).
Definition at line 661 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, stroke_is_first_brush_step(), and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), and stroke_is_first_brush_step().
| bool blender::ed::sculpt_paint::stroke_is_first_brush_step_of_symmetry_pass | ( | const ed::sculpt_paint::StrokeCache & | cache | ) |
Returns true on the first brush step of each symmetry pass.
Definition at line 667 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::first_time, and stroke_is_first_brush_step_of_symmetry_pass().
Referenced by brush_delta_update(), calc_brush_plane(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), do_brush_action(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_smear(), mesh_cursor_active_draw(), blender::ed::sculpt_paint::image::ops::paint::stroke_cache_update(), stroke_cache_update(), stroke_is_first_brush_step_of_symmetry_pass(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), and update_sculpt_normal().
| bool blender::ed::sculpt_paint::stroke_is_main_symmetry_pass | ( | const ed::sculpt_paint::StrokeCache & | cache | ) |
Returns true when the step belongs to the stroke that is directly performed by the brush and not by one of the symmetry passes.
Definition at line 655 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, stroke_is_main_symmetry_pass(), and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by calc_brush_plane(), do_brush_action(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), and stroke_is_main_symmetry_pass().
| void blender::ed::sculpt_paint::stroke_modifiers_check | ( | Depsgraph & | depsgraph, |
| Object & | ob, | ||
| const Brush * | brush ) |
Definition at line 4309 of file sculpt.cc.
References blender::BKE_sculptsession_update_for_edit(), blender::BLI_assert(), brush_type_is_paint(), blender::SculptSession::deform_modifiers_active, blender::bke::pbvh::Mesh, blender::SculptSession::pbvh, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::SculptSession::shapekey_active, and stroke_modifiers_check().
Referenced by cursor_geometry_info_update(), blender::ed::sculpt_paint::SculptPaintStroke::done(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), stroke_get_location_bvh_ex(), stroke_modifiers_check(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
|
static |
Definition at line 218 of file mesh/sculpt_ops.cc.
References blender::BKE_base_is_visible(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_mirror_apply_mirror_on_axis(), blender::BKE_sculptsession_free_pbvh(), blender::SculptSession::bm, blender::BM_EDGE, blender::BM_ELEM_TAG, blender::SculptSession::bm_log, blender::BM_log_all_added(), blender::BM_log_before_all_removed(), blender::BM_mesh_elem_hflag_disable_all(), blender::BM_mesh_toolflags_set(), blender::bke::pbvh::BMesh, BMO_FLAG_DEFAULTS, blender::BMO_FLAG_RESPECT_HIDE, blender::BMO_op_callf(), C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::ed::sculpt_paint::undo::Geometry, blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), blender::bke::pbvh::Grids, blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::bke::pbvh::Mesh, NC_OBJECT, ND_DRAW, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::bke::object::pbvh_get(), blender::wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), blender::RNA_float_get(), blender::Object::runtime, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::Sculpt::symmetrize_direction, symmetrize_exec(), blender::ed::sculpt_paint::dyntopo::triangulate(), and blender::WM_event_add_notifier().
Referenced by SCULPT_OT_symmetrize(), and symmetrize_exec().
|
inline |
Definition at line 607 of file paint_intern.hh.
References blender::PAINT_SYMM_X, blender::PAINT_SYMM_Y, blender::PAINT_SYMM_Z, and symmetry_flip().
Referenced by apply_brush_texture(), cache_calc_brushdata_symm(), calc_brush_plane(), calc_overlap(), calc_vertex_displacement(), filter_region_clip_factors(), filter_region_clip_factors(), find_all_symm_verts_bmesh(), find_all_symm_verts_grids(), find_all_symm_verts_mesh(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::ed::sculpt_paint::gesture::flip_for_symmetry_pass(), flip_v3_by_symm_area(), blender::ed::sculpt_paint::trim::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::boundary::init_boundary_bmesh(), blender::ed::sculpt_paint::boundary::init_boundary_grids(), blender::ed::sculpt_paint::boundary::init_boundary_mesh(), blender::ed::sculpt_paint::gesture::is_affected_lasso(), is_vertex_inside_brush_radius_symm(), point_with_symmetry_draw(), symmetry_flip(), transform_radius_elastic(), update_sculpt_normal(), and blender::ed::sculpt_paint::pose::vert_inside_brush_radius().
|
static |
Definition at line 5045 of file sculpt.cc.
References blender::bke::pbvh::bounds_get(), blender::data, blender::bke::object::pbvh_get(), and tag_mesh_positions_changed().
Referenced by flush_update_step(), store_mesh_from_eval(), and tag_mesh_positions_changed().
| void blender::ed::sculpt_paint::tag_update_overlays | ( | bContext * | C | ) |
Should be used after modifying the mask or face set IDs.
Definition at line 895 of file sculpt.cc.
References blender::BKE_sculptsession_use_pbvh_draw(), C, blender::CTX_data_active_object(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::DEG_id_tag_update(), blender::ED_region_tag_redraw(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SHADING, NC_OBJECT, ND_DRAW, tag_update_overlays(), and blender::WM_event_add_notifier().
Referenced by blender::ed::sculpt_paint::gesture::apply(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_op_exec(), blender::ed::sculpt_paint::face_set::init_op_exec(), 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::face_set::randomize_colors_exec(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), and tag_update_overlays().
|
static |
Definition at line 348 of file mesh/paint_cursor.cc.
References blender::BKE_object_get_evaluated_mesh_no_subsurf(), blender::BLI_assert(), blender::copy_v3_v3(), blender::copy_v3_v3_int(), blender::Object::data, blender::OB_MESH, blender::PAINT_TILE_X, screen_space_point_draw(), step, tiling_preview_draw(), and blender::Object::type.
Referenced by point_with_symmetry_draw(), and tiling_preview_draw().
| float3 blender::ed::sculpt_paint::tilt_apply_to_normal | ( | const float3 & | normal, |
| const StrokeCache & | cache, | ||
| const float | tilt_strength ) |
Definition at line 2896 of file sculpt.cc.
References blender::ViewContext::obact, blender::ViewContext::rv3d, blender::ed::sculpt_paint::StrokeCache::tilt, tilt_apply_to_normal(), blender::ed::sculpt_paint::StrokeCache::vc, and blender::RegionView3D::viewinv.
| float3 blender::ed::sculpt_paint::tilt_apply_to_normal | ( | const Object & | object, |
| const float4x4 & | view_inverse, | ||
| const float3 & | normal, | ||
| const float2 & | tilt, | ||
| float | tilt_strength ) |
Tilts a normal by the x and y tilt values using the view axis.
Definition at line 2876 of file sculpt.cc.
References M_PI_2, blender::math::normalize(), blender::math::rotate_direction_around_axis(), tilt_apply_to_normal(), blender::math::transform_direction(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by calc_brush_node_mask(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), cursor_space_drawing_setup(), blender::ed::sculpt_paint::brushes::do_plane_brush(), tilt_apply_to_normal(), tilt_apply_to_normal(), and tilt_effective_normal_get().
| float3 blender::ed::sculpt_paint::tilt_effective_normal_get | ( | const SculptSession & | ss, |
| const Brush & | brush ) |
Get effective surface normal with pen tilt and tilt strength applied to it.
Definition at line 2904 of file sculpt.cc.
References blender::SculptSession::cache, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, tilt_apply_to_normal(), and tilt_effective_normal_get().
Referenced by blender::ed::sculpt_paint::brushes::do_draw_brush(), blender::ed::sculpt_paint::brushes::do_draw_sharp_brush(), and tilt_effective_normal_get().
Definition at line 5234 of file sculpt.cc.
References attribute_matches(), b, blender::Mesh::corners_num, blender::Mesh::edges_num, blender::bke::MeshRuntime::face_offsets_sharing_info, blender::Mesh::faces_num, blender::Mesh::runtime, topology_matches(), and blender::Mesh::verts_num.
Referenced by store_mesh_from_eval(), and topology_matches().
| float blender::ed::sculpt_paint::transform_brush_radius | ( | const float4x4 & | transform, |
| const float3 & | brush_position, | ||
| const float | old_radius ) |
Definition at line 344 of file sculpt_brush.cc.
References blender::math::distance(), transform_brush_radius(), and blender::math::transform_point().
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and transform_brush_radius().
|
static |
Definition at line 105 of file sculpt_transform.cc.
References blender::add_v3_fl(), blender::copy_v3_v3(), blender::copy_v4_v4(), flip_quat_by_symm_area(), flip_v3_by_symm_area(), Incremental, blender::SculptSession::init_pivot_pos, blender::SculptSession::init_pivot_rot, blender::SculptSession::init_pivot_scale, blender::invert_m4_m4(), blender::mul_m4_m4m4(), blender::normalize_qt(), Original, PAINT_SYMM_AREAS, blender::SculptSession::pivot_pos, blender::SculptSession::pivot_rot, blender::SculptSession::pivot_scale, blender::SculptSession::prev_pivot_pos, blender::SculptSession::prev_pivot_rot, blender::SculptSession::prev_pivot_scale, blender::quat_to_mat4(), blender::size_to_mat4(), blender::sub_qt_qtqt(), blender::sub_v3_v3v3(), transform_matrices_init(), blender::translate_m4(), and blender::unit_m4().
Referenced by sculpt_transform_all_vertices(), transform_matrices_init(), and transform_radius_elastic().
|
static |
Definition at line 273 of file sculpt_transform.cc.
References apply_translations(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::SculptSession::bm, blender::SculptSession::bm_log, calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), mesh_symmetry_xyz_get(), node, orig_position_data_gather_bmesh(), lexit::Vector< T >::resize(), scale_translations(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), transform_node_bmesh(), and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by sculpt_transform_all_vertices(), and transform_node_bmesh().
|
static |
Definition at line 241 of file sculpt_transform.cc.
References apply_translations(), blender::BKE_subdiv_ccg_key_top_level(), calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), blender::CCGKey::grid_area, mesh_symmetry_xyz_get(), node, orig_position_data_get_grids(), blender::ed::sculpt_paint::OrigPositionData::positions, lexit::Vector< T >::resize(), scale_translations(), blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, transform_node_grids(), and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by sculpt_transform_all_vertices(), and transform_node_grids().
|
static |
Definition at line 212 of file sculpt_transform.cc.
References calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, mesh_symmetry_xyz_get(), node, orig_position_data_get_mesh(), blender::ed::sculpt_paint::OrigPositionData::positions, lexit::Vector< T >::resize(), scale_translations(), blender::Span< T >::size(), transform_node_mesh(), and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by sculpt_transform_all_vertices(), and transform_node_mesh().
|
static |
Definition at line 478 of file sculpt_transform.cc.
References blender::BKE_kelvinlet_init_params(), blender::BLI_assert(), blender::bke::pbvh::BMesh, blender::Object::data, elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), blender::SculptSession::filter_cache, blender::index_mask::IndexMask::foreach_index(), get_vertex_symm_area(), blender::exec_mode::grain_size(), blender::SubdivCCG::grid_area, blender::bke::pbvh::Grids, Incremental, is_symmetry_iteration_valid(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::filter::Cache::node_mask, blender::PAINT_SYMM_NONE, blender::bke::object::pbvh_get(), blender::SculptSession::pivot_pos, blender::SubdivCCG::positions, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::SculptSession::subdiv_ccg, symmetry_flip(), blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, transform_matrices_init(), transform_radius_elastic(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), and blender::bke::pbvh::update_node_bounds_mesh().
Referenced by transform_radius_elastic(), and update_modal_transform().
| void blender::ed::sculpt_paint::translations_from_new_positions | ( | Span< float3 > | new_positions, |
| Span< float3 > | old_positions, | ||
| MutableSpan< float3 > | translations ) |
Definition at line 7901 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::Span< T >::size(), and translations_from_new_positions().
| void blender::ed::sculpt_paint::translations_from_new_positions | ( | Span< float3 > | new_positions, |
| Span< int > | verts, | ||
| Span< float3 > | old_positions, | ||
| MutableSpan< float3 > | translations ) |
For brushes that calculate an averaged new position instead of generating a new translation vector.
Definition at line 7889 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::Span< T >::size(), and translations_from_new_positions().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), translations_from_new_positions(), and translations_from_new_positions().
| void blender::ed::sculpt_paint::translations_from_offset_and_factors | ( | const float3 & | offset, |
| Span< float > | factors, | ||
| MutableSpan< float3 > | r_translations ) |
Definition at line 7877 of file sculpt.cc.
References blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and translations_from_offset_and_factors().
Referenced by blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), and translations_from_offset_and_factors().
Definition at line 2909 of file sculpt.cc.
References blender::BKE_brush_mask_texture_get(), blender::BKE_paint_brush_for_read(), blender::ed::sculpt_paint::StrokeCache::brush_local_mat, blender::ed::sculpt_paint::StrokeCache::brush_local_mat_inv, blender::bke::PaintRuntime::brush_rotation, blender::SculptSession::cache, calc_brush_local_mat(), calc_motion_normal_from_angle(), blender::Editor, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::Sculpt::paint, blender::PAINT_FALLOFF_SHAPE_SPHERE, PRF_scope, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radius, blender::MTex::rot, blender::Object::runtime, blender::Paint::runtime, blender::Sculpt, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, blender::bke::ObjectRuntime::sculpt_session, update_brush_local_mat(), blender::ed::sculpt_paint::StrokeCache::vc, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by do_brush_action(), and update_brush_local_mat().
|
static |
Definition at line 51 of file paint_image_2d_curve_mask.cc.
References aa_samples_per_texel_axis(), blender::BLI_assert(), blender::CurveMaskCache::curve_mask, CurveSamplesBaseLen, CurveSamplesLen, float, floorf, len(), blender::len_v2v2(), blender::max_ff(), blender::min_ii(), roundf, blender::CurveMaskCache::sampled_curve, update_curve_mask(), blender::x, and y.
Referenced by blender::paint_curve_mask_cache_update(), and update_curve_mask().
Definition at line 569 of file sculpt_transform.cc.
References blender::BKE_brush_radius_get(), blender::BKE_brush_unprojected_radius_get(), blender::BKE_brush_use_locked_size(), blender::BKE_paint_brush_for_read(), blender::BKE_sculptsession_update_for_edit(), C, blender::copy_v3_v3(), blender::copy_v4_v4(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::ED_view3d_viewcontext_init(), flush_update_step(), blender::SculptSession::init_pivot_pos, blender::Sculpt::paint, blender::paint_calc_object_space_radius(), blender::SculptSession::pivot_pos, blender::SculptSession::pivot_rot, blender::SculptSession::pivot_scale, Position, blender::SculptSession::prev_pivot_pos, blender::SculptSession::prev_pivot_rot, blender::SculptSession::prev_pivot_scale, blender::Object::runtime, blender::SCE_XFORM_SCULPT_PIVOT, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, sculpt_transform_all_vertices(), blender::SCULPT_TRANSFORM_MODE_ALL_VERTICES, blender::SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, blender::ToolSettings::transform_flag, blender::Sculpt::transform_mode, transform_radius_elastic(), update_modal_transform(), and vert_random_access_ensure().
Referenced by blender::ed::transform::recalcData_sculpt(), and update_modal_transform().
|
static |
Definition at line 127 of file paint_image_2d_curve_mask.cc.
References blender::BKE_brush_curve_strength_clamped(), CurveSamplesBaseLen, CurveSamplesLen, float, blender::CurveMaskCache::last_curve_timestamp, len(), blender::MEM_new_array_uninitialized(), blender::CurveMaskCache::sampled_curve, and update_sampled_curve().
Referenced by blender::paint_curve_mask_cache_update(), and update_sampled_curve().
|
static |
Definition at line 2755 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), blender::BRUSH_ORIGINAL_NORMAL, blender::BRUSH_STROKE_ANCHORED, blender::SculptSession::cache, calc_sculpt_normal(), blender::copy_v3_v3(), blender::Editor, blender::ed::sculpt_paint::StrokeToggleSettings::invert, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::mul_m4_v3(), blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, blender::bke::brush::normal_weight_get(), blender::normalize_v3(), blender::Sculpt::paint, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, PRF_scope, blender::project_plane_v3_v3v3(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, blender::bke::ObjectRuntime::sculpt_session, stroke_is_first_brush_step_of_symmetry_pass(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, symmetry_flip(), blender::ed::sculpt_paint::StrokeCache::toggle_settings, update_sculpt_normal(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by do_brush_action(), and update_sculpt_normal().
|
static |
Detects whether the brush should be in Add or Subtract mode.
Definition at line 760 of file sculpt_density.cc.
References blender::BKE_brush_radius_get(), blender::BKE_object_get_evaluated_mesh(), blender::BKE_paint_brush_for_read(), blender::BRUSH_CURVES_SCULPT_DENSITY_MODE_ADD, blender::BRUSH_CURVES_SCULPT_DENSITY_MODE_REMOVE, blender::ToolSettings::curves_sculpt, blender::Object::data, blender::DEG_get_evaluated(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::Invert, blender::ed::sculpt_paint::StrokeExtension::mouse_position, blender::CurvesSculpt::paint, blender::threading::parallel_for(), blender::pow2f(), sample_curves_surface_3d_brush(), blender::Scene::toolsettings, and use_add_density_mode().
Referenced by new_density_operation(), and use_add_density_mode().
|
static |
Definition at line 255 of file draw_ops.cc.
References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), C, ELEM, blender::Erase, blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPAINT_BRUSH_TYPE_ERASE, blender::GPAINT_BRUSH_TYPE_TINT, blender::GPencil, blender::wmOperator::ptr, blender::RNA_enum_get(), and use_duplicate_previous_key().
Referenced by ensure_drawing_for_autokey(), grease_pencil_brush_stroke_exec(), grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), and use_duplicate_previous_key().
| Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_bmesh | ( | BMVert & | vert, |
| BMeshNeighborVerts & | r_neighbors ) |
Definition at line 490 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BM_ITER_ELEM, blender::BM_LOOPS_OF_VERT, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::l, blender::BMLoop::next, blender::BMLoop::prev, blender::BMLoop::v, and vert_neighbors_get_bmesh().
Referenced by blender::ed::sculpt_paint::smooth::average_data_bmesh(), blender::ed::sculpt_paint::mask::average_neighbor_mask_bmesh(), blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::cloth::calc_vert_neighbor_indices_bmesh(), calc_vert_neighbors(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_sample_from_surface(), blender::ed::sculpt_paint::boundary::edit_data_init_bmesh(), blender::ed::sculpt_paint::flood_fill::FillDataBMesh::execute(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), blender::ed::sculpt_paint::mask::grow_mask_bmesh(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_bmesh(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_bmesh(), blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh(), blender::ed::sculpt_paint::mask::shrink_mask_bmesh(), and vert_neighbors_get_bmesh().
| Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_interior_bmesh | ( | BMVert & | vert, |
| BMeshNeighborVerts & | r_neighbors ) |
Definition at line 505 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BM_edge_exists(), blender::BM_edge_is_boundary(), BM_ITER_ELEM, blender::BM_LOOPS_OF_VERT, blender::BM_vert_is_boundary(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::l, blender::BMLoop::next, blender::BMLoop::prev, blender::Vector< T, InlineBufferCapacity, Allocator >::remove_if(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::BMLoop::v, and vert_neighbors_get_interior_bmesh().
Referenced by calc_vert_neighbors_interior(), blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh_impl(), and vert_neighbors_get_interior_bmesh().
| Span< int > blender::ed::sculpt_paint::vert_neighbors_get_mesh | ( | const OffsetIndices< int > | faces, |
| const Span< int > | corner_verts, | ||
| const GroupedSpan< int > | vert_to_face, | ||
| const Span< bool > | hide_poly, | ||
| const int | vert, | ||
| Vector< int > & | r_neighbors ) |
Definition at line 534 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::bke::mesh::face_find_adjacent_verts(), blender::Span< T >::is_empty(), and vert_neighbors_get_mesh().
Referenced by blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::boundary::edit_data_init_mesh(), blender::ed::sculpt_paint::flood_fill::FillDataMesh::execute(), geometry_preview_lines_update(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_mesh(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_mesh(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), and vert_neighbors_get_mesh().
| Span< float3 > blender::ed::sculpt_paint::vert_positions_for_grab_active_get | ( | const Depsgraph & | depsgraph, |
| const Object & | object ) |
Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled.
Definition at line 179 of file sculpt.cc.
References blender::BLI_assert(), blender::data, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), blender::SculptSession::shapekey_active, blender::bke::pbvh::vert_positions_eval(), and vert_positions_for_grab_active_get().
Referenced by brush_delta_update(), geometry_preview_lines_draw(), get_active_vertex_position(), and vert_positions_for_grab_active_get().
| void blender::ed::sculpt_paint::vert_random_access_ensure | ( | Object & | object | ) |
Ensure random access; required for bke::pbvh::Type::BMesh
Definition at line 154 of file sculpt.cc.
References blender::SculptSession::bm, blender::BM_mesh_elem_index_ensure(), blender::BM_mesh_elem_table_ensure(), blender::BM_VERT, blender::bke::pbvh::BMesh, blender::bke::object::pbvh_get(), and vert_random_access_ensure().
Referenced by active_element_info_get(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::pose::calc_average_face_set_center(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), calc_smooth_translations(), blender::ed::sculpt_paint::islands::calc_topology_islands_bmesh(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), blender::ed::sculpt_paint::boundary::data_init_bmesh(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::mask::duplicate_mask(), blender::ed::sculpt_paint::hide::duplicate_visibility_bmesh(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::expand::ensure_sculptsession_data(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), init_transform(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), mesh_cursor_inactive_draw(), mesh_cursor_update_and_init(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_apply(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), stroke_get_location_bvh_ex(), update_modal_transform(), vert_random_access_ensure(), vertex_is_occluded(), and blender::ed::sculpt_paint::expand::write_mask_data().
| int blender::ed::sculpt_paint::vertex_count_get | ( | const Object & | object | ) |
Definition at line 163 of file sculpt.cc.
References blender::BKE_sculpt_get_grid_num_verts(), blender::BLI_assert(), blender::SculptSession::bm, blender::BM_mesh_elem_count(), blender::BM_VERT, blender::bke::pbvh::BMesh, blender::data, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::OB_MESH, blender::bke::object::pbvh_get(), and vertex_count_get().
Referenced by blender::BLI_STATIC_ASSERT(), blender::ed::sculpt_paint::expand::boundary_topology_falloff_create(), blender::ed::sculpt_paint::cloth::brush_simulation_create(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::expand::calc_topology_falloff_from_verts(), blender::ed::sculpt_paint::cloth::cloth_brush_satisfy_constraints(), blender::ed::sculpt_paint::expand::diagonals_falloff_create(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), fake_neighbor_init(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::filter::mesh_filter_surface_smooth_init(), blender::ed::sculpt_paint::auto_mask::normal_occlusion_automasking_fill(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::expand::original_state_store(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::filter::sculpt_filter_specific_init(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), blender::ed::sculpt_paint::expand::topology_falloff_create(), blender::ed::sculpt_paint::expand::topology_from_state_boundary(), blender::ed::sculpt_paint::expand::update_max_vert_falloff_value(), vertex_count_get(), and blender::ed::sculpt_paint::hide::visibility_filter_exec().
| bool blender::ed::sculpt_paint::vertex_is_occluded | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const float3 & | position, | ||
| bool | original ) |
Definition at line 6255 of file sculpt.cc.
References blender::SculptSession::cache, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::data, blender::ed::sculpt_paint::RaycastData::depth, blender::ED_view3d_project_float_v2_m4(), blender::ed::sculpt_paint::RaycastData::faces, blender::SculptSession::filter_cache, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::pbvh::Mesh, node, blender::ed::sculpt_paint::RaycastData::object, blender::bke::object::pbvh_get(), position, blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::ViewContext::region, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::filter::Cache::vc, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), vertex_is_occluded(), and blender::ed::sculpt_paint::filter::Cache::viewmat.
Referenced by blender::ed::sculpt_paint::auto_mask::calc_view_occlusion_factor(), and vertex_is_occluded().
|
static |
Definition at line 463 of file brush_asset_ops.cc.
References blender::BKE_paint_get_active_from_context(), C, blender::CTX_data_main(), blender::ed::asset::find_asset_from_weak_ref(), visit_active_library_catalogs_catalog_for_search_fn(), and blender::ed::asset::visit_library_catalogs_catalog_for_search().
Referenced by BRUSH_OT_asset_edit_metadata(), and visit_active_library_catalogs_catalog_for_search_fn().
|
static |
Definition at line 353 of file brush_asset_ops.cc.
References C, blender::CTX_data_main(), blender::ed::asset::get_asset_library_ref_from_opptr(), blender::ed::asset::visit_library_catalogs_catalog_for_search(), and visit_library_prop_catalogs_catalog_for_search_fn().
Referenced by BRUSH_OT_asset_save_as(), and visit_library_prop_catalogs_catalog_for_search_fn().
|
constexpr |
Definition at line 24 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Definition at line 23 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Number of samples to use between 0..1.
Definition at line 28 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().
|
constexpr |
Number of samples to store in the cache.
M_SQRT2 is used as brushes are circles and the curve_mask is square.
Definition at line 35 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().
|
staticconstexpr |
Definition at line 135 of file mesh/sculpt_intern.hh.
Referenced by face_set_extract_invoke().
|
staticconstexpr |
Definition at line 155 of file mesh/sculpt_intern.hh.
Referenced by calc_stabilized_plane().
|
static |
Definition at line 654 of file sculpt_transform.cc.
Referenced by SCULPT_OT_set_pivot_position().
|
staticconstexpr |
Definition at line 172 of file sculpt_transform.cc.
Referenced by filter_translations_with_symmetry().