[Bf-blender-cvs] [02215eaae42] soc-2020-greasepencil-curve: GPencil: remove test operator
Falk David
noreply at git.blender.org
Fri Jul 3 17:21:33 CEST 2020
Commit: 02215eaae42823cf5756e1bfaa2e42f288e8825d
Author: Falk David
Date: Fri Jul 3 17:13:02 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rB02215eaae42823cf5756e1bfaa2e42f288e8825d
GPencil: remove test operator
This operator has no use and can be safely removed.
===================================================================
M source/blender/editors/gpencil/gpencil_edit_curve.c
M source/blender/editors/gpencil/gpencil_intern.h
M source/blender/editors/gpencil/gpencil_ops.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_edit_curve.c b/source/blender/editors/gpencil/gpencil_edit_curve.c
index 9692ca28082..6edc6009fac 100644
--- a/source/blender/editors/gpencil/gpencil_edit_curve.c
+++ b/source/blender/editors/gpencil/gpencil_edit_curve.c
@@ -70,68 +70,6 @@ static bool gpencil_curve_edit_mode_poll(bContext *C)
return (gpl != NULL);
}
-/* -------------------------------------------------------------------- */
-/** \name Test Operator for curve editing
- * \{ */
-
-static int gpencil_write_stroke_curve_data_exec(bContext *C, wmOperator *op)
-{
- Object *ob = CTX_data_active_object(C);
- bGPdata *gpd = ob->data;
-
- // int num_points = RNA_int_get(op->ptr, "num_points");
-
- if (ELEM(NULL, gpd)) {
- return OPERATOR_CANCELLED;
- }
-
- bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd);
- bGPDframe *gpf = gpl->actframe;
- if (ELEM(NULL, gpf)) {
- return OPERATOR_CANCELLED;
- }
-
- LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- if (gps->flag & GP_STROKE_SELECT) {
- if (gps->editcurve != NULL) {
- BKE_gpencil_free_stroke_editcurve(gps);
- }
- BKE_gpencil_stroke_editcurve_update(gps, gpd->curve_edit_threshold);
- if (gps->editcurve != NULL) {
- gps->editcurve->resolution = gpd->editcurve_resolution;
- }
- }
- }
-
- /* notifiers */
- DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
- WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void GPENCIL_OT_write_sample_stroke_curve_data(wmOperatorType *ot)
-{
- // PropertyRNA *prop;
-
- /* identifiers */
- ot->name = "Write sample stroke curve data";
- ot->idname = "GPENCIL_OT_write_stroke_curve_data";
- ot->description =
- "Test operator to write sample curve data to the selected grease pencil strokes";
-
- /* api callbacks */
- ot->exec = gpencil_write_stroke_curve_data_exec;
- ot->poll = gpencil_active_layer_poll;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- /* properties */
- // prop = RNA_def_int(
- // ot->srna, "num_points", 2, 0, 100, "Curve points", "Number of test curve points", 0, 100);
-}
-
static int gpencil_stroke_enter_editcurve_mode(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 7473e7dc56f..10fc234f4c6 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -449,7 +449,6 @@ void GPENCIL_OT_recalc_geometry(struct wmOperatorType *ot);
/* stroke editcurve */
-void GPENCIL_OT_write_sample_stroke_curve_data(struct wmOperatorType *ot);
void GPENCIL_OT_stroke_enter_editcurve_mode(struct wmOperatorType *ot);
void GPENCIL_OT_stroke_editcurve_set_handle_type(struct wmOperatorType *ot);
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 05a47492bb6..8eab22905ed 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -588,7 +588,6 @@ void ED_operatortypes_gpencil(void)
/* Edit stroke editcurve */
- WM_operatortype_append(GPENCIL_OT_write_sample_stroke_curve_data);
WM_operatortype_append(GPENCIL_OT_stroke_enter_editcurve_mode);
WM_operatortype_append(GPENCIL_OT_stroke_editcurve_set_handle_type);
More information about the Bf-blender-cvs
mailing list