Skip to content

Import animated SVG files into Friction v1#793

Draft
pgilfernandez wants to merge 16 commits into
friction2d:mainfrom
pgilfernandez:import-svg-to-friction-v1
Draft

Import animated SVG files into Friction v1#793
pgilfernandez wants to merge 16 commits into
friction2d:mainfrom
pgilfernandez:import-svg-to-friction-v1

Conversation

@pgilfernandez

Copy link
Copy Markdown

Continuing with AI and the idea of importing/exporting new animation file formats, I would find importing "baked" SMIL animated SVGs into Friction so that users could edit them and convert them again into SVGs.

Here are the list of features:

  • Added support for importing animated SVG files into a regular Friction project.
  • Added a new Import SVG Animation action in the File menu.
  • Added an import dialog that compares the SVG file with the active Friction scene.
  • Added import options for scaling:
    • No scaling
    • Fit width proportionally
    • Fit height proportionally
    • Stretch to scene size
  • Added import options for scene duration:
    • Keep the current scene duration
    • Extend the scene if needed
    • Fit the scene duration to the imported SVG
  • Added grouped and ungrouped import modes.
  • Imported SVG content as editable Friction objects when possible.
  • Added support for animated SVG geometry.
  • Added support for animated paint properties such as fill, stroke, and opacity.
  • Added support for animated transforms, including translate, scale, rotate, and skew.
  • Preserved imported SVG text styling.
  • Added support for SVG image elements as linked image layers.
  • Added support for dashed strokes and SVG dash patterns through Friction path effects.
  • Added support for SVG masks as compositing layers.
  • Added support for SVG group blend modes.
  • Promoted SVG groups that need compositing into Friction layers.
  • Expanded repeating SVG animation tracks into Friction animation keys.
  • Added support for SVG animation timing, key values, and spline interpolation.
  • Unsupported SVG animations are reported in the import dialog and skipped safely.

It makes sense to adapt this code to the Friction v1.1 plug-in system, I'm just dropping it here so that we can experiment with it. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant