private void PopulateListClothes(int index) { var chaControl = MakerAPI.GetCharacterControl(); int coordinateIndex = MaterialEditorPlugin.GetCharaController(chaControl).CurrentCoordinateIndex; PopulateList(chaControl.objClothes[index], ObjectType.Clothing, coordinateIndex: coordinateIndex, slot: index); }
internal static void ClothesColorChangeHook() { var controller = MaterialEditorPlugin.GetCharaController(MakerAPI.GetCharacterControl()); controller.CustomClothesOverride = true; controller.RefreshClothesMainTex(); }
private static void FuncUpdateAllPtnAndColorHook() { var controller = MaterialEditorPlugin.GetCharaController(MakerAPI.GetCharacterControl()); controller.CustomClothesOverride = true; controller.RefreshClothesMainTex(); }
private void PopulateListAccessory() { var chaControl = MakerAPI.GetCharacterControl(); int coordinateIndex = MaterialEditorPlugin.GetCharaController(chaControl).CurrentCoordinateIndex; var chaAccessoryComponent = AccessoriesApi.GetAccessory(MakerAPI.GetCharacterControl(), AccessoriesApi.SelectedMakerAccSlot); PopulateList(chaAccessoryComponent?.gameObject, ObjectType.Accessory, coordinateIndex: coordinateIndex, slot: AccessoriesApi.SelectedMakerAccSlot); }
internal static void UncensorSelectorHook() { if (MakerAPI.InsideAndLoaded) { var chaControl = MakerAPI.GetCharacterControl(); chaControl.StartCoroutine(MaterialEditorPlugin.GetCharaController(chaControl).LoadData(false, false, false)); } }
private static void HairCustomEdit_ChangeHair_Set(ChaControl ___human) { var controller = MaterialEditorPlugin.GetCharaController(___human); controller.ChangeHairEvent((int)Character.HAIR_TYPE.BACK); controller.ChangeHairEvent((int)Character.HAIR_TYPE.FRONT); controller.ChangeHairEvent((int)Character.HAIR_TYPE.SIDE); }
private static void SetClothesStatePostfix(ChaControl __instance) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { controller.ClothesStateChangeEvent(); } }
private static void ChangeAccessory(ChaControl __instance, int slotNo, int type) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { controller.ChangeAccessoryEvent(slotNo, type); } }
private static void ChangeHair(ChaControl __instance, int kind) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { controller.ChangeHairEvent(kind); } }
private static void CreateBodyTextureHook(ChaControl __instance) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { controller.RefreshBodyMainTex(); } }
private static void ChangeCoordinateTypePrefix(ChaControl __instance) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { controller.CoordinateChangeEvent(); } }
private static void ChangeClothesTopAsyncPostfix(ChaControl __instance, ref IEnumerator __result) { var controller = MaterialEditorPlugin.GetCharaController(__instance); if (controller != null) { var original = __result; __result = original.AppendCo(() => ChangeClothesTopPostfix(__instance)); } }
public override void RemoveRendererProperty(object data, Renderer renderer, RendererProperties property, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); MaterialEditorPlugin.GetCharaController(chaControl).RemoveRendererProperty(objectData.Slot, objectData.ObjectType, renderer, property, go); } else { GetSceneController().RemoveRendererProperty((int)data, renderer, property); } }
public override string GetRendererPropertyValueOriginal(object data, Renderer renderer, RendererProperties property, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); return(MaterialEditorPlugin.GetCharaController(chaControl).GetRendererPropertyValueOriginal(objectData.Slot, objectData.ObjectType, renderer, property, go)); } else { return(GetSceneController().GetRendererPropertyValueOriginal((int)data, renderer, property)); } }
public override int?GetMaterialShaderRenderQueueOriginal(object data, Material material, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); return(MaterialEditorPlugin.GetCharaController(chaControl).GetMaterialShaderRenderQueueOriginal(objectData.Slot, objectData.ObjectType, material, go)); } else { return(GetSceneController().GetMaterialShaderRenderQueueOriginal((int)data, material)); } }
public override void RemoveMaterialFloatProperty(object data, Material material, string propertyName, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); MaterialEditorPlugin.GetCharaController(chaControl).RemoveMaterialFloatProperty(objectData.Slot, objectData.ObjectType, material, propertyName, go); } else { GetSceneController().RemoveMaterialFloatProperty((int)data, material, propertyName); } }
public override void RemoveMaterialShaderRenderQueue(object data, Material material, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); MaterialEditorPlugin.GetCharaController(chaControl).RemoveMaterialShaderRenderQueue(objectData.Slot, objectData.ObjectType, material, go); } else { GetSceneController().RemoveMaterialShaderRenderQueue((int)data, material); } }
public override float?GetMaterialFloatPropertyValueOriginal(object data, Material material, string propertyName, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); return(MaterialEditorPlugin.GetCharaController(chaControl).GetMaterialFloatPropertyValueOriginal(objectData.Slot, objectData.ObjectType, material, propertyName, go)); } else { return(GetSceneController().GetMaterialFloatPropertyValueOriginal((int)data, material, propertyName)); } }
public override void SetMaterialTextureScale(object data, Material material, string propertyName, Vector2 value, GameObject go) { if (data is ObjectData objectData) { var chaControl = go.GetComponentInParent <ChaControl>(); MaterialEditorPlugin.GetCharaController(chaControl).SetMaterialTextureScale(objectData.Slot, objectData.ObjectType, material, propertyName, value, go); } else { GetSceneController().SetMaterialTextureScale((int)data, material, propertyName, value); } }
internal override void MaterialPasteEdits(int slot, Material material, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).MaterialPasteEdits(slot, material, gameObject); } else { GetSceneController().MaterialPasteEdits(slot, material); } }
internal override void SetMaterialShaderName(int slot, Material material, string value, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).SetMaterialShader(slot, material, value, gameObject); } else { GetSceneController().SetMaterialShader(slot, material, value); } }
internal override int?GetMaterialShaderRenderQueueOriginal(int slot, Material material, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { return(MaterialEditorPlugin.GetCharaController(chaControl).GetMaterialShaderRenderQueueOriginal(slot, material, gameObject)); } else { return(GetSceneController().GetMaterialShaderRenderQueueOriginal(slot, material)); } }
internal override void RemoveMaterialShaderRenderQueue(int slot, Material material, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).RemoveMaterialShaderRenderQueue(slot, material, gameObject); } else { GetSceneController().RemoveMaterialShaderRenderQueue(slot, material); } }
internal override void SetMaterialTexture(int slot, Material material, string propertyName, string filePath, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).SetMaterialTextureFromFile(slot, material, propertyName, filePath, gameObject, true); } else { GetSceneController().SetMaterialTextureFromFile(slot, material, propertyName, filePath, true); } }
internal override void SetMaterialTextureScale(int slot, Material material, string propertyName, Vector2 value, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).SetMaterialTextureScale(slot, material, propertyName, value, gameObject); } else { GetSceneController().SetMaterialTextureScale(slot, material, propertyName, value); } }
internal override float?GetMaterialFloatPropertyValueOriginal(int slot, Material material, string propertyName, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { return(MaterialEditorPlugin.GetCharaController(chaControl).GetMaterialFloatPropertyValueOriginal(slot, material, propertyName, gameObject)); } else { return(GetSceneController().GetMaterialFloatPropertyValueOriginal(slot, material, propertyName)); } }
internal override void RemoveMaterialFloatProperty(int slot, Material material, string propertyName, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).RemoveMaterialFloatProperty(slot, material, propertyName, gameObject); } else { GetSceneController().RemoveMaterialFloatProperty(slot, material, propertyName); } }
internal override void RemoveRendererProperty(int slot, Renderer renderer, RendererProperties property, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { MaterialEditorPlugin.GetCharaController(chaControl).RemoveRendererProperty(slot, renderer, property, gameObject); } else { GetSceneController().RemoveRendererProperty(slot, renderer, property); } }
internal override string GetRendererPropertyValueOriginal(int slot, Renderer renderer, RendererProperties property, GameObject gameObject) { var chaControl = gameObject.GetComponent <ChaControl>(); if (chaControl != null) { return(MaterialEditorPlugin.GetCharaController(chaControl).GetRendererPropertyValueOriginal(slot, renderer, property, gameObject)); } else { return(GetSceneController().GetRendererPropertyValueOriginal(slot, renderer, property)); } }
internal static void CopyClothesPostfix(TMP_Dropdown[] ___ddCoordeType, Toggle[] ___tglKind) { List <int> copySlots = new List <int>(); for (int i = 0; i < Enum.GetNames(typeof(ChaFileDefine.ClothesKind)).Length; i++) { if (___tglKind[i].isOn) { copySlots.Add(i); } } MaterialEditorPlugin.GetCharaController(MakerAPI.GetCharacterControl())?.ClothingCopiedEvent(___ddCoordeType[1].value, ___ddCoordeType[0].value, copySlots); }