private void Awake() { GetEWScriptableObject(); matSearch = (MaterialSearch)eWSettings.materialSearch; matName = (MaterialName)eWSettings.materialName; moveMaterials = eWSettings.moveMaterials; assignmentMethod = (AssignmentMethod)eWSettings.assignmentMethod; }
void OnGUI() { float windowWidth = position.width - 25; scrollPos = EditorGUILayout.BeginScrollView(scrollPos); if (eWSettings == null) { GetEWScriptableObject(); } //------------------------------------ Extract Materials ----------------------------------------- EditorGUILayout.Space(); EditorGUILayout.LabelField("Extract Materials from Models", EditorStyles.boldLabel, GUILayout.Width(windowWidth)); EditorGUILayout.Space(); matSearch = (MaterialSearch)EditorGUILayout.EnumPopup("Material Search:", (MaterialSearch)eWSettings.materialSearch, GUILayout.Width(windowWidth)); matName = (MaterialName)EditorGUILayout.EnumPopup("Material Name:", (MaterialName)eWSettings.materialName, GUILayout.Width(windowWidth)); if (eWSettings.materialSearch != (int)matSearch || eWSettings.materialName != (int)matName) { eWSettings.materialSearch = (int)matSearch; eWSettings.materialName = (int)matName; SaveSettings(); } EditorGUILayout.Space(); moveMaterials = GUILayout.Toggle(eWSettings.moveMaterials, "Move Extracted Materials to Folder", GUILayout.Width(windowWidth)); if (eWSettings.moveMaterials != moveMaterials) { eWSettings.moveMaterials = moveMaterials; SaveSettings(); } if (moveMaterials) { EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.TextField(eWSettings.materialFolderPath, GUILayout.ExpandWidth(true)); if (GUILayout.Button("Browse", GUILayout.ExpandWidth(false))) { eWSettings.materialFolderPath = EditorUtility.SaveFolderPanel("Material Folder", eWSettings.materialFolderPath, Application.dataPath); SaveSettings(); } EditorGUILayout.EndHorizontal(); if (!eWSettings.materialFolderPath.Contains(Application.dataPath)) { EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.HelpBox("Choose the folder in Project", MessageType.Error); EditorGUILayout.EndHorizontal(); } EditorGUILayout.Space(); } //------------------------------------ Texture Assignment Tool ----------------------------------------- EditorGUILayout.Space(); EditorGUILayout.LabelField("Texture Assignment Tool", EditorStyles.boldLabel, GUILayout.Width(windowWidth)); EditorGUILayout.Space(); assignmentMethod = (AssignmentMethod)EditorGUILayout.EnumPopup("Texture Search Method:", (AssignmentMethod)eWSettings.assignmentMethod, GUILayout.Width(windowWidth)); if (eWSettings.assignmentMethod != (int)assignmentMethod) { eWSettings.assignmentMethod = (int)assignmentMethod; SaveSettings(); } assignmentProfileIndex = EditorGUILayout.Popup("Assignment Profiles:", assignmentProfileIndex, assignmentProfiles, GUILayout.Width(windowWidth)); if (assignmentProfileIndex < assignmentProfiles.Length - 1) { EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField("Shader Full Name:", EditorStyles.boldLabel, GUILayout.Width(windowWidth / 2)); EditorGUILayout.LabelField(eWSettings.assignmentProfilesList[assignmentProfileIndex].shaderName, GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); } else { EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField("Profile Name:", GUILayout.Width(windowWidth / 2)); newProfile.profileName = EditorGUILayout.TextField(newProfile.profileName, GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField("Shader Full Name:", GUILayout.Width(windowWidth / 2)); newProfile.shaderName = EditorGUILayout.TextField(newProfile.shaderName, GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); } EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField("Material Slot:", EditorStyles.boldLabel, GUILayout.Width(windowWidth / 2)); EditorGUILayout.LabelField("Texture Name:", EditorStyles.boldLabel, GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); if (assignmentProfileIndex < assignmentProfiles.Length - 1) { showProfile = EditorGUILayout.Foldout(showProfile, "Profile"); if (showProfile) { foreach (var assignmentProfileItem in eWSettings.assignmentProfilesList[assignmentProfileIndex].assignmentProfileItems) { string[] textureNames = assignmentProfileItem.textureName.Split(','); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField(assignmentProfileItem.materialSlot); EditorGUILayout.EndHorizontal(); foreach (string textureName in textureNames) { if (textureName.Trim(' ').Length > 0) { EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); EditorGUILayout.LabelField(" ", GUILayout.Width(windowWidth / 2)); EditorGUILayout.LabelField(textureName.Trim(' '), GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); } } } } EditorGUILayout.Space(); if (GUILayout.Button("Delete This Profile", GUILayout.Width(windowWidth))) { eWSettings.assignmentProfilesList.Remove(eWSettings.assignmentProfilesList[assignmentProfileIndex]); SaveSettings(); GetExistingAssignmentProfiles(); assignmentProfileIndex = 0; } EditorGUILayout.Space(); } else { EditorGUILayout.Space(); for (int index = 0; index < newProfileItems.Count; index++) { var tempProfileItem = newProfileItems[index]; EditorGUILayout.BeginHorizontal(GUILayout.Width(windowWidth)); tempProfileItem.materialSlot = EditorGUILayout.TextField(newProfileItems[index].materialSlot, GUILayout.Width(windowWidth / 2)); tempProfileItem.textureName = EditorGUILayout.TextField(newProfileItems[index].textureName, GUILayout.Width(windowWidth / 2)); EditorGUILayout.EndHorizontal(); newProfileItems[index] = tempProfileItem; } EditorGUILayout.Space(); if (GUILayout.Button("Add New Material Slot", GUILayout.Width(windowWidth))) { newProfileItems.Add(new EWScriptableObject.AssignmentProfile.AssignmentProfileItem { textureName = "", materialSlot = "" }); } if (GUILayout.Button("Delete Last Material Slot", GUILayout.Width(windowWidth))) { if (newProfileItems.Count > 0) { newProfileItems.Remove(newProfileItems[newProfileItems.Count - 1]); } } if (GUILayout.Button("Clear All Material Slots", GUILayout.Width(windowWidth))) { newProfileItems.Clear(); } if (GUILayout.Button("Save New Profile", GUILayout.Width(windowWidth))) { List <EWScriptableObject.AssignmentProfile.AssignmentProfileItem> filteredNewProfileItems = new List <EWScriptableObject.AssignmentProfile.AssignmentProfileItem>(); foreach (var newProfileItem in newProfileItems) { if (newProfileItem.materialSlot.Trim(' ').Length > 0 && newProfileItem.textureName.Trim(' ').Length > 0) { filteredNewProfileItems.Add(newProfileItem); } } newProfile.assignmentProfileItems = filteredNewProfileItems.ToArray(); if (newProfile.profileName.Length > 0 && newProfile.shaderName.Length > 0) { eWSettings.assignmentProfilesList.Add(newProfile); SaveSettings(); GetExistingAssignmentProfiles(); assignmentProfileIndex = eWSettings.assignmentProfilesList.Count - 1; newProfile.profileName = ""; newProfile.shaderName = ""; newProfileItems.Clear(); } else { Debug.Log("Profile not Saved. Profile Name and/or Shader Name are Empty"); EditorGUILayout.EndHorizontal(); } } EditorGUILayout.Space(); } //------------------------------------------------------Version---------------------------------- EditorGUILayout.Space(); EditorGUILayout.LabelField("Version", EditorStyles.boldLabel, GUILayout.Width(windowWidth)); EditorGUILayout.LabelField(version, GUILayout.Width(windowWidth)); EditorGUILayout.Space(); EditorGUILayout.EndScrollView(); }
// Token: 0x06001394 RID: 5012 RVA: 0x0005ECE8 File Offset: 0x0005CEE8 List <string> IRecipientSession.GetTokenSids(ADObjectId userId, AssignmentMethod assignmentMethodFlags) { return(base.InvokeWithAPILogging <List <string> >(() => this.GetCompositeRecipientSession().GetTokenSids(userId, assignmentMethodFlags), "GetTokenSids")); }
// Token: 0x06005451 RID: 21585 RVA: 0x00131B4E File Offset: 0x0012FD4E public ExchangeRoleAssignmentPresentation(ExchangeRoleAssignment dataObject, ADObjectId userId, AssignmentMethod assignmentMethod, string userName) : this(dataObject, userId, assignmentMethod, userName, null, null) { }
// Token: 0x06005474 RID: 21620 RVA: 0x00131DBC File Offset: 0x0012FFBC internal void UpdatePresentationObjectWithEffectiveUser(ADObjectId effectiveUser, MultiValuedProperty <FormattedADObjectIdCollection> assignmentChains, bool isCompositeidentity, AssignmentMethod assignmentMethod) { this.EffectiveUserName = effectiveUser.Name; this.AssignmentChain = assignmentChains; this.isCompositeIdentity = isCompositeidentity; this.AssignmentMethod = assignmentMethod; this.User = effectiveUser; if (this.isCompositeIdentity) { this.compositeIdentity = new EffectiveUserObjectId(base.OriginalId, this.User); } }
// Token: 0x0600544F RID: 21583 RVA: 0x00131AE8 File Offset: 0x0012FCE8 public ExchangeRoleAssignmentPresentation(ExchangeRoleAssignment dataObject, ADObjectId userId, AssignmentMethod assignmentMethod, string userName, ADObjectId assigneeId, OrganizationId sharedOrgId) : base(dataObject) { if (assigneeId != null && null == sharedOrgId) { throw new ArgumentException("AssigneeID isnt null and sharedOrgId is null. sharedOrgId cannot be null if assigneeId isn't null."); } this.User = userId; this.assignmentMethod = assignmentMethod; if (!string.IsNullOrEmpty(userName)) { this.EffectiveUserName = userName; } if (assigneeId != null) { this.roleAssignee = assigneeId; } }
List <string> IRecipientSession.GetTokenSids(ADRawEntry user, AssignmentMethod assignmentMethodFlags) { return(base.InvokeWithAPILogging <List <string> >(() => this.GetSession().GetTokenSids(user, assignmentMethodFlags), "GetTokenSids")); }
List <string> IRecipientSession.GetTokenSids(ADObjectId userId, AssignmentMethod assignmentMethodFlags) { FfoDirectorySession.LogNotSupportedInFFO(null); return(new List <string>()); }