Skip to main content
Adobe Photoshop Family
hannes_drexl's profile

15 Messages

 • 

496 Points

Wed, Oct 29, 2014 7:40 AM

Solved

Photoshop: Unify Layer Position/Visibility can not be automated

In our company, we use Photoshop a lot to create sprite animation for video games. This includes the usage of the animation feature. One problem we have encountered though is that it does not seem to be possible to automate the settings "Unify Layer Position" and "Unify Layer Visibility". We need these settings activated on every single layer in our files, and we always have to set them manually which is very tedious and costs a lot of time. It is not possible to record an action (despite the fact that the unify settings show up in the history) nor have our programmers found a way to set these flags via Java Script. Is there any way this can be done?

Responses

Official Solution

Adobe Administrator

 • 

15.9K Messages

 • 

295.3K Points

6 years ago

This should be fixed in the Photoshop CC (2015) update.

Sr. Product Manager, Adobe Digital Imaging

Adobe Administrator

 • 

15.9K Messages

 • 

295.3K Points

6 years ago

Hi Hannes,

That is strange. The Listener plug-in does record these action descriptors but does nothing when executed:

// =======================================================
var idsetd = charIDToTypeID( "setd" );
var desc80 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref31 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref31.putEnumerated( idLyr, idOrdn, idTrgt );
desc80.putReference( idnull, ref31 );
var idT = charIDToTypeID( "T " );
var desc81 = new ActionDescriptor();
var idanimationUnifyPosition = stringIDToTypeID( "animationUnifyPosition" );
desc81.putBoolean( idanimationUnifyPosition, true );
var idLyr = charIDToTypeID( "Lyr " );
desc80.putObject( idT, idLyr, desc81 );
executeAction( idsetd, desc80, DialogModes.NO );

// =======================================================
var idsetd = charIDToTypeID( "setd" );
var desc82 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref32 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref32.putEnumerated( idLyr, idOrdn, idTrgt );
desc82.putReference( idnull, ref32 );
var idT = charIDToTypeID( "T " );
var desc83 = new ActionDescriptor();
var idanimationUnifyVisibility = stringIDToTypeID( "animationUnifyVisibility" );
desc83.putBoolean( idanimationUnifyVisibility, true );
var idLyr = charIDToTypeID( "Lyr " );
desc82.putObject( idT, idLyr, desc83 );
executeAction( idsetd, desc82, DialogModes.NO );

// =======================================================
var idsetd = charIDToTypeID( "setd" );
var desc84 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref33 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref33.putEnumerated( idLyr, idOrdn, idTrgt );
desc84.putReference( idnull, ref33 );
var idT = charIDToTypeID( "T " );
var desc85 = new ActionDescriptor();
var idanimationUnifyEffects = stringIDToTypeID( "animationUnifyEffects" );
desc85.putBoolean( idanimationUnifyEffects, true );
var idLyr = charIDToTypeID( "Lyr " );
desc84.putObject( idT, idLyr, desc85 );
executeAction( idsetd, desc84, DialogModes.NO );

I'm looking into it with the team.

Sr. Product Manager, Adobe Digital Imaging

15 Messages

 • 

496 Points

6 years ago

Great, thank you for looking into it! It would be very helpful for us if that could be fixed.

I've got a couple of similar problems where we had trouble to script some Photoshop functionality that should theoretically be possible to be scripted. I'll compile them once I find the time and create a new issue.

Adobe Administrator

 • 

15.9K Messages

 • 

295.3K Points

6 years ago

Great. Separate topics with sample code with help immensely.

Sr. Product Manager, Adobe Digital Imaging