9956ef4622d991695a9e1570ceff223ecfd22720
Non-editable prop collection items would always fall back to the slower loop in `rna_raw_access`. This patch changes `RNA_property_collection_raw_array` to only fail with non-editable items when intending to set values, allowing for the faster raw array access to occur when reading values in `rna_raw_access`. This brings the Python API `bpy_prop_collection.foreach_get` performance of `Mesh.vertex_normals`/`polygon_normals`/`corner_normals` up to the same speed as generic `FLOAT_VECTOR` attributes with the same domains. Given a mesh with 393216 corners: Using `foreach_get` with the "vector" prop and a compatible buffer object: - Corner vector attribute: ~0.9ms - Corner normals (before): ~7.9ms - Corner normals (after): ~0.9ms Using `foreach_get` with the "vector" prop and a Python list: - Corner vector attribute: ~11.0ms - Corner normals (before): ~18.0ms - Corner normals (after): ~11.0ms Pull Request: https://projects.blender.org/blender/blender/pulls/114063
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
