 void UpdateBitSelection(UIElement@ parent)
 {
     int mask = 0;
-    const int MAX_MASK_BITS = 8;
-    for (int i = 0; i < MAX_MASK_BITS; i++)
+    for (int i = 0; i < MAX_BITMASK_BITS; i++)
     {
         CheckBox@ bitBox = parent.GetChild("BitSelect_" + String(i), true);
         mask = mask | (bitBox.checked ? 1 << i : 0);
     }
 
-    if (mask == (1 << MAX_MASK_BITS) - 1 )
+    if (mask == MAX_BITMASK_VALUE)
         mask = -1;
 
     inUpdateBitSelection = true;

// Exceptions for string attributes that should not be continuously edited
Array<String> noTextChangedAttrs = {"Script File", "Class Name", "Script Object Type", "Script File Name"};

WeakHandle testAnimState;

bool dragEditAttribute = false;

{
    UIElement@ parent = CreateAttributeEditorParent(list, info.name, index, subIndex);

    // Check for masks and layers
    if (bitSelectionAttrs.Find(info.name) > -1)
    {
        LineEdit@ attrEdit = CreateAttributeBitSelector(parent, serializables, index, subIndex);
    }
    // Check for enums
    else if (info.enumNames is null || info.enumNames.empty)
