From 2b9aa55a034fa93cf5eaafa88d4917ec67cf3b7f Mon Sep 17 00:00:00 2001 From: Thomas Barlow Date: Wed, 10 Jan 2024 20:30:19 +0100 Subject: [PATCH] RNA: Remove bitmask from BoolAttributeValue.value Bool attributes are treated as contiguous arrays of `bool` rather than using a bitmask. Using a bitmask also disables raw array access, and with raw array access, the property is faster to access through the Python API with bpy_rna.cc#foreach_getset. Pull Request: https://projects.blender.org/blender/blender/pulls/116997 --- source/blender/makesrna/intern/rna_attribute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_attribute.cc b/source/blender/makesrna/intern/rna_attribute.cc index 3901a121fb2..aca5c5ae761 100644 --- a/source/blender/makesrna/intern/rna_attribute.cc +++ b/source/blender/makesrna/intern/rna_attribute.cc @@ -1013,7 +1013,7 @@ static void rna_def_attribute_bool(BlenderRNA *brna) RNA_def_struct_sdna(srna, "MBoolProperty"); RNA_def_struct_ui_text(srna, "Bool Attribute Value", "Bool value in geometry attribute"); prop = RNA_def_property(srna, "value", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, nullptr, "b", 0x01); + RNA_def_property_boolean_sdna(prop, nullptr, "b", 0); } static void rna_def_attribute_int8(BlenderRNA *brna)