From 562341850b977321fbbad28959a6e04793515462 Mon Sep 17 00:00:00 2001 From: AnishGulati Date: Jun 07 2019 19:20:29 +0000 Subject: Change library to python-lxml, animation speed corrected --- diff --git a/1-setup-linux-native.sh b/1-setup-linux-native.sh index 16805cd..b74c303 100755 --- a/1-setup-linux-native.sh +++ b/1-setup-linux-native.sh @@ -40,6 +40,7 @@ if which apt-get >/dev/null; then libxml++2.6-dev \ libboost-system-dev \ libmagick++-dev \ + libxslt-dev python-dev python3-lxml\ " else # @@ -81,6 +82,7 @@ if which apt-get >/dev/null; then libglibmm-devel \ libsigc++2-devel \ libxml++2-devel \ + libxslt-devel python-devel python3-lxml\ " fi echo "Running apt-get (you need root privelegies to do that)..." @@ -123,7 +125,8 @@ elif which dnf >/dev/null; then gtkmm30-devel \ glibmm24-devel \ SDL2-devel \ - SDL2_mixer-devel" + SDL2_mixer-devel + libxslt-devel python-devel python3-lxml" if ! ( rpm -qv $PKG_LIST ); then echo "Running dnf (you need root privelegies to do that)..." sudo dnf install $PKG_LIST || true @@ -163,7 +166,8 @@ elif which yum >/dev/null; then gtkmm30-devel \ glibmm24-devel \ SDL2-devel \ - SDL2_mixer-devel" + SDL2_mixer-devel + libxslt-devel python-devel python3-lxml" if ! ( rpm -qv $PKG_LIST ); then echo "Running yum (you need root privelegies to do that)..." su -c "yum install $PKG_LIST" || true @@ -178,6 +182,11 @@ elif which zypper >/dev/null; then if ! ( rpm -qv $PKG_LIST ); then echo "Running zypper (you need root privelegies to do that)..." su -c "zypper install $PKG_LIST" || true + + # Add python lxml repository -> 3rd party + su -c "zypper addrepo https://download.opensuse.org/repositories/devel:languages:python/openSUSE_Tumbleweed/devel:languages:python.repo" + su -c "zypper refresh" + su -c "zypper install python-lxml" fi elif which pacman >/dev/null; then # diff --git a/1-setup-osx-brew.sh b/1-setup-osx-brew.sh index 5aa6dc0..edad78a 100755 --- a/1-setup-osx-brew.sh +++ b/1-setup-osx-brew.sh @@ -23,7 +23,7 @@ pushd "${WORKDIR}" > /dev/null WORKDIR=`pwd` popd > /dev/null -PACKAGES="adwaita-icon-theme autoconf automake ccache libtool intltool imagemagick gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3 sdl2 sdl2_mixer" +PACKAGES="adwaita-icon-theme autoconf automake ccache libtool intltool imagemagick gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3 sdl2 sdl2_mixer py27-lxml" export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_ANALYTICS=1 diff --git a/synfig-studio/plugins/lottie-exporter/lottie-exporter.py b/synfig-studio/plugins/lottie-exporter/lottie-exporter.py index 8d6ebfb..19b1f70 100644 --- a/synfig-studio/plugins/lottie-exporter/lottie-exporter.py +++ b/synfig-studio/plugins/lottie-exporter/lottie-exporter.py @@ -189,10 +189,10 @@ def gen_properties_offset_keyframe(lottie, animated, i): lottie["i"] = {} # Time bezier curve, not used in synfig lottie["o"] = {} # Time bezier curve, not used in synfig - lottie["i"]["x"] = 0.7 - lottie["i"]["y"] = 1.0 - lottie["o"]["x"] = 0.3 - lottie["o"]["y"] = 0.0 + lottie["i"]["x"] = 0.5 + lottie["i"]["y"] = 0.5 + lottie["o"]["x"] = 0.5 + lottie["o"]["y"] = 0.5 lottie["t"] = float(waypoint.attrib["time"][:-1]) * lottie_format["fr"] lottie["s"] = change_axis(cur_pos[0], cur_pos[1]) lottie["e"] = change_axis(next_pos[0], next_pos[1]) @@ -409,6 +409,7 @@ else: lottie_string = json.dumps(lottie_format) # Write the output to the file name with .json extension NEW_FILE_NAME = FILE_NAME.split(".") + NEW_FILE_NAME = NEW_FILE_NAME[:-2] NEW_FILE_NAME[-1] = "json" NEW_FILE_NAME = ".".join(NEW_FILE_NAME) outputfile_f = open(NEW_FILE_NAME, 'w')