It is currently Thu Mar 28, 2024 12:12 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: [SOLVED] - Script Request. Move Tool Dialog
PostPosted: Mon Nov 29, 2010 3:58 pm  (#1) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
This may be something only the GIMP developers can do but perhaps a script can do it.

I have a very hard time moving a selection or an area a designated amount when the amounts are large - arrow keys can do small amounts. Having a popup similar to the one that comes up when I click the Rotate tool and I can put in values would be very nice.

Image


Here is a suggested popup dialog. I got this out of a selection tool dialog.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Mon Nov 29, 2010 5:21 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
You can hold down the alt key on windows and move the selection very quickly. =)
I do not know what the command is in mac, or Linux setups.

However it would be nice to be able to type in an exact position for a selection to place it.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Mon Nov 29, 2010 5:36 pm  (#3) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I don't have any trouble moving the selection. When I click in the selection to move it it moves fine. It's just that it's hard to get those two numbers below the image window correct and synched together. My mouse skills must be bad. Urg.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Mon Nov 29, 2010 8:19 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Apr 30, 2010
Posts: 1937
Location: Missouri
"Mouse skills" I like that, it was the funniest thing today, thanks.

_________________
Image
The last time I kept an open mind,
my brain fell out and the dog grabbed it.
Now it's full of dirt, toothmarks, and dog slobber.
No more open minds or dogs for me.


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 3:19 am  (#5) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4039
I'm thinking you probably know this, but for Circle and Rectangle tool selections, you can place the selection precisely, but because selection points are from the top left corner, you'll need to account for that on determining position. For example, a 150 px circle being placed specifically at (random position number of "120, 180") would be centered at (45,105) which is half the diameter of the circle, for both location points. The same would apply for squares and rectangles.

Although, I would love the very feature you suggest, O. It would make GIMP'ing far easier.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 3:43 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Try a suggestion on the registry forums.Someone will see it eventually, and probably create one quickly.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 6:01 am  (#7) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
While I think that you are better off using the keyboard to move the selection (holding the shift key while using the arrow keys gives big steps here on Windows XP) in the interests of creating something useful, what do you want the dialog box values represent?

Do you want to remember the start position, then use the dialog to move from that position, OR do you want the dialog to move from the current position - i.e. in an incremental way?

_________________
Kevin


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 7:50 am  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I want it to go from the start position directly to the new position. When the amounts are large, using the arrow keys is futile. This is not the only time I have had the need to move a selection to a new position.


This is a direct quote from the Tux tutorial here.
Quote:
G. Select the "Right Eye" layer.
H. Menu > Layer > Transparency > Alpha to Selection.
I. Select the "Left Wing Reflection Bottom" Layer
J. Select the "Move Tool"
K. Move Selection: Left 116, Down 88


This is a screen shot of what the quote is directing.
Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 8:23 am  (#9) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Try this script out. It will prompt you for the required offsets, and complain if you don't have a selection.

I have registered it in the contributed menu because I don't like scripts hiding in the menus and I've limited the offsets to +/- 4000 just because I had to pick an arbitrary number. Feel free to edit it to suit yourself, or ask and I'll make any changes you want.


Attachments:
move_current_selection.scm [1.69 KiB]
Downloaded 205 times

_________________
Kevin
Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 8:37 am  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Perfect!!!! Thanks so much. I am going to change where it resides though. Instead of making a new menu item on the <image> window, I'm putting it into the Select menu.

(script-fu-menu-register "move_current_selection"
"<Image>/Select")


:wh

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 8:57 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
That's where i put it Select/Move/Move by X and Y
Will it get mad if a choose just X and move it or just Y and move it?
NOPE just tried it and it works great! =)

Thanks Kevin.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: [SOLVED] - Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 10:01 am  (#12) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
I would just note that there is also the option of switching to Quickmask and using the "Layer->Transform->Offset..." command to accomplish this -- though Kevin Payne's script now saves a couple of steps.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: [SOLVED] - Script Request. Move Tool Dialog
PostPosted: Tue Nov 30, 2010 10:11 am  (#13) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
saulgoode wrote:
I would just note that there is also the option of switching to Quickmask and using the "Layer->Transform->Offset..."


That works nicely too. Another way to accomplish the job.

Also, if you want to move the selected object itself, I found out if I didn't use Quckmask, I could move the object instead. Good things to know here.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts How to tab to an open dialog, i.e. Scale Tool dialog?

1

No new posts Attachment(s) cannot move the crop tool to the line, why?

6

No new posts Attachment(s) SCROLLING SCRIPT-FU dialog modification

9

No new posts Attachment(s) Script request

3

No new posts Can you script access the Handle Transform tool?

2



* Login  



Powered by phpBB3 © phpBB Group