Fix: Reversed attribute is_internal RNA property
`is_internal` is supposed to mean that the attribute shouldn't be visible in lists or the spreadsheet by default, and that it can't be accessed in geometry nodes. But the value was reversed, which just happened to work because the list filtering was swapped. Differential Revision: https://developer.blender.org/D16680
This commit is contained in:
parent
6191b726aa
commit
095b363899
Notes:
blender-bot
2023-02-14 02:43:21 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
|
@ -83,7 +83,7 @@ class CURVES_UL_attributes(UIList):
|
|||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
flags.append(0 if item.is_internal else self.bitflag_filter_item)
|
||||
|
||||
return flags, indices
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@ class MESH_UL_attributes(UIList):
|
|||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
flags.append(0 if item.is_internal else self.bitflag_filter_item)
|
||||
|
||||
return flags, indices
|
||||
|
||||
|
@ -617,9 +617,9 @@ class ColorAttributesListBase():
|
|||
skip = (
|
||||
(item.domain not in {"POINT", "CORNER"}) or
|
||||
(item.data_type not in {"FLOAT_COLOR", "BYTE_COLOR"}) or
|
||||
(not item.is_internal)
|
||||
item.is_internal
|
||||
)
|
||||
ret.append(self.bitflag_filter_item if not skip else 0)
|
||||
ret.append(0 if skip else self.bitflag_filter_item)
|
||||
idxs.append(idx)
|
||||
|
||||
return ret, idxs
|
||||
|
|
|
@ -71,7 +71,7 @@ class POINTCLOUD_UL_attributes(UIList):
|
|||
indices = [i for i in range(len(attributes))]
|
||||
|
||||
for item in attributes:
|
||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||
flags.append(0 if item.is_internal else self.bitflag_filter_item)
|
||||
|
||||
return flags, indices
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ static int rna_Attribute_domain_get(PointerRNA *ptr)
|
|||
static bool rna_Attribute_is_internal_get(PointerRNA *ptr)
|
||||
{
|
||||
const CustomDataLayer *layer = (const CustomDataLayer *)ptr->data;
|
||||
return BKE_attribute_allow_procedural_access(layer->name);
|
||||
return !BKE_attribute_allow_procedural_access(layer->name);
|
||||
}
|
||||
|
||||
static void rna_Attribute_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
||||
|
|
Loading…
Reference in New Issue