72 if (gpf == gpl->actframe) {
102 ot->
name =
"Enter curve edit mode";
103 ot->
idname =
"GPENCIL_OT_stroke_enter_editcurve_mode";
104 ot->
description =
"Called to transform a stroke into a curve";
120 "Threshold on the maximum deviation from the actual stroke",
144 for (
int i = 0; i < gpc->tot_curve_points; i++) {
151 bezt->
h1 = handle_type;
152 bezt->
h2 = handle_type;
156 bezt->
h1 = handle_type;
159 bezt->
h2 = handle_type;
181 {
HD_FREE,
"FREE", 0,
"Free",
""},
182 {
HD_AUTO,
"AUTOMATIC", 0,
"Automatic",
""},
183 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
184 {
HD_ALIGN,
"ALIGNED", 0,
"Aligned",
""},
189 ot->
name =
"Set handle type";
190 ot->
idname =
"GPENCIL_OT_stroke_editcurve_set_handle_type";
struct Object * CTX_data_active_object(const bContext *C)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_stroke_editcurve_update(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDstroke *gps)
void BKE_gpencil_editcurve_stroke_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps, struct bGPDcurve *gpc)
void BKE_gpencil_editcurve_recalculate_handles(struct bGPDstroke *gps)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
#define LISTBASE_FOREACH(type, var, list)
void DEG_id_tag_update(struct ID *id, int flag)
@ GP_CURVE_NEEDS_STROKE_UPDATE
@ GP_STROKE_NEEDS_CURVE_UPDATE
@ GP_DATA_CURVE_EDIT_MODE
#define GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)
void GPENCIL_OT_stroke_enter_editcurve_mode(wmOperatorType *ot)
static bool gpencil_curve_edit_mode_poll(bContext *C)
void GPENCIL_OT_stroke_editcurve_set_handle_type(wmOperatorType *ot)
static int gpencil_stroke_enter_editcurve_mode_exec(bContext *C, wmOperator *op)
static int gpencil_editcurve_set_handle_type_exec(bContext *C, wmOperator *op)
#define GP_EDITABLE_CURVES_END(gpstroke_iter)
#define GP_EDITABLE_CURVES_BEGIN(gpstroke_iter, C, gpl, gps, gpc)
bool gpencil_active_layer_poll(struct bContext *C)
float RNA_float_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
float curve_edit_threshold
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))