Blender  V3.3
mask_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "ED_clip.h"
11 
12 struct Mask;
13 struct bContext;
14 struct wmOperatorType;
15 
16 /* internal exports only */
17 
18 /* mask_add.c */
19 
24 
25 /* mask_ops.c */
26 
27 struct Mask *ED_mask_new(struct bContext *C, const char *name);
31 struct MaskLayer *ED_mask_layer_ensure(struct bContext *C, bool *r_added_mask);
32 
33 void MASK_OT_new(struct wmOperatorType *ot);
34 void MASK_OT_layer_new(struct wmOperatorType *ot);
37 
40 
41 void MASK_OT_delete(struct wmOperatorType *ot);
42 
47 /* Named to match mesh recalculate normals. */
49 
51 
53 
54 void MASK_OT_duplicate(struct wmOperatorType *ot);
57 
58 /* mask_relationships.c */
59 
63 
64 /* mask_select.c */
65 
66 void MASK_OT_select(struct wmOperatorType *ot);
68 
76 
77 /* 'check' select */
78 bool ED_mask_spline_select_check(const struct MaskSpline *spline);
79 bool ED_mask_layer_select_check(const struct MaskLayer *mask_layer);
80 bool ED_mask_select_check(const struct Mask *mask);
81 
82 void ED_mask_spline_select_set(struct MaskSpline *spline, bool do_select);
83 void ED_mask_layer_select_set(struct MaskLayer *mask_layer, bool do_select);
84 void ED_mask_select_toggle_all(struct Mask *mask, int action);
85 void ED_mask_select_flush_all(struct Mask *mask);
86 
87 /* mask_editor.c */
88 
89 /* Generalized solution for preserving editor viewport when making changes while lock-to-selection
90  * is enabled.
91  * Any mask operator can use this API, without worrying that some editors do not have an idea of
92  * lock-to-selection. */
93 
94 typedef struct MaskViewLockState {
97 
100  const MaskViewLockState *state);
101 
102 /* mask_query.c */
103 
105  struct Mask *mask,
106  const float normal_co[2],
107  int threshold,
108  bool feather,
109  float tangent[2],
110  bool use_deform,
111  bool use_project,
112  struct MaskLayer **r_mask_layer,
113  struct MaskSpline **r_spline,
114  struct MaskSplinePoint **r_point,
115  float *r_u,
116  float *r_score);
118  struct Mask *mask,
119  const float normal_co[2],
120  float threshold,
121  struct MaskLayer **r_mask_layer,
122  struct MaskSpline **r_spline,
123  struct MaskSplinePoint **r_point,
124  struct MaskSplinePointUW **r_uw,
125  float *r_score);
127  struct Mask *mask,
128  const float normal_co[2],
129  float threshold,
130  struct MaskLayer **r_mask_layer,
131  struct MaskSpline **r_spline,
132  eMaskWhichHandle *r_which_handle,
133  float *r_score);
134 
135 /* mask_shapekey.c */
136 
eMaskWhichHandle
Definition: BKE_mask.h:31
#define C
Definition: RandGen.cpp:25
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
const int state
void ED_mask_select_flush_all(struct Mask *mask)
Definition: mask_select.c:145
void MASK_OT_select(struct wmOperatorType *ot)
Definition: mask_select.c:389
void MASK_OT_primitive_circle_add(struct wmOperatorType *ot)
Definition: mask_add.c:855
void MASK_OT_new(struct wmOperatorType *ot)
Definition: mask_ops.c:104
void MASK_OT_shape_key_clear(struct wmOperatorType *ot)
void MASK_OT_select_circle(struct wmOperatorType *ot)
Definition: mask_select.c:735
void MASK_OT_slide_point(struct wmOperatorType *ot)
Definition: mask_ops.c:898
void MASK_OT_hide_view_clear(struct wmOperatorType *ot)
Definition: mask_ops.c:1730
void MASK_OT_hide_view_set(struct wmOperatorType *ot)
Definition: mask_ops.c:1791
void MASK_OT_duplicate(struct wmOperatorType *ot)
Definition: mask_ops.c:2037
bool ED_mask_find_nearest_diff_point(const struct bContext *C, struct Mask *mask, const float normal_co[2], int threshold, bool feather, float tangent[2], bool use_deform, bool use_project, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, struct MaskSplinePoint **r_point, float *r_u, float *r_score)
void ED_mask_view_lock_state_restore_no_jump(const struct bContext *C, const MaskViewLockState *state)
void MASK_OT_select_less(struct wmOperatorType *ot)
Definition: mask_select.c:975
void MASK_OT_slide_spline_curvature(struct wmOperatorType *ot)
Definition: mask_ops.c:1290
void MASK_OT_delete(struct wmOperatorType *ot)
Definition: mask_ops.c:1486
void MASK_OT_layer_new(struct wmOperatorType *ot)
Definition: mask_ops.c:140
void MASK_OT_select_linked_pick(struct wmOperatorType *ot)
Definition: mask_select.c:801
void MASK_OT_add_feather_vertex(struct wmOperatorType *ot)
Definition: mask_add.c:672
void MASK_OT_switch_direction(struct wmOperatorType *ot)
Definition: mask_ops.c:1545
struct MaskViewLockState MaskViewLockState
void MASK_OT_shape_key_rekey(struct wmOperatorType *ot)
void MASK_OT_handle_type_set(struct wmOperatorType *ot)
Definition: mask_ops.c:1677
void MASK_OT_normals_make_consistent(struct wmOperatorType *ot)
Definition: mask_ops.c:1607
void MASK_OT_shape_key_insert(struct wmOperatorType *ot)
Definition: mask_shapekey.c:61
struct Mask * ED_mask_new(struct bContext *C, const char *name)
Definition: mask_ops.c:41
void MASK_OT_select_more(struct wmOperatorType *ot)
Definition: mask_select.c:955
void MASK_OT_copy_splines(struct wmOperatorType *ot)
Definition: mask_ops.c:2068
void MASK_OT_primitive_square_add(struct wmOperatorType *ot)
Definition: mask_add.c:890
void MASK_OT_shape_key_feather_reset(struct wmOperatorType *ot)
void MASK_OT_layer_remove(struct wmOperatorType *ot)
Definition: mask_ops.c:175
void MASK_OT_select_all(struct wmOperatorType *ot)
Definition: mask_select.c:214
void ED_mask_layer_select_set(struct MaskLayer *mask_layer, bool do_select)
Definition: mask_select.c:95
void MASK_OT_feather_weight_clear(struct wmOperatorType *ot)
Definition: mask_ops.c:1843
void MASK_OT_parent_clear(struct wmOperatorType *ot)
void ED_mask_select_toggle_all(struct Mask *mask, int action)
Definition: mask_select.c:108
void MASK_OT_layer_move(struct wmOperatorType *ot)
Definition: mask_ops.c:1911
bool ED_mask_layer_select_check(const struct MaskLayer *mask_layer)
void MASK_OT_select_lasso(struct wmOperatorType *ot)
Definition: mask_select.c:617
struct MaskLayer * ED_mask_layer_ensure(struct bContext *C, bool *r_added_mask)
Definition: mask_ops.c:71
void MASK_OT_select_box(struct wmOperatorType *ot)
Definition: mask_select.c:494
void MASK_OT_cyclic_toggle(struct wmOperatorType *ot)
Definition: mask_ops.c:1330
void ED_mask_spline_select_set(struct MaskSpline *spline, bool do_select)
Definition: mask_select.c:79
bool ED_mask_spline_select_check(const struct MaskSpline *spline)
void ED_mask_view_lock_state_store(const struct bContext *C, MaskViewLockState *state)
bool ED_mask_select_check(const struct Mask *mask)
void MASK_OT_paste_splines(struct wmOperatorType *ot)
Definition: mask_ops.c:2112
void MASK_OT_select_linked(struct wmOperatorType *ot)
Definition: mask_select.c:856
void MASK_OT_add_vertex(struct wmOperatorType *ot)
Definition: mask_add.c:576
bool ED_mask_feather_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, struct MaskSplinePoint **r_point, struct MaskSplinePointUW **r_uw, float *r_score)
struct MaskSplinePoint * ED_mask_point_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, eMaskWhichHandle *r_which_handle, float *r_score)
void MASK_OT_parent_set(struct wmOperatorType *ot)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
ClipViewLockState space_clip_state
Definition: mask_intern.h:95
wmOperatorType * ot
Definition: wm_files.c:3479