Skip to content

[Lottie exporter] Cannot export if an imported asset is in the 'images' subdirectory #3471

Closed

Description

@nullst

Describe the bug

Exporting an animation to lottie format currently copies all imported assets into an 'images' subdirectory (#936). If an imported asset was already in the 'images' subdirectory (I happened to name my assets directory 'images'), the export fails with a long and somewhat confusing stacktrace due to the fact that lottie-exporter uses the python function shutil.copy to put the asset in the images directory, and this function throws an exception when the source and the target file are the same.

To Reproduce
Steps to reproduce the behavior:

  1. Create new synfig project.
  2. Save it to some directory.
  3. Manually create a subdirectory 'images' and put some jpg file in it.
  4. Import that image in Synfig as a new layer.
  5. Try to export to Lottie, see the break.

Expected behavior
If the file is already in the 'images' subdirectory, it does not have to be copied, so the export should work as expected.
Workaround: rename the assets directory to some other name.

Screenshots
Screenshot from 2024-12-16 13-58-32

System information:

  • OS: Linux Pop!_OS
  • OS version: 22.04 LTS
  • Synfig version: 1.5.3

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions