Page MenuHome

GPencil: Next steps for curve editing
Confirmed, NormalPublicTO DO


Status: In development.


Commissioner: @Antonio Vazquez (antoniov)
Project leader: @Falk David (filedescriptor)
Project members: @Daniel Martinez Lara (pepeland), @Matias Mendiola (mendio)


Big picture: The goal is to make a curve-based workflow possible that covers all areas in grease pencil (Drawing, Editing, Sculpting, etc.).

  • Merge "Curve Edit Mode" with Edit Mode.
  • Curves are editable just like strokes in Sculpt Mode, Vertex Paint, and Weight Paint.
  • Users can convert between curves and strokes using dedicated operators.
Work plan

Milestone 1 - Remove Curve Editing toggle
Remove the curve editing-related UI elements and code (like the keymap).

Milestone 2 - Selection operators
Adapt the selection operators to work for curves and strokes simultaneously. Some of the selection code might need a refactor as well.

Milestone 3 - Editing operators
Adapt/implement all the editing operators. Some of these might only need minor changes like checking if a stroke is a curve and then calling the right function (the bulk has already been implemented).

  • GPENCIL_OT_duplicate
  • GPENCIL_OT_delete
  • GPENCIL_OT_dissolve
  • GPENCIL_OT_copy
  • GPENCIL_OT_paste
  • GPENCIL_OT_extrude
  • GPENCIL_OT_move_to_layer
  • GPENCIL_OT_layer_active
  • GPENCIL_OT_snap_to_grid
  • GPENCIL_OT_snap_to_cursor
  • GPENCIL_OT_snap_cursor_to_selected
  • GPENCIL_OT_reproject
  • GPENCIL_OT_recalc_geometry
  • GPENCIL_OT_duplicate
  • GPENCIL_OT_delete
  • GPENCIL_OT_dissolve
  • GPENCIL_OT_copy
  • GPENCIL_OT_paste
  • GPENCIL_OT_extrude
  • GPENCIL_OT_convert
  • GPENCIL_OT_bake_mesh_animation
  • GPENCIL_OT_image_to_grease_pencil
  • GPENCIL_OT_trace_image
  • GPENCIL_OT_stroke_arrange
  • GPENCIL_OT_stroke_change_color
  • GPENCIL_OT_stroke_apply_thickness
  • GPENCIL_OT_stroke_cyclical_set
  • GPENCIL_OT_stroke_caps_set
  • GPENCIL_OT_stroke_join
  • GPENCIL_OT_stroke_flip
  • GPENCIL_OT_stroke_subdivide
  • GPENCIL_OT_stroke_simplify
  • GPENCIL_OT_stroke_simplify_fixed
  • GPENCIL_OT_stroke_separate
  • GPENCIL_OT_stroke_split
  • GPENCIL_OT_stroke_smooth
  • GPENCIL_OT_stroke_sample
  • GPENCIL_OT_stroke_merge
  • GPENCIL_OT_stroke_cutter
  • GPENCIL_OT_stroke_trim
  • GPENCIL_OT_stroke_merge_by_distance
  • GPENCIL_OT_stroke_merge_material
  • GPENCIL_OT_stroke_reset_vertex_color

Milestone 4 - Sculpting curves
Sculpting curves is similar to sculpting strokes. In fact, the only difference is that with curves, we sculpt the stroke points and then refit the curve after the operation. In order to make this work properly though, we need to be able to do partial curve refitting.

  • Do curve update if the stroke that was transformed is a curve. (rB7783f7ea1dc4)
  • Tag the points that have been transformed.
  • Change BKE_gpencil_stroke_editcurve_update to handle partial updates.
    • Create function to find curve segments that need updating.
    • Write BKE to do partial curve updates.

Milestone 5 - Drawing curves
To make curves part of all areas, we need at least one way to create curves directly in Draw Mode. There are multiple ideas:

  • Brush option: Setting that converts a drawn stroke to a curve on release. This would allow the user to automatically convert every stroke they draw to a curve (which they can then further edit in Edit Mode).
  • Curve pen tool: Dedicated tool that allows drawing a bézier curve. Similar to the pen tool in other software. (need a subtask for this)

Branch: temp-gpencil-bezier-v2