Blender  V3.3
Functions
gpencil_ops.c File Reference
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "BLI_sys_types.h"
#include "BKE_context.h"
#include "BKE_paint.h"
#include "DNA_brush_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "WM_api.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "ED_gpencil.h"
#include "gpencil_intern.h"

Go to the source code of this file.

Functions

static void ed_keymap_gpencil_general (wmKeyConfig *keyconf)
 
static bool gpencil_stroke_editmode_poll (bContext *C)
 
static bool gpencil_stroke_editmode_curve_poll (bContext *C)
 
static bool gpencil_stroke_paintmode_poll (bContext *C)
 
static bool gpencil_stroke_paintmode_poll_with_tool (bContext *C, const char gpencil_tool)
 
static bool gpencil_stroke_vertexmode_poll_with_tool (bContext *C, const char gpencil_vertex_tool)
 
static bool gpencil_stroke_sculptmode_poll_with_tool (bContext *C, const char gpencil_sculpt_tool)
 
static bool gpencil_stroke_weightmode_poll_with_tool (bContext *C, const char gpencil_weight_tool)
 
static bool gpencil_stroke_paintmode_draw_poll (bContext *C)
 
static bool gpencil_stroke_paintmode_erase_poll (bContext *C)
 
static bool gpencil_stroke_paintmode_fill_poll (bContext *C)
 
static bool gpencil_stroke_paintmode_tint_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_poll (bContext *C)
 
static bool gpencil_stroke_weightmode_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_draw_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_blur_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_average_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_smear_poll (bContext *C)
 
static bool gpencil_stroke_vertexmode_replace_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_smooth_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_thickness_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_strength_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_grab_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_push_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_twist_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_pinch_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_randomize_poll (bContext *C)
 
static bool gpencil_stroke_sculptmode_clone_poll (bContext *C)
 
static bool gpencil_stroke_weightmode_draw_poll (bContext *C)
 
static void ed_keymap_gpencil_editing (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_curve_editing (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_painting_draw (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_painting_erase (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_painting_fill (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_painting_tint (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_painting (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculpting (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_weightpainting (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting_draw (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting_blur (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting_average (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting_smear (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_vertexpainting_replace (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_smooth (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_thickness (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_strength (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_grab (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_push (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_twist (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_pinch (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_randomize (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_sculptpainting_clone (wmKeyConfig *keyconf)
 
static void ed_keymap_gpencil_weightpainting_draw (wmKeyConfig *keyconf)
 
void ED_keymap_gpencil (wmKeyConfig *keyconf)
 
void ED_operatortypes_gpencil (void)
 
void ED_operatormacros_gpencil (void)
 

Function Documentation

◆ ED_keymap_gpencil()

void ED_keymap_gpencil ( wmKeyConfig keyconf)

◆ ed_keymap_gpencil_curve_editing()

static void ed_keymap_gpencil_curve_editing ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_editing()

static void ed_keymap_gpencil_editing ( wmKeyConfig keyconf)
static

Definition at line 296 of file gpencil_ops.c.

References gpencil_stroke_editmode_poll(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_general()

static void ed_keymap_gpencil_general ( wmKeyConfig keyconf)
static

Definition at line 37 of file gpencil_ops.c.

References WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_painting()

static void ed_keymap_gpencil_painting ( wmKeyConfig keyconf)
static

Definition at line 342 of file gpencil_ops.c.

References gpencil_stroke_paintmode_poll(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_painting_draw()

static void ed_keymap_gpencil_painting_draw ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_painting_erase()

static void ed_keymap_gpencil_painting_erase ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_painting_fill()

static void ed_keymap_gpencil_painting_fill ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_painting_tint()

static void ed_keymap_gpencil_painting_tint ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculpting()

static void ed_keymap_gpencil_sculpting ( wmKeyConfig keyconf)
static

Definition at line 350 of file gpencil_ops.c.

References gpencil_stroke_sculptmode_poll(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_sculptpainting_clone()

static void ed_keymap_gpencil_sculptpainting_clone ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_grab()

static void ed_keymap_gpencil_sculptpainting_grab ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_pinch()

static void ed_keymap_gpencil_sculptpainting_pinch ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_push()

static void ed_keymap_gpencil_sculptpainting_push ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_randomize()

static void ed_keymap_gpencil_sculptpainting_randomize ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_smooth()

static void ed_keymap_gpencil_sculptpainting_smooth ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_strength()

static void ed_keymap_gpencil_sculptpainting_strength ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_thickness()

static void ed_keymap_gpencil_sculptpainting_thickness ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_sculptpainting_twist()

static void ed_keymap_gpencil_sculptpainting_twist ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_vertexpainting()

static void ed_keymap_gpencil_vertexpainting ( wmKeyConfig keyconf)
static

Definition at line 365 of file gpencil_ops.c.

References gpencil_stroke_vertexmode_poll(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_vertexpainting_average()

static void ed_keymap_gpencil_vertexpainting_average ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_vertexpainting_blur()

static void ed_keymap_gpencil_vertexpainting_blur ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_vertexpainting_draw()

static void ed_keymap_gpencil_vertexpainting_draw ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_vertexpainting_replace()

static void ed_keymap_gpencil_vertexpainting_replace ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_vertexpainting_smear()

static void ed_keymap_gpencil_vertexpainting_smear ( wmKeyConfig keyconf)
static

◆ ed_keymap_gpencil_weightpainting()

static void ed_keymap_gpencil_weightpainting ( wmKeyConfig keyconf)
static

Definition at line 358 of file gpencil_ops.c.

References gpencil_stroke_weightmode_poll(), wmKeyMap::poll, and WM_keymap_ensure().

Referenced by ED_keymap_gpencil().

◆ ed_keymap_gpencil_weightpainting_draw()

static void ed_keymap_gpencil_weightpainting_draw ( wmKeyConfig keyconf)
static

◆ ED_operatormacros_gpencil()

void ED_operatormacros_gpencil ( void  )

◆ ED_operatortypes_gpencil()

void ED_operatortypes_gpencil ( void  )

Definition at line 498 of file gpencil_ops.c.

References GPENCIL_OT_active_frame_delete(), GPENCIL_OT_active_frames_delete_all(), GPENCIL_OT_annotate(), GPENCIL_OT_annotation_active_frame_delete(), GPENCIL_OT_annotation_add(), GPENCIL_OT_bake_grease_pencil_animation(), GPENCIL_OT_bake_mesh_animation(), GPENCIL_OT_blank_frame_add(), GPENCIL_OT_brush_reset(), GPENCIL_OT_brush_reset_all(), GPENCIL_OT_convert(), GPENCIL_OT_convert_old_files(), GPENCIL_OT_copy(), GPENCIL_OT_data_unlink(), GPENCIL_OT_delete(), GPENCIL_OT_dissolve(), GPENCIL_OT_draw(), GPENCIL_OT_duplicate(), GPENCIL_OT_editmode_toggle(), GPENCIL_OT_extract_palette_vertex(), GPENCIL_OT_extrude(), GPENCIL_OT_fill(), GPENCIL_OT_frame_clean_duplicate(), GPENCIL_OT_frame_clean_fill(), GPENCIL_OT_frame_clean_loose(), GPENCIL_OT_frame_duplicate(), GPENCIL_OT_generate_weights(), GPENCIL_OT_guide_rotate(), GPENCIL_OT_hide(), GPENCIL_OT_image_to_grease_pencil(), GPENCIL_OT_interpolate(), GPENCIL_OT_interpolate_reverse(), GPENCIL_OT_interpolate_sequence(), GPENCIL_OT_layer_active(), GPENCIL_OT_layer_add(), GPENCIL_OT_layer_annotation_add(), GPENCIL_OT_layer_annotation_move(), GPENCIL_OT_layer_annotation_remove(), GPENCIL_OT_layer_change(), GPENCIL_OT_layer_duplicate(), GPENCIL_OT_layer_duplicate_object(), GPENCIL_OT_layer_isolate(), GPENCIL_OT_layer_mask_add(), GPENCIL_OT_layer_mask_move(), GPENCIL_OT_layer_mask_remove(), GPENCIL_OT_layer_merge(), GPENCIL_OT_layer_move(), GPENCIL_OT_layer_remove(), GPENCIL_OT_lock_all(), GPENCIL_OT_lock_layer(), GPENCIL_OT_material_hide(), GPENCIL_OT_material_isolate(), GPENCIL_OT_material_lock_all(), GPENCIL_OT_material_lock_unused(), GPENCIL_OT_material_reveal(), GPENCIL_OT_material_select(), GPENCIL_OT_material_set(), GPENCIL_OT_material_to_vertex_color(), GPENCIL_OT_material_unlock_all(), GPENCIL_OT_materials_copy_to_object(), GPENCIL_OT_move_to_layer(), GPENCIL_OT_paintmode_toggle(), GPENCIL_OT_paste(), GPENCIL_OT_primitive_box(), GPENCIL_OT_primitive_circle(), GPENCIL_OT_primitive_curve(), GPENCIL_OT_primitive_line(), GPENCIL_OT_primitive_polyline(), GPENCIL_OT_recalc_geometry(), GPENCIL_OT_reproject(), GPENCIL_OT_reset_transform_fill(), GPENCIL_OT_reveal(), GPENCIL_OT_sculpt_paint(), GPENCIL_OT_sculptmode_toggle(), GPENCIL_OT_select(), GPENCIL_OT_select_all(), GPENCIL_OT_select_alternate(), GPENCIL_OT_select_box(), GPENCIL_OT_select_circle(), GPENCIL_OT_select_first(), GPENCIL_OT_select_grouped(), GPENCIL_OT_select_lasso(), GPENCIL_OT_select_last(), GPENCIL_OT_select_less(), GPENCIL_OT_select_linked(), GPENCIL_OT_select_more(), GPENCIL_OT_select_random(), GPENCIL_OT_select_vertex_color(), GPENCIL_OT_selection_opacity_toggle(), GPENCIL_OT_selectmode_toggle(), GPENCIL_OT_set_active_material(), GPENCIL_OT_snap_cursor_to_selected(), GPENCIL_OT_snap_to_cursor(), GPENCIL_OT_snap_to_grid(), GPENCIL_OT_stroke_apply_thickness(), GPENCIL_OT_stroke_arrange(), GPENCIL_OT_stroke_caps_set(), GPENCIL_OT_stroke_change_color(), GPENCIL_OT_stroke_cutter(), GPENCIL_OT_stroke_cyclical_set(), GPENCIL_OT_stroke_editcurve_set_handle_type(), GPENCIL_OT_stroke_enter_editcurve_mode(), GPENCIL_OT_stroke_flip(), GPENCIL_OT_stroke_join(), GPENCIL_OT_stroke_merge(), GPENCIL_OT_stroke_merge_by_distance(), GPENCIL_OT_stroke_merge_material(), GPENCIL_OT_stroke_normalize(), GPENCIL_OT_stroke_reset_vertex_color(), GPENCIL_OT_stroke_sample(), GPENCIL_OT_stroke_separate(), GPENCIL_OT_stroke_simplify(), GPENCIL_OT_stroke_simplify_fixed(), GPENCIL_OT_stroke_smooth(), GPENCIL_OT_stroke_split(), GPENCIL_OT_stroke_subdivide(), GPENCIL_OT_stroke_trim(), GPENCIL_OT_trace_image(), GPENCIL_OT_transform_fill(), GPENCIL_OT_unlock_all(), GPENCIL_OT_vertex_color_brightness_contrast(), GPENCIL_OT_vertex_color_hsv(), GPENCIL_OT_vertex_color_invert(), GPENCIL_OT_vertex_color_levels(), GPENCIL_OT_vertex_color_set(), GPENCIL_OT_vertex_group_assign(), GPENCIL_OT_vertex_group_deselect(), GPENCIL_OT_vertex_group_invert(), GPENCIL_OT_vertex_group_normalize(), GPENCIL_OT_vertex_group_normalize_all(), GPENCIL_OT_vertex_group_remove_from(), GPENCIL_OT_vertex_group_select(), GPENCIL_OT_vertex_group_smooth(), GPENCIL_OT_vertex_paint(), GPENCIL_OT_vertexmode_toggle(), GPENCIL_OT_weight_paint(), GPENCIL_OT_weightmode_toggle(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ gpencil_stroke_editmode_curve_poll()

static bool gpencil_stroke_editmode_curve_poll ( bContext C)
static

◆ gpencil_stroke_editmode_poll()

static bool gpencil_stroke_editmode_poll ( bContext C)
static

Definition at line 45 of file gpencil_ops.c.

References C, CTX_data_gpencil_data(), bGPdata::flag, and GP_DATA_STROKE_EDITMODE.

Referenced by ed_keymap_gpencil_editing().

◆ gpencil_stroke_paintmode_draw_poll()

static bool gpencil_stroke_paintmode_draw_poll ( bContext C)
static

◆ gpencil_stroke_paintmode_erase_poll()

static bool gpencil_stroke_paintmode_erase_poll ( bContext C)
static

◆ gpencil_stroke_paintmode_fill_poll()

static bool gpencil_stroke_paintmode_fill_poll ( bContext C)
static

◆ gpencil_stroke_paintmode_poll()

static bool gpencil_stroke_paintmode_poll ( bContext C)
static

Definition at line 59 of file gpencil_ops.c.

References C, CTX_data_gpencil_data(), bGPdata::flag, and GP_DATA_STROKE_PAINTMODE.

Referenced by ed_keymap_gpencil_painting().

◆ gpencil_stroke_paintmode_poll_with_tool()

static bool gpencil_stroke_paintmode_poll_with_tool ( bContext C,
const char  gpencil_tool 
)
static

◆ gpencil_stroke_paintmode_tint_poll()

static bool gpencil_stroke_paintmode_tint_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_clone_poll()

static bool gpencil_stroke_sculptmode_clone_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_grab_poll()

static bool gpencil_stroke_sculptmode_grab_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_pinch_poll()

static bool gpencil_stroke_sculptmode_pinch_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_poll()

static bool gpencil_stroke_sculptmode_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_poll_with_tool()

static bool gpencil_stroke_sculptmode_poll_with_tool ( bContext C,
const char  gpencil_sculpt_tool 
)
static

◆ gpencil_stroke_sculptmode_push_poll()

static bool gpencil_stroke_sculptmode_push_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_randomize_poll()

static bool gpencil_stroke_sculptmode_randomize_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_smooth_poll()

static bool gpencil_stroke_sculptmode_smooth_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_strength_poll()

static bool gpencil_stroke_sculptmode_strength_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_thickness_poll()

static bool gpencil_stroke_sculptmode_thickness_poll ( bContext C)
static

◆ gpencil_stroke_sculptmode_twist_poll()

static bool gpencil_stroke_sculptmode_twist_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_average_poll()

static bool gpencil_stroke_vertexmode_average_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_blur_poll()

static bool gpencil_stroke_vertexmode_blur_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_draw_poll()

static bool gpencil_stroke_vertexmode_draw_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_poll()

static bool gpencil_stroke_vertexmode_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_poll_with_tool()

static bool gpencil_stroke_vertexmode_poll_with_tool ( bContext C,
const char  gpencil_vertex_tool 
)
static

◆ gpencil_stroke_vertexmode_replace_poll()

static bool gpencil_stroke_vertexmode_replace_poll ( bContext C)
static

◆ gpencil_stroke_vertexmode_smear_poll()

static bool gpencil_stroke_vertexmode_smear_poll ( bContext C)
static

◆ gpencil_stroke_weightmode_draw_poll()

static bool gpencil_stroke_weightmode_draw_poll ( bContext C)
static

◆ gpencil_stroke_weightmode_poll()

static bool gpencil_stroke_weightmode_poll ( bContext C)
static

◆ gpencil_stroke_weightmode_poll_with_tool()

static bool gpencil_stroke_weightmode_poll_with_tool ( bContext C,
const char  gpencil_weight_tool 
)
static