예제 #1
0
 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));
     }));
 }
예제 #2
0
            private void ApplySlowNormals()
            {
                var applyId = ++_applyId;

                var normals = SelectedStyle?.CreateNormalsMap(PreviewMode, LicensePlatesStyle.Format.Png);

                if (_applyId != applyId)
                {
                    return;
                }

                Renderer?.OverrideTexture(NormalsTexture, normals);
                _flatNormals = false;
            }
예제 #3
0
            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));
                    }
                }));
            }