private IList FillDBEditorLists() { IList saveData = new List <object>(); CharaCustomFunctionController dbController = FindDynamicBoneController(); CopyList((IList)AccessTools.Field(dbController.GetType(), "AccessoryDynamicBoneData").GetValue(dbController), saveData); return(saveData); }
private MaterialEditorSaveData FillMaterialEditorLists() { MaterialEditorSaveData saveData = new MaterialEditorSaveData(); CharaCustomFunctionController materialController = FindMaterialCharaController(); saveData.rendererPropertyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "RendererPropertyList").GetValue(materialController), saveData.rendererPropertyList); saveData.materialFloatPropertyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "MaterialFloatPropertyList").GetValue(materialController), saveData.materialFloatPropertyList); saveData.materialColorPropertyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "MaterialColorPropertyList").GetValue(materialController), saveData.materialColorPropertyList); saveData.materialTexturePropertyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "MaterialTexturePropertyList").GetValue(materialController), saveData.materialTexturePropertyList); saveData.materialShaderPropertyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "MaterialShaderList").GetValue(materialController), saveData.materialShaderPropertyList); if (AccessTools.GetFieldNames(materialController.GetType()).Contains("MaterialCopyList")) { saveData.materialCopyList = new List <object>(); CopyList((IList)AccessTools.Field(materialController.GetType(), "MaterialCopyList").GetValue(materialController), saveData.materialCopyList); } return(saveData); }
private void ApplyDynamicBoneList(IList dynamicBoneList) { CharaCustomFunctionController dbController = FindDynamicBoneController(); IList currentList = (IList)AccessTools.Field(dbController.GetType(), "AccessoryDynamicBoneData").GetValue(dbController); currentList.Clear(); CopyList(dynamicBoneList, currentList); }
private void ApplyMaterialEditorLists(MaterialEditorSaveData saveData) { CharaCustomFunctionController materialController = FindMaterialCharaController(); IList rendererList = (IList)AccessTools.Field(materialController.GetType(), "RendererPropertyList").GetValue(materialController); rendererList.Clear(); CopyList(saveData.rendererPropertyList, rendererList); IList materialFloatList = (IList)AccessTools.Field(materialController.GetType(), "MaterialFloatPropertyList").GetValue(materialController); materialFloatList.Clear(); CopyList(saveData.materialFloatPropertyList, materialFloatList); IList materialColorList = (IList)AccessTools.Field(materialController.GetType(), "MaterialColorPropertyList").GetValue(materialController); materialColorList.Clear(); CopyList(saveData.materialColorPropertyList, materialColorList); IList materialTextureList = (IList)AccessTools.Field(materialController.GetType(), "MaterialTexturePropertyList").GetValue(materialController); materialTextureList.Clear(); CopyList(saveData.materialTexturePropertyList, materialTextureList); IList materialShaderList = (IList)AccessTools.Field(materialController.GetType(), "MaterialShaderList").GetValue(materialController); materialShaderList.Clear(); CopyList(saveData.materialShaderPropertyList, materialShaderList); if (AccessTools.GetFieldNames(materialController.GetType()).Contains("MaterialCopyList")) { IList materialCopyList = (IList)AccessTools.Field(materialController.GetType(), "MaterialCopyList").GetValue(materialController); materialCopyList.Clear(); CopyList(saveData.materialCopyList, materialCopyList); } }