Repository navigation
Open
Description
Synfig version & platform:
v1.4.0 & 1.4.0 flathub
elementary OS 5.1.7 Hera, Built on Ubuntu 18.04.4 LTS, Linux 5.9.10-050910-generic, GTK 3.22.30
Issue description:
- With app image downloaded from releases page I'm getting this exception:
synfig(13789) [10:39:36 PM] info: Python 3 binary found: python3
synfig(13789) [10:39:37 PM] info: Traceback (most recent call last):
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/lottie-exporter.py", line 163, in <module>
new_file_name = parse(FILE_NAME)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/lottie-exporter.py", line 68, in parse
gen_layers(settings.lottie_format["layers"], canvas, canvas.get_num_layers() - 1)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/driver.py", line 82, in gen_layers
itr)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/group.py", line 94, in gen_layer_group
asset = add_precomp_asset(settings.lottie_format["assets"][-1], canvas, canvas.get_num_layers())
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/sources/precomp.py", line 29, in add_precomp_asset
layers.driver.gen_layers(lottie["layers"], canvas, layer_itr-1)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/driver.py", line 82, in gen_layers
itr)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/group.py", line 94, in gen_layer_group
asset = add_precomp_asset(settings.lottie_format["assets"][-1], canvas, canvas.get_num_layers())
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/sources/precomp.py", line 29, in add_precomp_asset
layers.driver.gen_layers(lottie["layers"], canvas, layer_itr-1)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/driver.py", line 82, in gen_layers
itr)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/group.py", line 94, in gen_layer_group
asset = add_precomp_asset(settings.lottie_format["assets"][-1], canvas, canvas.get_num_layers())
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/sources/precomp.py", line 29, in add_precomp_asset
layers.driver.gen_layers(lottie["layers"], canvas, layer_itr-1)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/driver.py", line 82, in gen_layers
itr)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/group.py", line 94, in gen_layer_group
asset = add_precomp_asset(settings.lottie_format["assets"][-1], canvas, canvas.get_num_layers())
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/sources/precomp.py", line 29, in add_precomp_asset
layers.driver.gen_layers(lottie["layers"], canvas, layer_itr-1)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/driver.py", line 69, in gen_layers
itr)
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/layers/shape_solid.py", line 87, in gen_layer_shape_solid
gen_mask(lottie["masksProperties"][0], invert, bline_point, index.inc())
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/helpers/mask.py", line 40, in gen_mask
convert_non_loop(lottie["pt"])
File "/tmp/.mount_bVxKgN/usr/share/synfig/plugins/lottie-exporter/helpers/mask.py", line 60, in convert_non_loop
posi["o"][-1][0] = posi["o"][-1][1] = 0
IndexError: list index out of range
synfig(13789) [10:40:17 PM] info: ipc.cpp:278: fifo activity: 'F'
It could be because that I haven't created any animations yet, just imported svg. But still, it shouldn't crash like that I guess.
- With Flatpak version I receive: no module lxml found, tho I have both python-lxml and python3-lxml installed on my system.
Activity
morevnaproject commentedon Dec 13, 2020
Hi! Thank you for report. Can you please attach file you have problems with?
quentincaffeino commentedon Dec 13, 2020
Yeah sure, thought it wouldn't help you because it's basically empty.
apple.sifz.zip
rodolforg commentedon Jan 15, 2021
The problem is in
lottie-exporter/helpers/mask.py.When exporting the sample provided by OP, at third time code reaches
if not posi["c"]:line evaluated asTrue,posicontents are:{'i': [], 'o': [], 'v': [], 'c': False}And that's the reason exception is thrown ("IndexError: list index out of range").
But I don't know the code to mess with it.
AnishGG commentedon Jan 18, 2021
Hi, will try to have a look at this issue as soon as possible.
AnishGG commentedon Jan 18, 2021
The issue is:
There is one outline which has only one vertex in your
apple.sifz. And this is handled in Synfig here:synfig/synfig-core/src/modules/mod_geometry/outline.cpp
Line 367 in 678cc3a
We are handling the same thing in Lottie exporter here:
synfig/synfig-studio/plugins/lottie-exporter/properties/shapePropKeyframe/outline.py
Lines 375 to 376 in 12b29c7
So, I just need to put a check in the code, which will prevent this error when we have only 1 vertex.
Anyway, In my knowledge, I don't know any purpose(visually) of an Outline layer with 1 vertex. So ig if you remove it, then the animation works perfectly. @rodolforg any views here? ^__^
rodolforg commentedon Jan 18, 2021
Hmm... visually, it could a single dot or am I wrong?
Anyway, as Synfig Studio can open and render the file, I think Lottie exporter should be able to render. It could warn about the ignored spline.
What do you think?
AnishGG commentedon Jan 18, 2021
Oh yes, I see. It is a single dot.
And yes, Lottie exporter should also behave in a similar way. Will look into this.
rodolforg commentedon Jan 18, 2021
Synfig doesn't render this single dot, but…
AnishGG commentedon Jan 18, 2021
Well for me, when I increase the outline width of an Outline layer, I am able to see some figure(probably single dot). Or this could be happening because I am using an older version of Synfig.
I have made some changes in the exporter, and now your 2nd point is followed in the exporter too.
rodolforg commentedon Jan 18, 2021
I can't see anything on master branch nor on 1.4.0 (Debian).
👍
AnishGG commentedon Jan 18, 2021
Well, that is good in a way. I won't have to make any more changes in the exporter 😄
I will submit a PR to close this issue soon.
[-]Lottie export[/-][+][v1.4.0/AppImage] Lottie export failed with exception[/+][-][v1.4.0/AppImage] Lottie export failed with exception[/-][+][v1.4.0] Lottie export failed with exception[/+]AnishGG commentedon Jan 19, 2021
@rodolforg I just built Synfig from master branch, and I am able to see a dot like structure for a single vertex.
I am attaching the file here:
check.zip
rodolforg commentedon Jan 25, 2021
Yes I can see it too. But, somehow, not that problematic path on apple.sifz
AnishGG commentedon Jan 28, 2021
So, for now, I will just ignore the rendering of the outlines with a single vertex?
To make Lottie exporter behave in an exact way(make a dot-like structure), I need to understand where is it rendering the dot in Synfig code. Can someone help with this?
I am using somewhat old code of Synfig(non-optimized, but does not affect Lottie export): https://github.com/synfig/synfig/blob/678cc3a7b1208fcca18c8b54a29a20576c499927/synfig-core/src/modules/mod_geometry/outline.cpp
rodolforg commentedon Feb 18, 2021
Sorry for the delay @AnishGG
I don't understand exactly what you asked.
The
Layer_Outlineis based onLayer_Shape.Layer_Shapedefine its shape by its member variablecontour, that is built by methods likevoid Layer_Shape::move_to(Real x, Real y)andvoid Layer_Shape::line_to(Real x, Real y)for example.synfig/synfig-core/src/synfig/layers/layer_shape.cpp
Line 285 in 678cc3a