Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-07-20 02:01:04 +0300
committerHans Goudey <h.goudey@me.com>2022-07-20 02:01:04 +0300
commite9f82d3dc7eebadcc52fdc43858d060c3a8214b2 (patch)
tree7f1e24da1ad0da9cbe29f8be30f35ca6d90df319 /source/blender/geometry
parent28985ccc05ff15dd22184863b8c57a0851fc9614 (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/geometry')
-rw-r--r--source/blender/geometry/intern/resample_curves.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/geometry/intern/resample_curves.cc b/source/blender/geometry/intern/resample_curves.cc
index c9b8a032ce6..2c3a6c6e0cf 100644
--- a/source/blender/geometry/intern/resample_curves.cc
+++ b/source/blender/geometry/intern/resample_curves.cc
@@ -162,8 +162,6 @@ static void gather_point_attributes_to_interpolate(const CurveComponent &src_com
result.src_no_interpolation,
result.dst_no_interpolation,
result.dst_attributes);
-
- dst_curves.update_customdata_pointers();
}
static Curves *resample_to_uniform(const CurveComponent &src_component,