public static void SetActiveHumanTransforms(AvatarMask mask, string[] humanTransforms) { for (int i = 0; i < mask.transformCount; i++) { string path = mask.GetTransformPath(i); if (ArrayUtility.FindIndex<string>(humanTransforms, (string s) => path == s) != -1) { mask.SetTransformActive(i, true); } } }
internal void Copy(AvatarMask other) { for (int i = 0; i < this.humanoidBodyPartCount; i++) { this.SetHumanoidBodyPartActive(i, other.GetHumanoidBodyPartActive(i)); } this.transformCount = other.transformCount; for (int j = 0; j < other.transformCount; j++) { this.SetTransformPath(j, other.GetTransformPath(j)); this.SetTransformActive(j, other.GetTransformActive(j)); } }
internal void Copy(AvatarMask other) { for (AvatarMaskBodyPart avatarMaskBodyPart = AvatarMaskBodyPart.Root; avatarMaskBodyPart < AvatarMaskBodyPart.LastBodyPart; avatarMaskBodyPart++) { this.SetHumanoidBodyPartActive(avatarMaskBodyPart, other.GetHumanoidBodyPartActive(avatarMaskBodyPart)); } this.transformCount = other.transformCount; for (int i = 0; i < other.transformCount; i++) { this.SetTransformPath(i, other.GetTransformPath(i)); this.SetTransformActive(i, other.GetTransformActive(i)); } }
internal void Copy(AvatarMask other) { for (AvatarMaskBodyPart part = AvatarMaskBodyPart.Root; part < AvatarMaskBodyPart.LastBodyPart; part += 1) { this.SetHumanoidBodyPartActive(part, other.GetHumanoidBodyPartActive(part)); } this.transformCount = other.transformCount; for (int i = 0; i < other.transformCount; i++) { this.SetTransformPath(i, other.GetTransformPath(i)); this.SetTransformActive(i, other.GetTransformActive(i)); } }
internal void Copy(AvatarMask other) { for (AvatarMaskBodyPart index = AvatarMaskBodyPart.Root; index < AvatarMaskBodyPart.LastBodyPart; ++index) { this.SetHumanoidBodyPartActive(index, other.GetHumanoidBodyPartActive(index)); } this.transformCount = other.transformCount; for (int index = 0; index < other.transformCount; ++index) { this.SetTransformPath(index, other.GetTransformPath(index)); this.SetTransformActive(index, other.GetTransformActive(index)); } }
/// <summary> /// <para>Copy the mask settings from an AvatarMask to the clip configuration.</para> /// </summary> /// <param name="mask">AvatarMask from which the mask settings will be imported.</param> public void ConfigureClipFromMask(AvatarMask mask) { this.m_TransformMask = new TransformMaskElement[mask.transformCount]; for (int i = 0; i < mask.transformCount; i++) { this.m_TransformMask[i].path = mask.GetTransformPath(i); this.m_TransformMask[i].weight = !mask.GetTransformActive(i) ? 0f : 1f; } this.m_BodyMask = new int[13]; for (int j = 0; j < 13; j++) { this.m_BodyMask[j] = !mask.GetHumanoidBodyPartActive((AvatarMaskBodyPart) j) ? 0 : 1; } }
private void FillNodeInfos(AvatarMask mask) { this.m_NodeInfos = new AvatarMaskInspector.NodeInfo[mask.transformCount]; for (int i = 1; i < this.m_NodeInfos.Length; i++) { string fullPath = mask.GetTransformPath(i); if (this.humanTransforms != null) { this.m_NodeInfos[i].m_Enabled = (ArrayUtility.FindIndex<string>(this.humanTransforms, (string s) => fullPath == s) == -1); } else { this.m_NodeInfos[i].m_Enabled = true; } this.m_NodeInfos[i].m_Expanded = true; this.m_NodeInfos[i].m_ParentIndex = -1; this.m_NodeInfos[i].m_ChildIndices = new List<int>(); AvatarMaskInspector.NodeInfo[] arg_F6_0_cp_0 = this.m_NodeInfos; int arg_F6_0_cp_1 = i; int arg_F6_1; if (i == 0) { arg_F6_1 = 0; } else { arg_F6_1 = fullPath.Count((char f) => f == '/'); } arg_F6_0_cp_0[arg_F6_0_cp_1].m_Depth = arg_F6_1; string text = string.Empty; int num = fullPath.LastIndexOf('/'); if (num > 0) { text = fullPath.Substring(0, num); } int transformCount = mask.transformCount; for (int j = 0; j < transformCount; j++) { string transformPath = mask.GetTransformPath(j); if (text != string.Empty && transformPath == text) { this.m_NodeInfos[i].m_ParentIndex = j; } if (transformPath.StartsWith(fullPath)) { if (transformPath.Count((char f) => f == '/') == this.m_NodeInfos[i].m_Depth + 1) { this.m_NodeInfos[i].m_ChildIndices.Add(j); } } } } }
internal void Copy(AvatarMask other) { for (AvatarMaskBodyPart index = AvatarMaskBodyPart.Root; index < AvatarMaskBodyPart.LastBodyPart; ++index) this.SetHumanoidBodyPartActive(index, other.GetHumanoidBodyPartActive(index)); this.transformCount = other.transformCount; for (int index = 0; index < other.transformCount; ++index) { this.SetTransformPath(index, other.GetTransformPath(index)); this.SetTransformActive(index, other.GetTransformActive(index)); } }
public static void SetActiveHumanTransforms(AvatarMask mask, string[] humanTransforms) { for (int index = 0; index < mask.transformCount; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: reference to a compiler-generated method if (ArrayUtility.FindIndex<string>(humanTransforms, new Predicate<string>(new AvatarMaskUtility.\u003CSetActiveHumanTransforms\u003Ec__AnonStorey8B() { path = mask.GetTransformPath(index) }.\u003C\u003Em__14B)) != -1) mask.SetTransformActive(index, true); } }