Photoshop脚本“重复最后曲线”

发布于 2025-01-25 16:18:02 字数 1060 浏览 2 评论 0原文

我为我的工作使用一些Photoshop脚本,并且一直尝试找到一种重复以前的曲线调整的方法,因为很多次有必要重复类似的(但不是一样)相同类型的图像。

许多人不知道这一细微差别,但是在Photoshop中,有一个不太记录的选项,可以打开调整对话框(级别 /曲线 /色调饱和度等),其值与前一次相同的值。可以将ALT添加到他们的电话的热键中。 例如:

CTRL+ALT+L for Levels
CTRL+ALT+M for Curves
CTRL+ALT+U for Hue/Saturation

如果您不知道这一点,请了解我需要的内容,请在Photoshop 逐步中尝试:

  1. 打开图像
  2. 按CTRL+M,编辑曲线点,然后按OK。
  3. 现在按CTRL+ALT+M(您会看到一个新的曲线对话框已打开,其点及其位置与您在步骤2中应用的位置)。
  4. 更改曲线点,然后单击OK
  5. 现在再次按Ctrl+Alt+M,现在您将看到步骤4中应用的曲线设置
  6. ...依此类推,

我在打开任何保存的曲线都没有脚本的情况下没有问题...但是,使用预设太有限了,因为将它们捡起当前的图像类型,比自己更改设置所需的时间更长。我需要一个脚本,曲线将与先前的值完全打开。就像使用Ctrl+Alt+M在Photoshop中完成。

如果我记录动作(按CTRL+ALT+M),则简单地记录了曲线的当前值,而不是对上一个曲线的重复。

因此可以使用JSX执行此操作吗?

非常感谢!

当曲线对话框在脚本中创建时,该代码出现:

    var idpresetKind = stringIDToTypeID( "presetKind" );
    var idpresetKindType = stringIDToTypeID( "presetKindType" );
    var idpresetKindCustom = stringIDToTypeID( "presetKindUserDefined" );

也许在Photoshop库的肠子中某个地方有一个“预设”重复先前的应用值?

I use some photoshop scripts for my work, and all the time try to found a way to repeat previous curves adjusting, since many times it is necessary to repeat a similar (but not the same, so that I can slightly correct it) correction for the same type of images.

Many peoples do not know about this nuance, but in Photoshop there is a not-so-documented option to open an adjustment dialog ( levels / curves / hue saturation, etc. ) with the same values ​​aswhich they were applied the previous time. It can be done with adding ALT to the hot keys of their call.
e.g.:

CTRL+ALT+L for Levels
CTRL+ALT+M for Curves
CTRL+ALT+U for Hue/Saturation

If you dont know this, for understand what i need, try it in photoshop step by step:

  1. Open the image
  2. Press CTRL+M, edit curves points and press OK.
  3. Now press CTRL+ALT+M (you will see that a new curves dialog has opened with the same points and their positions that you applied in step 2).
  4. Change somehow curves points and click OK
  5. Now press CTRL+ALT+M again and now you will see the curves settings that were applied in step 4
  6. ...and so on

I have no problem with opening any saved curves preset with scripting... however, using the presets is too limited, because picking them up for the current type of images, takes longer than changing the settings myself. I need a script where the curves would open exactly with the previous values. Just like it is done in Photoshop with CTRL+ALT+M.

If I record action (with pressing CTRL+ALT+M), the current values of the curves is simply recorded and not a repetition of the previous one.

So it possible to do this with jsx?

Many thanks!

While curves dialog create in script, this piece of code appears:

    var idpresetKind = stringIDToTypeID( "presetKind" );
    var idpresetKindType = stringIDToTypeID( "presetKindType" );
    var idpresetKindCustom = stringIDToTypeID( "presetKindUserDefined" );

Perhaps somewhere in the bowels of the Photoshop libraries there is a "preset" that repeats the previous apply values?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

洛阳烟雨空心柳 2025-02-01 16:18:03

多亏了Adobe社区的@ghoul Fool和 Kukurykus ,我找到了正确的答案。对于一个会搜索同一件事的人,我将在此处保留:

try{dsc = getCustomOptions('curves')}catch(err){dsc = new ActionDescriptor()}
try{dsc = executeAction(stringIDToTypeID('curves'), dsc, DialogModes.ALL),
putCustomOptions('curves', dsc, false)}catch(err){}

将其保存为ps的“预设 /脚本”文件夹中的' curves.jsx < / em>'。 (重新)启动应用程序,而不是您的操作中的当前曲线项目,从可扩展的上下文菜单'插入菜单项',然后选择' file &gt; 脚本&gt; 曲线'。

现在,每当您播放动作并设置曲线时,它都会记住上一次使用的设置来播放它们。

src

就是这样!

Thanks to @Ghoul Fool and Kukurykus from Adobe community, i found correct answear. And for somebody who will search the same thing, I`ll keep here this:

try{dsc = getCustomOptions('curves')}catch(err){dsc = new ActionDescriptor()}
try{dsc = executeAction(stringIDToTypeID('curves'), dsc, DialogModes.ALL),
putCustomOptions('curves', dsc, false)}catch(err){}

Save it as 'Curves.jsx' to your 'Presets / Scripts' folder of your Ps. (Re)launch app and instead of current Curves item in your action, from expandable contextual menu 'Insert Menu Item' and choose 'File > Scripts > Curves'.

Now any time you play the action and set curves it will remember last used settings to play them back.

src

Thats all!

蓝色星空 2025-02-01 16:18:03

如果我正确理解您,则可以加载现有的.ACV文件,然后将曲线加载到其上。

var myCurves = "D:\\temp\\myCurvesFile.acv"; // change to your file

curves(myCurves); // invoke function


function curves(afile)
{
    // =======================================================
    var idCrvs = charIDToTypeID( "Crvs" );
    var desc14 = new ActionDescriptor();
    var idpresetKind = stringIDToTypeID( "presetKind" );
    var idpresetKindType = stringIDToTypeID( "presetKindType" );
    var idpresetKindUserDefined = stringIDToTypeID( "presetKindUserDefined" );
    desc14.putEnumerated( idpresetKind, idpresetKindType, idpresetKindUserDefined );
    var idUsng = charIDToTypeID( "Usng" );
    desc14.putPath( idUsng, new File( afile ) );
    executeAction( idCrvs, desc14, DialogModes.NO );
}

If I understand you correctly, you can load an existing .acv file and then aplly the curves to it.

var myCurves = "D:\\temp\\myCurvesFile.acv"; // change to your file

curves(myCurves); // invoke function


function curves(afile)
{
    // =======================================================
    var idCrvs = charIDToTypeID( "Crvs" );
    var desc14 = new ActionDescriptor();
    var idpresetKind = stringIDToTypeID( "presetKind" );
    var idpresetKindType = stringIDToTypeID( "presetKindType" );
    var idpresetKindUserDefined = stringIDToTypeID( "presetKindUserDefined" );
    desc14.putEnumerated( idpresetKind, idpresetKindType, idpresetKindUserDefined );
    var idUsng = charIDToTypeID( "Usng" );
    desc14.putPath( idUsng, new File( afile ) );
    executeAction( idCrvs, desc14, DialogModes.NO );
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文