Page MenuHome

Curves: Support applying geometry nodes modifier
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Apr 22 2022, 8:54 PM.
Subscribers
None
Tokens
"Yellow Medal" token, awarded by duarteframos."Love" token, awarded by HEYPictures."Love" token, awarded by wilBr.

Details

Summary

This commit adds support for the curves object to the apply modifier
operator. A warning is added when the evaluated result of the modifier
doesn't contain any curves data.

I refactored the mesh function that removes anonymous attributes
to work on geometry components instead, so it's reusable for the
curves type. I'll commit that change separately.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested changes to this revision.Apr 25 2022, 5:02 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/blenkernel/intern/attribute_access.cc
931 ↗(On Diff #50713)

This is a bit problematic, because the AttributeIDRef point to memory that is being changed by attribute_try_delete (the attribute names).
For that reason, CustomData_free_layers_anonymous uses a different approach. Also, either this should use CustomData_free_layers_anonymous, or CustomData_free_layers_anonymous can be removed.

This revision now requires changes to proceed.Apr 25 2022, 5:02 PM
  • Replace anonymous layer removal completely
source/blender/blenkernel/intern/attribute_access.cc
931 ↗(On Diff #50713)

I think this current version should work, because reallocating the custom data layers array shouldn't reallocate the anonymous IDs. I made that a bit more explicit in the updated function. How does it look to you?

This revision is now accepted and ready to land.Apr 26 2022, 11:01 AM