diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-20 02:01:04 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-20 02:01:04 +0300 |
commit | e9f82d3dc7eebadcc52fdc43858d060c3a8214b2 (patch) | |
tree | 7f1e24da1ad0da9cbe29f8be30f35ca6d90df319 /source/blender/makesdna | |
parent | 28985ccc05ff15dd22184863b8c57a0851fc9614 (diff) |
Curves: Remove redundant custom data pointers
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.
Differential Revision: https://developer.blender.org/D15486
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_curves_types.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h index ed909c283c4..89deeec898b 100644 --- a/source/blender/makesdna/DNA_curves_types.h +++ b/source/blender/makesdna/DNA_curves_types.h @@ -67,23 +67,6 @@ typedef enum NormalMode { */ typedef struct CurvesGeometry { /** - * A runtime pointer to the "position" attribute data. - * \note This data is owned by #point_data. - */ - float (*position)[3]; - /** - * A runtime pointer to the "radius" attribute data. - * \note This data is owned by #point_data. - */ - float *radius; - - /** - * The type of each curve. #CurveType. - * \note This data is owned by #curve_data. - */ - int8_t *curve_type; - - /** * The start index of each curve in the point data. The size of each curve can be calculated by * subtracting the offset from the next offset. That is valid even for the last curve because * this array is allocated with a length one larger than the number of curves. This is allowed |