• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Photoshop Scripting - Smartlayer stack mode mean

Community Beginner ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

Hi,

I have a script that calculates the median of some images that are loaded automatically into PS. I want to change the median to mean, but I can't find any good documentation about PS scripting, does anyone know how to do that? Here's my code for calculating the median:

 

function makeMedian(){

var idapplyImageStackPluginRenderer = stringIDToTypeID( "applyImageStackPluginRenderer" );

var desc6 = new ActionDescriptor();

var idimageStackPlugin = stringIDToTypeID( "imageStackPlugin" );

var idmedn = charIDToTypeID( "medn" );

desc6.putClass( idimageStackPlugin, idmedn );

var idNm = charIDToTypeID( "Nm " );

desc6.putString( idNm, """Median""" );

executeAction( idapplyImageStackPluginRenderer, desc6, DialogModes.NO );

}

 

Thanks!

TOPICS
Actions and scripting

Views

104

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

Seems to record just fine with ScriptingListener.plugin

// =======================================================
var idapplyImageStackPluginRenderer = stringIDToTypeID( "applyImageStackPluginRenderer" );
    var desc8 = new ActionDescriptor();
    var idimageStackPlugin = stringIDToTypeID( "imageStackPlugin" );
    var idavrg = charIDToTypeID( "avrg" );
    desc8.putClass( idimageStackPlugin, idavrg );
    var idname = stringIDToTypeID( "name" );
    desc8.putString( idname, "Mean" );
executeAction( idapplyImageStackPluginRenderer, desc8, DialogModes.NO );

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

Wow, thank you so much! I totally forgot about the plugin... It's been a while since I actively used PS

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

LATEST

You’re welcome! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines