Page MenuHome

Curves: Port delete geometry node to the new curves type
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jun 5 2022, 9:07 PM.

Details

Summary

Add a method to remove points from the new curves type, just like
the existing curve removal function. No functional changes are expected.
The code is simpler because all data is just stored as attributes, but
also different because the point data for all curves is stored in the same
arrays.

I would expect similar performance improvements for cases where there
are many curves, especially many small curves.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested changes to this revision.Jun 7 2022, 12:40 PM

There is still a bug:

source/blender/blenkernel/intern/curves_geometry.cc
1116

Should have an assert that both ranges have the same size?

1121

Make Span parameters const, same below.

1125

why vert?

1157

const

This revision now requires changes to proceed.Jun 7 2022, 12:40 PM
Hans Goudey (HooglyBoogly) marked 4 inline comments as done.Jun 9 2022, 10:41 AM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/blenkernel/intern/curves_geometry.cc
1125

I copied this from some other file. We really should have this implemented somewhere so we don't have to keep copying it around.

Hans Goudey (HooglyBoogly) marked an inline comment as done.
  • Fix non-thread-safe incrementing of point counts
  • Cleanup: comments, variable names
  • Add another early return to "remove" functions
This revision is now accepted and ready to land.Jun 9 2022, 11:13 AM