Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_edit.c
| Show First 20 Lines • Show All 3,542 Lines • ▼ Show 20 Lines | if (gps->flag & GP_STROKE_SELECT) { | ||||
| if (smooth_position) { | if (smooth_position) { | ||||
| BKE_gpencil_smooth_stroke(gps, i, factor); | BKE_gpencil_smooth_stroke(gps, i, factor); | ||||
| } | } | ||||
| if (smooth_strength) { | if (smooth_strength) { | ||||
| BKE_gpencil_smooth_stroke_strength(gps, i, factor); | BKE_gpencil_smooth_stroke_strength(gps, i, factor); | ||||
| } | } | ||||
| if (smooth_thickness) { | if (smooth_thickness) { | ||||
| /* thickness need to repeat process several times */ | /* thickness need to repeat process several times */ | ||||
| for (int r2 = 0; r2 < r * 10; r2++) { | for (int r2 = 0; r2 < r * 20; r2++) { | ||||
| BKE_gpencil_smooth_stroke_thickness(gps, i, factor); | BKE_gpencil_smooth_stroke_thickness(gps, i, factor); | ||||
| } | } | ||||
| } | } | ||||
| if (smooth_uv) { | if (smooth_uv) { | ||||
| BKE_gpencil_smooth_stroke_uv(gps, i, factor); | BKE_gpencil_smooth_stroke_uv(gps, i, factor); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 739 Lines • ▼ Show 20 Lines | void GPENCIL_OT_stroke_smooth(wmOperatorType *ot) | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = gp_stroke_smooth_exec; | ot->exec = gp_stroke_smooth_exec; | ||||
| ot->poll = gp_active_layer_poll; | ot->poll = gp_active_layer_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| /* properties */ | /* properties */ | ||||
| prop = RNA_def_int(ot->srna, "repeat", 1, 1, 10, "Repeat", "", 1, 5); | prop = RNA_def_int(ot->srna, "repeat", 1, 1, 50, "Repeat", "", 1, 20); | ||||
| RNA_def_property_flag(prop, PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_SKIP_SAVE); | ||||
| RNA_def_float(ot->srna, "factor", 0.5f, 0.0f, 2.0f, "Factor", "", 0.0f, 2.0f); | RNA_def_float(ot->srna, "factor", 0.5f, 0.0f, 2.0f, "Factor", "", 0.0f, 2.0f); | ||||
| RNA_def_boolean(ot->srna, | RNA_def_boolean(ot->srna, | ||||
| "only_selected", | "only_selected", | ||||
| true, | true, | ||||
| "Selected Points", | "Selected Points", | ||||
| "Smooth only selected points in the stroke"); | "Smooth only selected points in the stroke"); | ||||
| ▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines | |||||