New Group From Layers
-
Paul MR
New Group From Layers
Well I'am stumped. I have tested with and without a background layer on Windows and on a Mac (CS4) and the script is working fine so I have no idea why it doesn't work for you.
-
Mike Hale
New Group From Layers
Paul, I am not sure why but it also doesn't work for me on WinXP with CS5. It seems that without a background layer in the doc the index is off for the move step.
I can fix it here by making this change;
Code: Select all try{
activeDocument.backgroundLayer;
moveLayerToLayerSet( Number(sLayers[a]),To);
}catch(e){
moveLayerToLayerSet( Number(sLayers[a]),To+1);
}
But if it is working for you now that change should break it on your system. I think I would rather understand why the index needs changing on some systems and not others so I will spend some time looking into this.
I can fix it here by making this change;
Code: Select all try{
activeDocument.backgroundLayer;
moveLayerToLayerSet( Number(sLayers[a]),To);
}catch(e){
moveLayerToLayerSet( Number(sLayers[a]),To+1);
}
But if it is working for you now that change should break it on your system. I think I would rather understand why the index needs changing on some systems and not others so I will spend some time looking into this.
-
Paul MR
New Group From Layers
Thank you for testing Mike.
Yes there is an error in the first script when there is no Background, I will have look to see what the problem is.
I was testing the second script with/without a background on Windows and on a Mac and this one is working fine for me, does this work for you with XP?
Yes there is an error in the first script when there is no Background, I will have look to see what the problem is.
I was testing the second script with/without a background on Windows and on a Mac and this one is working fine for me, does this work for you with XP?
-
Mike Hale
New Group From Layers
Sorry, I didn't test the second script before I made my post. Yes it works here as expected.
-
mycort
New Group From Layers
really odd, I tried the second code version again and now it works regardless of background. I did made updates to both my macos and photoshop....
thx for all your time and effort, this will save me tons of time....
thx for all your time and effort, this will save me tons of time....