Page MenuHome

Curves: Remove redundant custom data pointers
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jul 18 2022, 9:54 PM.

Details

Summary

These mutable pointers present problems with ownership in
relation to proper copy-on-write for attributes. The simplest
solution is to just remove them and retrieve the layers from
CustomData when they are needed. This also removes the
complexity and redundancy of having to update the pointers
as the curves change. A similar change will apply to meshes
and point clouds.

One downside of this change is that it makes random access
with RNA slower. However, it's simple to just use the RNA
attribute API instead, which is unaffected. In this patch I
updated Cycles to do that. With the future attribute CoW
changes, this generic approach makes sense because Cycles
can just request ownership of the existing arrays.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)

Update Cycles to use attributes

This revision is now accepted and ready to land.Jul 19 2022, 7:19 PM