Skip to content

v7.0.0

Choose a tag to compare

@michael-hawker michael-hawker released this 12 Mar 00:01
791fdc0

Lottie-Windows version 7.0 release notes

Along with the usual slew of bug fixes and more support of After Effects features, the Lottie-Windows version 7.0 release has been focused on making Lottie more compelling for use within Windows UI features. Lottie-Windows is now an important part of the new WinUI AnimatedIcon story that will allow animations in many places where static glyphs were previously used.

Lottie-Windows is unique in its ability to translate Lottie files into code that takes advantage of Windows’ awesome compositor and animation engine. This allows Lottie to be used in places that could never afford the runtime overhead of a regular Lottie player.

Here are some highlights to that end:

Color binding

The integration of Lottie into UI features mandates the ability to do color binding. Color binding is where certain parts of the Lottie are tied to system theme colors (for example the user’s foreground or accent colors). Lottie-Windows now supports 2 types of color binding: explicit, and automatic.

Explicit color binding allows the designer to annotate their After Effects project to indicate which parts require binding. This is done with a CSS-like syntax added to the comments on the After Effects elements. For example, to indicate that a fill should be bound to the Foreground color, the designer simply needs to add this annotation to the fill: “{color:var(Foreground);}”. This will cause a property called “Foreground” to be added to the generated code which the user can then set. AnimatedIcon uses this facility to automatically bind system colors to animated icons.

Automatic color binding handles the case where you don’t have access to the After Effect project. With automatic color binding, a property for each unique color will be added to the generated code allowing you to modify each color at runtime.

Note that color bindings in other Lottie systems rely on runtime modification of JSON or handling per-frame callbacks. Such techniques are at odds with Lottie-Windows’ focus on runtime performance.

First class support for C++/WinRT

LottieGen has always supported code generation for C# and C++/CX, with only limited support for C++/WinRT. With version 7.0 C++/WinRT has become a first class citizen, and supports all of the features of the other languages.

MsBuild Task for LottieGen

Ever wanted to just drop a Lottie file into your Visual Studio project and have LottieGen automatically turn it into high performance generated code that you can reference directly in your XAML? With the MsBuild Task available via NuGet we’ve gotten closer to that dream. LottieGen.MsBuild packages the LottieGen tool into an MsBuild Task that can be called from your MsBuild project and targets files.

We still need to write a .targets file that will make this completely automatic. If you start writing your own, please consider sharing it!

By the way, in order to enable LottieGen to be packaged in this way, we’ve started building LottieGen as a standalone .exe. If you find that convenient (i.e. if you don’t want to depend on .NET 5 being installed), you can grab the .exe out of the NuGet package for use in your development workflow.

Lottie features and compatibility

As ever, we’ve improved compatibility and added more missing Lottie features. Compatibility is something that all Lottie players aspire to, but the reality for Lottie is that it can never be 100% due to the open-ended nature of the After Effects object model and the lack of standardization of the Lottie format. Compatibility will be an ongoing effort, so if something doesn’t work quite right, please give us feedback on Github so we can prioritize your case.

For this release, more things should work better, and we’ve started to add support for layer effects. We’ve added support for Gaussian Blur effects so far, and the infrastructure to support more effect types.

Here’s a summary of what’s new in 7.0:

General:

  • Explicit color binding via After Effects comments.
  • Automatic color binding.
  • Gaussian blur layer effects.
  • Ability to load JSON from any stream, including memory.
  • Support for LottieFiles.com’s "dotLottie" zip format.
  • Simplified loading of images so in most cases any asynchrony is hidden.
  • ImageAssetDelegate to allow users to control image loading.
  • Code updated to take advantage of C# 8.

LottieViewer

  • Display markers on the scrubber timeline.
  • List markers in the info panel, with hyperlinks to jump to each marker.
  • Show frame numbers instead of progress or time (scrubber tooltip, markers).
  • Keyboard arrow keys move the scrubber by one frame at a time.
  • Ability to modify Lottie colors to see the effect of color binding.
  • Show UAP and LottieViewer versions in the info panel.
  • Lottie in LottieViewer: play/stop button is animated with Lottie.

LottieGen

  • First class support for cppwinrt code generation.
  • Updated to use .NET 5.
  • Enabled C# nullable types.
  • New build output: single file standalone exe for use in build systems.
  • LottieGen now available via Nuget as an MsBuild Task (LottieGen.MsBuild).
  • Add access to markers, frame rate, and other metadata in generated code.
  • Add ability to specify additional interfaces on generated code
  • Added support for multiple versions of WinUI, including the upcoming WinUI3.
Complete list of changes
  • #406: AdditionalInterface param can add bad IDL import statements
  • #433: Fix for #406
  • #426: LottieViewer UI improvements for AnimatedIcon
  • #427: Convert to modern null checking now that it works in .NET Native.
  • #429: Fix some missing simplifications in Composition expressions.
  • #428: Fix inaccuracy in the UAP version info comment.
  • #425: Show frame numbers in generated code.
  • #424: Fixes for AnimatedIcon
  • #421: Show another decimal place on the LottieViewer tooltip.
  • #420: Pin a version of Cake to work around Cake change that broke the build
  • #416: Fix bug in the Select method for non-animatable animatables.
  • #415: Adjust the set of things that are built for different configurations.
  • #413: Create a project just for the animatables.
  • #411: Expose animation metadata in generated code
  • #412: Add WinUI 2.6 animated icon support.
  • #408: Show gradient brushes in DGML.
  • #407: Improvements for CppWinrt on Win32.
  • #404: Add: version checking for Blur effect, path information for error message.
  • #403: Eliminate the default value checks from ConvertTo class.
  • #400: Translates Lottie blur effects to Composition.
  • #398: Add C++ implementations of the GaussianBlurEffect class.
  • #399: Support a Gaussian blur effect field that sometimes shows up.
  • #397: Add GuassianBlurEffect to WinCompData.
  • #395: Changes to successfully package and upload beta app to the store.
  • #394: Validate marker names.
  • #393: Parse After Effects blur effects from Lottie files.
  • #392: Implement DropShadow effect.
  • #390: Add support for LayerVisual and DropShadow Composition types. Cleanup.
  • #388: Start version 7.1.
  • #389: Revert "Start version 7.1. (#388)"
  • #386: Don't pretend to handle drop shadows yet.
  • #385: Add animation to the Play/Stop button in Lottie Viewer.
  • #382: Replace -winui3mode with -winuiversion.
  • #381: Update docs to stop referencing MyGet.
  • #380: Add a new build configuration for a Beta version of LottieViewer.
  • #379: Fix crash on some cases of path groups.
  • #378: Cleanup: remove redundant type tags.
  • #377: Parse layer effects.
  • #376: Support .lottie files in LottieGen.
  • #375: Show the current UAP version in Lottie Viewer.
  • #374: Allow external images to be loaded, and add .lottie file support
  • #372: Cleanup resulting from enabling nullables.
  • #370: Code cleanup: take advantage of C# 8 features.
  • #371: Fix codegen errors.
  • #369: Make the control panels use transitions to slide in and slide out.
  • #368: Expose overload of SetSourceAsync that takes a stream.
  • #366: LottieVisualSource - allow for SetSourceAsync(string json)
  • #367: Generate a way to convert between marker names and progress values, a…
  • #365: Add ability to specify additional interfaces for the generated code.
  • #363: Fully enable nullables.
  • #364: Go back to using latest .NET 3.1 SDK.
  • #361: Enable nullable reference types where possible.
  • #360: Simplifications around image loading, and C++ generated code cleanup.
  • #359: Fixes a hole in the GraphCompactor optimizer wrt visiblity and masks.
  • #358: Fix rendering issue caused by hole in the optimizer.
  • #357: Cppwinrt-consistent file naming
  • #356: Fix 2 bugs - path translation optimizer, cppwinrt codegen.
  • #354: Get image layer working with cppwinrt.
  • #352: Start on cppwinrt codegen for IDynamicAnimatedVisualSource.
  • #350: Improvements to the CppWinrt code generator.
  • #345: Report expression operation counts.
  • #346: Change the default for IsAnimatedVisualSourceDynamic.
  • #332: LottieViewer: UI for color palette editing, and show marker values in info panel.
  • #343: Show animator counts in the object status table in generated code.
  • #342: Prevent double periods in LP0002 error message.
  • #341: Allow JSON to be loaded from any stream, including memory
  • #333: Load animation from memory
  • #339: Invalidated IAnimatedVisual on image loading completed, even if it failed.
  • #338: Fix the namespace for IGeometrySource2D.
  • #337: Refactor to allow better modularization of the translator.
  • #336: Renaming of some methods that return booleans for clarity.
  • #331: Add a WinUI3 mode to LottieGen.
  • #335: Stay on .NET SDK 3.1.302. An upgrade to 3.1.401 broke the build.
  • #326: Fix translation of rectangles with RoundCorners.
  • #318: Adding markers to the scrubber.
  • #329: Got some feedback from someone using this README for the first time.
  • #330: Improve naming of the _lottieFilePath field in LottieFileProcessor.
  • #328: CX classes stopped compiling because it wasn't public. Make it public.
  • #327: Do not include paths or machine info in generated code.
  • #325: Fix TrimmedAnimatable null reference exception.
  • #324: Fix issue with C++ multi-version support.
  • #321: Use clearer names for automatically generated color bindings.
  • #319: Replace ReadOnlySpan with IReadOnlyList.
  • #316: Add display of markers to Lottie Viewer.
  • #315: Recognize animation subchannels when discovering non-default properties.
  • #313: Eliminate the ReadOnlySpan from Sequence.
  • #314: Fix rare case name collision in generated code.
  • #312: Support animated vector2/vector3 with easings that differ between channels
  • #311: Improve accessibility of lottie viewer
  • #309: Add ability to automatically bind to the colors in a Lottie's palette.
  • #310: Improve accessibility of sample app
  • #308: Convert animated paths to static paths with animated offset if possible
  • #307: Ignore the "ml2" field in Lottie files.
  • #305: Stop using CompositionRectangleGeometry
  • #303: Fix: LottieGen was not creating constants for scalar theme properties.
  • #301: Include the offset in the name of a gradient stop.
  • #299: Update the version of nuget.
  • #298: Ignore the "meta" field in Lottie files.
  • #284: Multi dimensional easing
  • #297: Remove the ability to output XML from LottieGen.
  • #296: The test for whether an image was embedded or not was not quite right…
  • #294: Prevent duplicated keyframe progress
  • #295: Use null-coalescing compound assignment for caches.
  • #292: Merge the v6.1.0 release to master and start v7.0.0
  • #293: Update samples to use 6.1.0 NuGet of LottieGen.