Skip to content

Commit

Permalink
Fixed precompositions export
Browse files Browse the repository at this point in the history
  • Loading branch information
laktyushin committed Jun 4, 2019
1 parent 9e4f4c4 commit c0c36db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions bundle/jsx/dataManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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, '');

Expand Down
4 changes: 2 additions & 2 deletions src/redux/reducers/compositions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit c0c36db

Please sign in to comment.