Page MenuHome

Cleanup: Avoid duplication when generating strokes in line art
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jul 14 2021, 6:23 AM.

Details

Summary

The BKE_gpencil_stroke_add_points API function worked well for
creating the primitives in the add object menu, but it expected a specific
data format that doesn't make sense in a dynamic context. As evidence
of that we can see the way source data was duplicated in the line art
file just to use this API function.

This commit solves that problem in two ways:

  • Clean up the line art function (this would make it faster too).
  • Move and rename the function so it's clear that it's meant to be used for primitives only.

Diff Detail

Repository
rB Blender
Branch
gpencil-sanitize-new-points-create (branched from master)
Build Status
Buildable 15811
Build 15811: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jul 14 2021, 6:23 AM
Hans Goudey (HooglyBoogly) created this revision.

Huh it's looking nicer indeed. I think the process is to include this into master first then I merge it?

This revision is now accepted and ready to land.Jul 14 2021, 6:43 AM

LGTM.

Now it's better than before because the BKE was added some time ago thinking it would be used in more places, but now it's more logic to keep only in the module as ED_