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

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? 

Views

737

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
...

Votes

Translate

Translate
Adobe
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 );
}

 

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 ,
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.

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 ,
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

 

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

Copy link to clipboard

Copied

Okay, I will look into it, thanks

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 ,
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? 

 

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 ,
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...)

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 ,
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.

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

Copy link to clipboard

Copied

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

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
New Here ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

Hello, i very like your solution, but if i want my reference point not reset it location every time i comfirm transform, how do i script it ? can it possible?

 

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
LEGEND ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

Doesn't look like the default can be changed. This can be set by script when you do a transform but must be set every time.

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
New Here ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

Omg, i know how to do it by using action feature actually, but it require me make a new action every time i change location of reference point. That make me wonder if some kind of script or addon can help me with that. But if script need to set every time then it cant help me. Thank you

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
LEGEND ,
Feb 09, 2024 Feb 09, 2024

Copy link to clipboard

Copied

LATEST

Reference point is not a saved setting, its an input to transform. Just like -10 pixels would be an input.

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