diff --git a/Engine/source/console/dynamicTypes.h b/Engine/source/console/dynamicTypes.h index 7f0fdf4cc..65476f00f 100644 --- a/Engine/source/console/dynamicTypes.h +++ b/Engine/source/console/dynamicTypes.h @@ -267,7 +267,7 @@ class BitfieldConsoleBaseType : public ConsoleBaseType if (inString.find((*tbl)[i].getName()) != String::NPos) mask.set(BIT(i)); } - retVal = mask; + retVal = mask.getMask(); } *((S32*)dptr) = retVal; } diff --git a/Engine/source/gui/editor/guiInspectorTypes.cpp b/Engine/source/gui/editor/guiInspectorTypes.cpp index e12e61b97..127ca86ce 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.cpp +++ b/Engine/source/gui/editor/guiInspectorTypes.cpp @@ -1522,6 +1522,24 @@ void GuiInspectorTypeBitMask32::setValue( StringTableEntry value ) { U32 mask = dAtoui( value ); + if (mask == 0 && mask != -1) //zero we need to double check. -1 we know is all on + { + BitSet32 bitMask; + const EnumTable* tbl = mInspector->getInspectObject(0)->getClassRep()->getEnumTable(); + if (tbl) + { + const U32 numEnums = tbl->getNumValues(); + String inString(value); + + for (U32 i = 0; i < numEnums; i++) + { + if (inString.find((*tbl)[i].getName()) != String::NPos) + bitMask.set(BIT(i)); + } + mask = bitMask.getMask(); + } + } + for ( U32 i = 0; i < mArrayCtrl->size(); i++ ) { GuiCheckBoxCtrl *pCheckBox = dynamic_cast( mArrayCtrl->at(i) );