From c0c36dbe20836ff359cb712a526ffd75e53857ac Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 4 Jun 2019 19:21:08 +0200 Subject: [PATCH] Fixed precompositions export --- bundle/jsx/dataManager.jsx | 19 +++++++++++-------- src/redux/reducers/compositions.js | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bundle/jsx/dataManager.jsx b/bundle/jsx/dataManager.jsx index b27974f1..e2926b87 100644 --- a/bundle/jsx/dataManager.jsx +++ b/bundle/jsx/dataManager.jsx @@ -277,10 +277,6 @@ $.__bodymovin.bm_dataManager = (function () { error = 'Composition should not include any Star Shapes'; break; } - if (items[i].ty == "mm") { - error = 'Composition should not include any Merge Paths'; - break; - } if (items[i].ty == "gs") { error = 'Composition should not include any Gradient Strokes'; break; @@ -339,10 +335,6 @@ loop: error = 'Composition should not include any Auto-Oriented Layers'; break; } - if (layers[i].ef != null) { - error = 'Composition should not include any Layer Effects'; - break; - } error = checkItems(layers[i].shapes, true); if (error != null) { @@ -358,6 +350,17 @@ loop: _destinationPath = destinationPath; deleteExtraParams(data, config); separateComps(data.layers, data.comps); + + if (data.comps) { + if (data.assets) { + data.assets = data.assets.concat(data.comps); + } else { + data.assets = data.comps; + } + data.comps = null; + delete data.comps; + } + var string = JSON.stringify(data); string = string.replace(/\n/g, ''); diff --git a/src/redux/reducers/compositions.js b/src/redux/reducers/compositions.js index 33af9687..a582d22a 100644 --- a/src/redux/reducers/compositions.js +++ b/src/redux/reducers/compositions.js @@ -23,7 +23,7 @@ let defaultComposition = { demo: false, avd: false, glyphs: true, - hiddens: false, + hiddens: true, original_names: false, should_encode_images: false, should_compress: false, @@ -33,7 +33,7 @@ let defaultComposition = { active: false, list:[] }, - guideds: false, + guideds: true, ignore_expression_properties: false, export_old_format: false, skip_default_properties: false,