How to set Free Transform default reference point to top left?

Community Beginner ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

Whenever I insert a picture as a new layer a, I want to position it by using the top left point as reference point (e.g. 100 pixels from top / left on X/Y axis). But whenever I hit Ctrl-T, the default reference point  is Center. What can I do to make the default Top Left instead of Center? 
TOPICS
Cross-app workflows

Views

84

Likes

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

correct answers 1 Correct answer

Community Expert , Jun 06, 2022 Jun 06, 2022

You can record an action with the modal control on (see screenshot) for an interactive transform and use an F-Key action shortcut. 

 

modal-action.png

 

A script can also do the same with the choice of a custom keyboard shortcut.

 

transformLayer(0, 0);

function transformLayer(horizontal, vertical) {
	var s2t = function (s) {
		return app.stringIDToTypeID(s);
	};
	var descriptor = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putEnumerated( s2t( "layer" ), s2t( "ordinal" ), s2t( "t
...

Likes

Translate

Translate
Community Expert ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

You can record an action with the modal control on (see screenshot) for an interactive transform and use an F-Key action shortcut. 

 

modal-action.png

 

A script can also do the same with the choice of a custom keyboard shortcut.

 

transformLayer(0, 0);

function transformLayer(horizontal, vertical) {
	var s2t = function (s) {
		return app.stringIDToTypeID(s);
	};
	var descriptor = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putEnumerated( s2t( "layer" ), s2t( "ordinal" ), s2t( "targetEnum" ));
	descriptor.putReference( s2t( "null" ), reference );
	descriptor.putEnumerated( s2t( "freeTransformCenterState" ), s2t( "quadCenterState" ), s2t( "QCSCorner0" )); // upper left
	descriptor.putUnitDouble( s2t( "horizontal" ), s2t( "pixelsUnit" ), horizontal );
	descriptor.putUnitDouble( s2t( "vertical" ), s2t( "pixelsUnit" ), vertical );
	descriptor.putObject( s2t( "offset" ), s2t( "offset" ), descriptor );
	descriptor.putEnumerated( s2t( "interfaceIconFrameDimmed" ), s2t( "interpolationType" ), s2t( "bicubicSmoother" ));
	executeAction( s2t( "transform" ), descriptor, DialogModes.ALL );
}

 

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

This looks complicated with all the machine language... but I do not want an action that always sets a layer at a specific point, I just want the Ctrl-T options to use top-left by default instead of center.

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

Well, that is what the interactive modal control action or script do. Have you actually tried them? Just record the transform with no X/Y change (0 - a zero value) and no change in % width/height (a 100% value). I am not aware of any other way to "default" the transform anchor point.

 

transform.png

 

More on saving/installing JavaScript code here, it is not as complex as you may think:

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

Okay, I will look into it, thanks

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

I must have done something wrong. I copied the whole text into Notepad, saved it as .txt, changed the extension to .jsx (had to look up how to change extetnsions...) and installed in the correct folder. Then restarted Photoshop but now when I hit Ctrl-T on a layer it still defaults to center, not top left. .Do I need to do anything to make the script work? Do I have to hit 'execute script' somewhere instead of hitting Ctrl-T, maybe? 

 

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

Edit: ignore previous reply, I now found File > Scrips (but I can't seem to delete or edit my own replies on here...)

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

Once installed in the program's Presets/Scripts folder as per the instructions in my previous link, you can assign a custom keyboard shortcut to the script.

Likes

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 ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

LATEST

Yes it works now, I also found out how to assign shortcuts, thanks.

Likes

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