public void ShowModelPart(M2SceneNode node) { if (node != null && node.Type == M2Type.MT_CHARACTER && !node.IsNpc) { //apply show option node.ShowModelPart(E_MODEL_PART.EMP_HEAD, isShowHelm); node.ShowModelPart(E_MODEL_PART.EMP_CAPE, isShowCape); node.ShowModelPart(E_MODEL_PART.EMP_SHOULDER, isShowShoulder); node.ShowModelPart(E_MODEL_PART.EMP_LEFTHAND, isShowLeftHand); node.ShowModelPart(E_MODEL_PART.EMP_RIGHTHAND, isShowRightHand); } }
private void ShowModelPartExecuted(object sender, ExecutedRoutedEventArgs e) { E_MODEL_PART?part = e.Parameter as E_MODEL_PART?; if (!part.HasValue) { return; } M2SceneNode node = ModelSceneService.Instance.MainM2SceneNode; bool show = ModelEditorService.Instance.IsShow(part.Value); node.ShowModelPart(part.Value, !show); if (part.Value == E_MODEL_PART.EMP_ALL || part.Value == E_MODEL_PART.EMP_CAPE) { node.BuildVisibleGeosets(); } else if (part.Value == E_MODEL_PART.EMP_HEAD) { node.BuildVisibleGeosets(); } ModelEditorService.Instance.SetShow(part.Value, !show); }