public override Task SaveAsync(string location) { if (SelectedStyle == null) { return(Task.Delay(0)); } return(Task.Run(() => { SelectedStyle?.CreateDiffuseMap(false, Path.Combine(location, DiffuseTexture)); SelectedStyle?.CreateNormalsMap(false, Path.Combine(location, NormalsTexture)); })); }
private void ApplySlowNormals() { var applyId = ++_applyId; var normals = SelectedStyle?.CreateNormalsMap(PreviewMode, LicensePlatesStyle.Format.Png); if (_applyId != applyId) { return; } Renderer?.OverrideTexture(NormalsTexture, normals); _flatNormals = false; }
protected override Task SaveOverrideAsync(IPaintShopRenderer renderer, string location) { if (SelectedStyle == null) { return(Task.Delay(0)); } return(Task.Run(() => { if (DiffuseTexture != null) { SelectedStyle?.CreateDiffuseMap(false, Path.Combine(location, DiffuseTexture)); } if (NormalsTexture != null) { SelectedStyle?.CreateNormalsMap(false, Path.Combine(location, NormalsTexture)); } })); }