private static IEnumerable <T> ToKeys <T>(IEnumerable <T> allKeys, int flags) { var keyFlagPairs = VRChatToVRMWizard.ToKeyFlagPairs(allKeys); var keys = new List <T>(); foreach (var(key, flag) in keyFlagPairs) { if ((flags & flag) != 0) { keys.Add(key); } } return(keys); }
private static int ToFlags <T>(IEnumerable <T> allKeys, IEnumerable <T> keys) { var keyFlagPairs = VRChatToVRMWizard.ToKeyFlagPairs(allKeys); var flags = 0; foreach (var key in keys) { if (!keyFlagPairs.ContainsKey(key)) { // UnityEditorMaxMultiSelectCountオーバー continue; } flags |= keyFlagPairs[key]; } return(flags); }