From 0829619519087a2e960a42aa3551b53cb019d30d Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sat, 14 Mar 2026 15:55:59 +0100 Subject: [PATCH] Fix old Blender versions: `color_srgb` appeared in 3.4 --- mesh/mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/mesh.py b/mesh/mesh.py index f28ca44..b1a161f 100644 --- a/mesh/mesh.py +++ b/mesh/mesh.py @@ -81,7 +81,7 @@ def mesh_to_buffers(mesh: bpy.types.Mesh) -> MeshBuffers: color_layer = getColorLayer(mesh, layer="Col") if color_layer is not None: colors_tmp = np.empty((len(color_layer), 4), dtype=np.float32) - if bpy.app.version > (3, 2, 0): + if bpy.app.version >= (3, 4, 0): color_layer.foreach_get("color_srgb", colors_tmp.ravel()) else: # vectorized linear -> sRGB conversion color_layer.foreach_get("color", colors_tmp.ravel())