Blender V5.3
annotate_paint.cc File Reference
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_enum_flags.hh"
#include "BLI_listbase.hh"
#include "BLI_math_geom_c.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_time.hh"
#include "BLT_translation.hh"
#include "BKE_annotations.h"
#include "BKE_annotations_geom.h"
#include "BKE_callbacks.hh"
#include "BKE_camera.h"
#include "BKE_context.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "BKE_tracking.hh"
#include "DNA_gpencil_legacy_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "ED_clip.hh"
#include "ED_gpencil_legacy.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "GPU_immediate.hh"
#include "GPU_immediate_util.hh"
#include "GPU_state.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "gpencil_intern.hh"

Go to the source code of this file.

Classes

struct  blender::tGPsdata
struct  blender::tGPDeleteIsland

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define DEPTH_INVALID   1.0f
#define MIN_MANHATTAN_PX   (U.gp_manhattandist)
#define MIN_EUCLIDEAN_PX   (U.gp_euclideandist)

Enumerations

enum  blender::eGPencil_PaintStatus {
  blender::GP_STATUS_IDLING = 0 , blender::GP_STATUS_PAINTING , blender::GP_STATUS_ERROR , blender::GP_STATUS_DONE ,
  blender::GP_STATUS_CAPTURE
}
enum  blender::eGP_StrokeAdd_Result { blender::GP_STROKEADD_INVALID = -2 , blender::GP_STROKEADD_OVERFLOW = -1 , blender::GP_STROKEADD_NORMAL , blender::GP_STROKEADD_FULL }
enum  blender::eGPencil_PaintFlags {
  blender::GP_PAINTFLAG_FIRSTRUN = (1 << 0) , blender::GP_PAINTFLAG_STROKEADDED = (1 << 1) , blender::GP_PAINTFLAG_V3D_ERASER_DEPTH = (1 << 2) , blender::GP_PAINTFLAG_SELECTMASK = (1 << 3) ,
  blender::GP_PAINTFLAG_USE_STABILIZER = (1 << 7) , blender::GP_PAINTFLAG_USE_STABILIZER_TEMP = (1 << 8)
}

Functions

static bool blender::annotation_stroke_added_check (tGPsdata *p)
static void blender::annotation_stroke_added_enable (tGPsdata *p)
static void blender::annotation_session_validatebuffer (tGPsdata *p)
static bool blender::annotation_draw_poll (bContext *C)
static bool blender::annotation_project_check (tGPsdata *p)
static void blender::annotation_get_3d_reference (tGPsdata *p, float vec[3])
static bool blender::annotation_stroke_filtermval (tGPsdata *p, const float mval[2], const float pmval[2])
static void blender::annotation_stroke_convertcoords (tGPsdata *p, const float2 mval, float out[3], const float *depth)
static void blender::annotation_smooth_buffer (tGPsdata *p, float inf, int idx)
static void blender::annotation_stroke_arrow_calc_points_segment (float stroke_points[8], const float ref_point[2], const float dir_cw[2], const float dir_ccw[2], const float length, const float sign)
static void blender::annotation_stroke_arrow_calc_points (tGPspoint *point, const float stroke_dir[2], float corner[2], float stroke_points[8], const int arrow_style)
static short blender::annotation_stroke_addpoint (tGPsdata *p, const float mval[2], float pressure, double curtime)
static void blender::annotation_stroke_arrow_init_point_default (bGPDspoint *pt)
static void blender::annotation_stroke_arrow_init_conv_point (bGPDspoint *pt, const float point[3])
static void blender::annotation_stroke_arrow_init_point (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float co[8], const int co_idx)
static void blender::annotation_stroke_arrow_allocate (bGPDstroke *gps, const int totpoints)
static void blender::annotation_arrow_create_open (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float corner_point[3], const float arrow_points[8])
static void blender::annotation_arrow_create_segm (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
static void blender::annotation_arrow_create_closed (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
static void blender::annotation_arrow_create_square (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float corner_point[3], const float arrow_points[8])
static void blender::annotation_arrow_create (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, bGPDstroke *arrow_stroke, const float arrow_points[8], const int style)
static void blender::annotation_stroke_newfrombuffer (tGPsdata *p)
static void blender::annotation_free_stroke (bGPDframe *gpf, bGPDstroke *gps)
static bool blender::annotation_stroke_eraser_is_occluded (tGPsdata *p, const bGPDspoint *pt, const int x, const int y)
static void blender::stroke_join_islands (bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps_first, bGPDstroke *gps_last)
static bGPDstroke * blender::stroke_delete_tagged_points (bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *next_stroke, int tag_flags, const bool select, const bool flat_cap, const int limit)
static void blender::annotation_stroke_eraser_dostroke (tGPsdata *p, bGPDframe *gpf, bGPDstroke *gps, const float mval[2], const int radius, const rcti *rect)
static void blender::annotation_stroke_doeraser (tGPsdata *p)
static bool blender::annotation_session_initdata (bContext *C, tGPsdata *p)
static void blender::annotation_visible_on_space (tGPsdata *p)
static tGPsdata * blender::annotation_session_initpaint (bContext *C)
static void blender::annotation_session_cleanup (tGPsdata *p)
static void blender::annotation_session_free (tGPsdata *p)
static void blender::annotation_paint_initstroke (tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph)
static void blender::annotation_paint_strokeend (tGPsdata *p)
static void blender::annotation_paint_cleanup (tGPsdata *p)
static void blender::annotation_draw_eraser (bContext *, const int2 &xy, const float2 &, void *p_ptr)
static void blender::annotation_draw_toggle_eraser_cursor (tGPsdata *p, short enable)
static void blender::annotation_draw_stabilizer (bContext *C, const int2 &xy, const float2 &, void *p_ptr)
static void blender::annotation_draw_toggle_stabilizer_cursor (tGPsdata *p, short enable)
static bool blender::annotation_is_tablet_eraser_active (const wmEvent *event)
static void blender::annotation_draw_exit (bContext *C, wmOperator *op)
static void blender::annotation_draw_cancel (bContext *C, wmOperator *op)
static int blender::annotation_draw_init (bContext *C, wmOperator *op, const wmEvent *event)
static void blender::annotation_draw_cursor_set (tGPsdata *p)
static void blender::annotation_draw_status_indicators (bContext *C, tGPsdata *p)
static void blender::annotation_draw_apply (wmOperator *op, tGPsdata *p, Depsgraph *depsgraph)
static void blender::annotation_draw_apply_event (wmOperator *op, const wmEvent *event, Depsgraph *depsgraph, float x, float y)
static wmOperatorStatus blender::annotation_draw_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::annotation_draw_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static bool blender::annotation_area_exists (bContext *C, ScrArea *area_test)
static tGPsdata * blender::annotation_stroke_begin (bContext *C, wmOperator *op)
static void blender::annotation_stroke_end (wmOperator *op)
static void blender::annotation_add_missing_events (bContext *C, wmOperator *op, const wmEvent *event, tGPsdata *p)
static wmOperatorStatus blender::annotation_draw_modal (bContext *C, wmOperator *op, const wmEvent *event)
void blender::GPENCIL_OT_annotate (wmOperatorType *ot)

Variables

static const EnumPropertyItem blender::prop_gpencil_drawmodes []
static const EnumPropertyItem blender::arrow_types []

Macro Definition Documentation

◆ DEPTH_INVALID

#define DEPTH_INVALID   1.0f

◆ MIN_EUCLIDEAN_PX

#define MIN_EUCLIDEAN_PX   (U.gp_euclideandist)

Definition at line 196 of file annotate_paint.cc.

Referenced by blender::annotation_stroke_filtermval().

◆ MIN_MANHATTAN_PX

#define MIN_MANHATTAN_PX   (U.gp_manhattandist)

Definition at line 194 of file annotate_paint.cc.

Referenced by blender::annotation_stroke_filtermval().