Copy link to clipboard
Copied
I know that New Artboard From Layers can be one by one.
But I think this is very troublesome
Is there any way to generate all the selected ones at a time?
Try this script
...var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("selectAllLayers"), d, DialogModes.NO);
var id = get_selected_layers_id();
if (id) for (var i = 0; i < id.length; i++) make_artboard(id)
///////////////////////////////////////////////////////////////////////////////////////////
function make_artboa
Copy link to clipboard
Copied
It’s too much trouble to generate one by one. Can anyone help me?
Copy link to clipboard
Copied
Maybe I have English, it’s not very standard. I’m Google Translator.
I want to finish New Artboard From Layers in an instant.
Copy link to clipboard
Copied
I made a plugin for changing multiple layers in single click in cases where Photoshop can't do it.
Artboard or group for each layer / Pepperbox - Photoshop plugin - YouTube
Copy link to clipboard
Copied
Unfortunately, I only have Alipay. Your website does not support Alipay.
Copy link to clipboard
Copied
I am not sure how Alipay works but e.g. on PayPal you have to enter numbers from credit card and PayPal remember it for all payments. On my website you can buy it via PayPal or you can enter number from credit card directly. So if your Alipay account is connected with credit card similar like PayPal then you can just enter the numbers.
Copy link to clipboard
Copied
Alipay is the payment method in China
Very good payment method I hope that you can support this website in the future.
I think there will be more Chinese friends who buy your plugin.
Copy link to clipboard
Copied
Because it is very troublesome to register PayPal in China.
I usually use Alipay because it is very fast.
I hope that your website will support it in the future.
Copy link to clipboard
Copied
Thanks for feedback 🙂 Maybe I could add my extension to official Adobe Exchange site. They are using FastSpring which supports more payment methods than Gumroad and it also includes Alipay. Anyway it require significant change in my license system so it wouldn't be easy to do.
Copy link to clipboard
Copied
Unfortunately, I only have Alipay. Your website does not support Alipay.
Copy link to clipboard
Copied
del (eeror)
Copy link to clipboard
Copied
Try this script
var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("selectAllLayers"), d, DialogModes.NO);
var id = get_selected_layers_id();
if (id) for (var i = 0; i < id.length; i++) make_artboard(id)
///////////////////////////////////////////////////////////////////////////////////////////
function make_artboard(id)
{
try {
var d = new ActionDescriptor();
var r = new ActionReference();
r.putClass(stringIDToTypeID("artboardSection"));
d.putReference(stringIDToTypeID("null"), r);
var r1 = new ActionReference();
r1.putIdentifier(stringIDToTypeID("layer"), id);
d.putReference(stringIDToTypeID("from"), r1);
executeAction(stringIDToTypeID("make"), d, DialogModes.NO);
}
catch (e) { alert(e); throw(e); }
}
///////////////////////////////////////////////////////////////////////////////////////////
function get_selected_layers_id()
{
try {
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("targetLayersIDs"));
r.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var list = executeActionGet(r).getList(stringIDToTypeID("targetLayersIDs"));
if (!list.count) return null;
var ids = new Array();
for (var i = 0; i < list.count; i++) ids.push(list.getReference(i).getIdentifier());
return ids;
}
catch (e) { alert(e); return null; }
}
Copy link to clipboard
Copied
Thank you very much for your script.
It works fine, but I want to target only the selected layer
It turns all the layers into a drawing board. This is not what I want to see.
-------------------------------------------------------------------------------------------------------
Because it is very difficult to learn some scripts in China.
The official language version does not have Chinese help. Can you modify it for me? Let it be only for the selected layer.
Copy link to clipboard
Copied
Just delete the first five lines of code.
But in this case, if you start from the moment when you do not have any ArtBoard yet, you will get that not selected layers will be placed in the first created ArtBoard.
In principle, this problem can also be solved.
Copy link to clipboard
Copied
Thank you very much, it is perfect.
Copy link to clipboard
Copied
Rewrite a code you got from me for other task, but with SL output for Artboard this time: How to quickly replace a mask
Copy link to clipboard
Copied
Hey, I saw you again, an enthusiastic friend. Because I am a Google translator, it seems that it is inaccurate to translate into Chinese. I don't quite understand what you mean.
Copy link to clipboard
Copied
I mean the code you got in other theard can be used in changed version to do what you want now. The only what you have to do, is to use ScriptListenerJS.log to get a part with Artboard code.
Copy link to clipboard
Copied
@天林54894715 I changed my mind. I won't support Alipay because Alipay is part of this: Leave no dark corner - ABC News (Australian Broadcasting Corporation) Alipay is part of Alibaba Group which own Sesame Credit (Zhima Credit)
I am not even sure if anyone in China can see this because of Great Chinese FireWall. http://www.abc.net.au/news/2018-09-18/china-social-credit-a-model-citizen-in-a-digital-dictatorship/...
Copy link to clipboard
Copied
I only guess you don't want to support invigilating people if that is all about? I think all companies have their dark secrets
Copy link to clipboard
Copied
There are always some people who like to spread some conspiracy theories.
China is always a peace-loving country.
Copy link to clipboard
Copied
I am sorry for offtopic but I wonder if this happened or is it also conspiracy theory?
Copy link to clipboard
Copied
There are always some people who like to spread some conspiracy theories.
China is always a peace-loving country.