Blender V5.3
draw_ops.cc File Reference
#include "ANIM_keyframing.hh"
#include "BKE_brush.hh"
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_crazyspace.hh"
#include "BKE_curves.hh"
#include "BKE_deform.hh"
#include "BKE_geometry_set.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_library.hh"
#include "BKE_material.hh"
#include "BKE_object_deform.h"
#include "BKE_paint.hh"
#include "BKE_paint_types.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "BLI_array_utils.hh"
#include "BLI_assert.hh"
#include "BLI_bounds.hh"
#include "BLI_color_types.hh"
#include "BLI_index_mask.hh"
#include "BLI_kdopbvh.hh"
#include "BLI_kdtree.hh"
#include "BLI_math_geom_c.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.hh"
#include "BLI_offset_indices.hh"
#include "BLI_rect.hh"
#include "DNA_brush_enums.h"
#include "DNA_brush_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
#include "DNA_windowmanager_types.h"
#include "DEG_depsgraph_query.hh"
#include "GEO_curves_remove_and_split.hh"
#include "GEO_join_geometries.hh"
#include "GEO_smooth_curves.hh"
#include "ED_grease_pencil.hh"
#include "ED_image.hh"
#include "ED_object.hh"
#include "ED_screen.hh"
#include "ED_space_api.hh"
#include "ED_view3d.hh"
#include "MEM_guardedalloc.h"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "UI_interface.hh"
#include "BLT_translation.hh"
#include "WM_api.hh"
#include "WM_toolsystem.hh"
#include "WM_types.hh"
#include "../paint_intern.hh"
#include "grease_pencil_intern.hh"
#include "wm_event_types.hh"
#include <algorithm>
#include <fmt/format.h>
#include <optional>

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::GreasePencilPaintStroke
struct  blender::ed::sculpt_paint::GreasePencilFillOpData
struct  blender::ed::sculpt_paint::FillToolTargetInfo

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ed
namespace  blender::ed::sculpt_paint

Functions

Common Paint Operator Functions
static std::unique_ptr< GreasePencilStrokeOperation > blender::ed::sculpt_paint::get_stroke_operation (bContext &C, wmOperator *op)
Brush Stroke Operator
static bool blender::ed::sculpt_paint::grease_pencil_brush_stroke_poll (bContext *C)
static bool blender::ed::sculpt_paint::use_duplicate_previous_key (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_brush_stroke_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::ed::sculpt_paint::grease_pencil_brush_stroke_cancel (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_brush_stroke (wmOperatorType *ot)
Sculpt Operator
static bool blender::ed::sculpt_paint::grease_pencil_sculpt_paint_poll (bContext *C)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_sculpt_paint_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_sculpt_paint_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::ed::sculpt_paint::grease_pencil_sculpt_paint_cancel (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_sculpt_paint (wmOperatorType *ot)
Weight Brush Stroke Operator
static bool blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_poll (bContext *C)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_cancel (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_weight_brush_stroke (wmOperatorType *ot)
Vertex Brush Stroke Operator
static bool blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_poll (bContext *C)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_cancel (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_vertex_brush_stroke (wmOperatorType *ot)
C Wrappers
void blender::ED_operatortypes_grease_pencil_draw ()
void blender::ED_filltool_modal_keymap (wmKeyConfig *keyconf)

Bucket Fill Operator

enum class  blender::ed::sculpt_paint::FillToolModalKey : int8_t {
  blender::ed::sculpt_paint::Cancel = 1 , blender::ed::sculpt_paint::Confirm , blender::ed::sculpt_paint::ExtensionModeToggle , blender::ed::sculpt_paint::ExtensionLengthen ,
  blender::ed::sculpt_paint::ExtensionShorten , blender::ed::sculpt_paint::ExtensionDrag , blender::ed::sculpt_paint::ExtensionCollide , blender::ed::sculpt_paint::Invert ,
  blender::ed::sculpt_paint::Precision
}
static void blender::ed::sculpt_paint::grease_pencil_fill_extension_cut (const bContext &C, ed::greasepencil::ExtensionData &extension_data, Span< int > origin_drawings, Span< int > origin_points)
static void blender::ed::sculpt_paint::grease_pencil_fill_extension_lines_from_circles (const bContext &C, ed::greasepencil::ExtensionData &extension_data, Span< int >, Span< int >)
static ed::greasepencil::ExtensionData blender::ed::sculpt_paint::grease_pencil_fill_get_extension_data (const bContext &C, const GreasePencilFillOpData &op_data)
static void blender::ed::sculpt_paint::grease_pencil_fill_status_indicators (bContext &C, const GreasePencilFillOpData &op_data)
static void blender::ed::sculpt_paint::grease_pencil_fill_overlay_pixel_cb (const bContext &C, const GreasePencilFillOpData &op_data)
static void blender::ed::sculpt_paint::grease_pencil_fill_overlay_delaunay_cb (const bContext &C, const GreasePencilFillOpData &op_data)
static void blender::ed::sculpt_paint::grease_pencil_fill_overlay_cb (const bContext *C, ARegion *, void *arg)
static void blender::ed::sculpt_paint::grease_pencil_fill_update_overlay (const ARegion &region, GreasePencilFillOpData &op_data)
static void blender::ed::sculpt_paint::grease_pencil_update_extend (bContext &C, GreasePencilFillOpData &op_data)
static VArray< bool > blender::ed::sculpt_paint::get_fill_boundary_layers (const GreasePencil &grease_pencil, eGP_FillLayerModes fill_layer_mode)
static Vector< FillToolTargetInfo > blender::ed::sculpt_paint::ensure_editable_drawings (const Scene &scene, GreasePencil &grease_pencil, bke::greasepencil::Layer &target_layer)
static void blender::ed::sculpt_paint::smooth_fill_strokes (bke::CurvesGeometry &curves, const IndexMask &stroke_mask)
static bke::CurvesGeometry blender::ed::sculpt_paint::simplify_fixed (bke::CurvesGeometry &curves, const int step)
static void blender::ed::sculpt_paint::set_fill_attributes (bke::CurvesGeometry &fill_curves, const ViewContext &view_context, const Paint &paint, const Brush &brush, const Scene &scene, const float4x4 &to_world, const int material_index, const float hardness)
static bool blender::ed::sculpt_paint::grease_pencil_apply_fill (bContext &C, wmOperator &op, const wmEvent &event)
static bool blender::ed::sculpt_paint::grease_pencil_fill_init (bContext &C, wmOperator &op)
static void blender::ed::sculpt_paint::grease_pencil_fill_exit (bContext &C, wmOperator &op)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_fill_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_fill_event_modal_map (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_fill_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::ed::sculpt_paint::grease_pencil_fill_cancel (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_fill (wmOperatorType *ot)
static void blender::ed::sculpt_paint::ensure_drawing_for_autokey (bContext *C, GreasePencil &grease_pencil)
static bool blender::ed::sculpt_paint::remove_points_and_split_from_drawings (const Span< ed::greasepencil::MutableDrawingInfo > drawings, const Span< IndexMask > points_to_remove_per_drawing)
static bool blender::ed::sculpt_paint::is_point_inside_bounds (const Bounds< int2 > bounds, const int2 point)
static bool blender::ed::sculpt_paint::is_point_inside_lasso (const Array< int2 > lasso, const int2 point)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_erase_lasso_exec (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_erase_lasso (wmOperatorType *ot)
static wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_erase_box_exec (bContext *C, wmOperator *op)
static void blender::ed::sculpt_paint::GREASE_PENCIL_OT_erase_box (wmOperatorType *ot)