Skip to content

Commit 01ee256

Browse files
committed
Print configs in log and better dryRun
1 parent eed1d95 commit 01ee256

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/explode_shape_layer.jsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
function explodeLayer(layer) {
77

8-
cLog('==================\n' + 'Exploding layer : ' + layer.name);
8+
cLog('Exploding layer : ' + layer.name);
99

1010
// Get the elements of the original shape layer
1111
var contents = layer.property("Contents");
@@ -57,6 +57,7 @@ function explodeLayer(layer) {
5757
for(var i = 0; i < layers.length; i++) {
5858
layers[i].enabled = true;
5959
layers[i].shy = false;
60+
if(configs.dryRun) layers[i].remove();
6061
}
6162

6263
return layers;
@@ -79,6 +80,16 @@ function explode() {
7980
return;
8081
}
8182

83+
cLog('==================')
84+
85+
cLog('Configs :')
86+
for(config in configs) {
87+
if(configs.hasOwnProperty(config))
88+
cLog(' ' + config + ' : ' + configs[config])
89+
}
90+
91+
cLog('')
92+
8293
var execTime = new ExecutionTime();
8394
execTime.start();
8495

@@ -87,16 +98,6 @@ function explode() {
8798

8899
var layers = explodeLayer(selectedLayer);
89100

90-
if(configs.dryRun) {
91-
92-
cLog('Removing generated layers');
93-
94-
for(var i = 0; i < layers.length; i++) {
95-
layers[i].remove();
96-
}
97-
98-
}
99-
100101
selectedLayer.moveToBeginning()
101102
selectedLayer.containingComp.hideShyLayers = hideShyLayers_originalState;
102103

0 commit comments

Comments
 (0)