Fix is_null not updating when adding new attribute subitems #6869

This commit is contained in:
Andrej730
2025-07-10 11:13:34 +05:00
parent eed42b8fac
commit ef5d1448da
+10
View File
@@ -1437,6 +1437,11 @@ class BIM_OT_attribute_add_subitem(bpy.types.Operator):
def execute(self, context) -> set["rna_enums.OperatorReturnItems"]:
col: bpy.types.bpy_prop_collection_idprop[StrProperty]
col = eval(self.data_path)
attr: "Attribute" = col.data
if attr.is_optional and not col:
attr.is_null = False
col.add()
return {"FINISHED"}
@@ -1459,4 +1464,9 @@ class BIM_OT_attribute_remove_subitem(bpy.types.Operator):
col: bpy.types.bpy_prop_collection_idprop[StrProperty]
col = eval(self.data_path)
col.remove(self.index)
attr: "Attribute" = col.data
if attr.is_optional and not col:
attr.is_null = True
return {"FINISHED"}