Locking a distort selection and nudging selection Topic is solved

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
User avatar
David_Fine
Posts: 557
Joined: 29 Aug 2014, 16:39

Locking a distort selection and nudging selection

Post by David_Fine »

Is there a way to nudge a selection using the keyboard rather than freehand, for more accuracy? Also, if I use the distort tool can I lock the direction of the resize one way or the other so that as I squish the horizontal, it does not effect the vertical?
David Fine
iMac late 2014 3.5 GHz, 32GB RAM
Snowden Fine Animation Inc.
Vancouver, Canada
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: Locking a distort selection and nudging selection

Post by D.T. Nethery »

David_Fine wrote:Is there a way to nudge a selection using the keyboard rather than freehand, for more accuracy?
The most precise nudge tool (1 pixel per click) is in the Handy Panel , the four arrow keys . I'm not sure if those can be mapped to keyboard shortcuts or not .
Spoiler : :
Nudge arrows in Handy Panel.jpg
Nudge arrows in Handy Panel.jpg (85.62 KiB) Viewed 18862 times
David_Fine wrote: Also, if I use the distort tool can I lock the direction of the resize one way or the other so that as I squish the horizontal, it does not effect the vertical?
The only distortion tool that I know of which allows for locking points is the Warp Tool .
Spoiler : :
Warp Tool.jpg
Warp Tool.jpg (43.89 KiB) Viewed 18862 times
See: https://www.tvpaint.com/doc/tvp11/index ... sform-warp" onclick="window.open(this.href);return false;

I would give a BIG +1 for adding a new function to the Distortion WARP GRID in the FX Panel to allow for Locking points on the Warp Grid. If the Warp Grid points are lockable then I don't know how it's done . Maybe someone from the development team could enlighten us about that or let us know if it's possible to add lockable points to the Warp Grid FX .
Spoiler : :
Distortion WARP GRID FX Tool.jpg

.

Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
User avatar
David_Fine
Posts: 557
Joined: 29 Aug 2014, 16:39

Re: Locking a distort selection and nudging selection

Post by David_Fine »

Good to know about the arrows in the Handy Panel. Seems logical that these should work with the keyboard arrows, doesn't it? How can we make that happen?

As regards locking points in the Warp tool, you can. You hold shift and drag over the points, then right click and select "lock".
David Fine
iMac late 2014 3.5 GHz, 32GB RAM
Snowden Fine Animation Inc.
Vancouver, Canada
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: Locking a distort selection and nudging selection

Post by D.T. Nethery »

David_Fine wrote:Good to know about the arrows in the Handy Panel. Seems logical that these should work with the keyboard arrows, doesn't it? How can we make that happen?

As regards locking points in the Warp tool, you can. You hold shift and drag over the points, then right click and select "lock".
Thanks. I know about shift and drag to lock points in the Warp tool from the Main Tool Panel . I meant that it would also be nice to have the ability to lock points on the Warp Grid in the FX Stack. (which confusingly is referred to as "Wrapping Grid" in the User Manual, but the actual name in the FX Stack is Warp Grid , however it's a different tool from the Warp Tool in the Main Panel . See: https://www.tvpaint.com/doc/tvp11/index ... n-wrapping" onclick="window.open(this.href);return false; )
Distortion WARP GRID FX Tool.jpg


.

Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Locking a distort selection and nudging selection

Post by Svengali »

Here's a way to assign the pixel slide buttons to shortcut keys.
But first a little explanation on how each of the Embedded George Scripts should be modified.

Currently, each button contains an Embedded George Script like the one shown here labeled C, in the lower left of the screen shot.
The important George command that does the work is: tv_Panning panningx panningy tile
Reading the Embedded George Script, you can see what the button does.

Code: Select all

tv_getmodifiers     // captures if the shift, control or alt key is pressed when the button is clicked on
PARSE result shift ctrl alt     // stores the result in three variables named shift ctrl and alt
IF (shift !=0)     // means if the shift key IS NOT equal to 0 - i.e. shift key is pressed
  tv_Panning -10 0 1     // pan the screen -10 pixels on x (horizontal-left)
ELSE     // otherwise, if the shift key IS equal to 0 - i.e. shift key IS NOT pressed
  tv_Panning -1 0 1     // pan the screen -1 pixel on x (horizontal-left)
END     // ends the IF test
In other words, for the Pixel Slide Left Button: pressing it shifts the contents of the screen left one pixel, but if you hold down the SHIFT key when you click the Pixel Slide Left Button, it shifts the contents of the screen left by ten pixels.

USING SHORTCUT KEYS ASSIGNED TO THE BUTTONS
Here's how you assign Shortcut Keys to these buttons. As an example, we assign the Pixel Shift Left button to the Shift-Left Arrow Short Cut key.
1. Go into the Short Cut Key editor.
2. Press the Shift-Left key so that is the key we are assigning.
3. In the right column, click the + next to the Handy Custom Panel group where you will see:
- 1pix down
- 1pix left
- 1pix right
- 1pix up
4. click on 1pix left
5. click on Assign
6. do the same steps for the Shift-Right key, the Shift-Up key and the Shift-Down key assigning the appropriate 1pix commands
7. press OK

Now you can test the Shift-arrow keys to see how pan the current layer screen.

But wait, there is a problem here because the Embedded George Script checks if the Shift key is pressed (which it is) and immediately slides the screen by TEN pixels. How do we get BOTH options (slide by one pixel AND slide by ten pixels)?

EDITING THE EMBEDDED GEORGE SCRIPTS
Here's what to do:
1. Copy all four buttons and rename the second set 10pix up, 10pix down, 10pix left, 10pix right. (Labeled A)
2. Open each of the buttons and modify the Embedded George Scripts as follows so that each has only a single line (Labeled C,D,E)

1pix up button = tv_panning 0 -1 1
1pix down button = tv_panning 0 1 1
1pix left button = tv_panning -1 0 1
1pix right button = tv_panning 1 0 1
10pix up button = tv_panning 0 -10 1
10pix down button = tv_panning 0 10 1
10pix left button = tv_panning -10 0 1
10pix right button = tv_panning 10 0 1

3. In the Shortcut Key Window under the Handy Custom Panel Group, assign each of the eight buttons to a different shortcut key for instance:

Shift Up = 1pix up button
Shift Down = 1pix down button
Shift Left = 1pix left button
Shift Right = 1pix right button
Ctrl Up = 10pix up button
Ctrl Down = 10pix down button
Ctrl Left = 10pix left button
Ctrl Right = 10pix right button

Once you create these shortcut keys, you will always be able to slide the pixels of the current layer/frame using the SHIFT arrow keys for one pixel at a time and the CONTROL arrow keys for ten pixels at a time.

Sven

EDIT: to save time, just use the Pixel Shift.tvpx panel from the following thread entry (below) which contains the eight buttons with already customized, embedded george scripts
Pixel Shift.png
Last edited by Svengali on 06 Dec 2016, 19:42, edited 1 time in total.
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Locking a distort selection and nudging selection

Post by Svengali »

To make it easier I'm uploading my Pixel Shift panel of the eight modified "pix" buttons.

Instead of having to modify and edit the embedded scripts for original buttons, just download the TVPX and assign the Shift arrow keys and the Control arrow keys (as discussed above).

Once the Pixel Shift custom panel is imported, just select the Pixel Shift Group in the shortcut key editor.

Sven
Attachments
Pixel Shift.tvpx
(460 KiB) Downloaded 785 times
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
David_Fine
Posts: 557
Joined: 29 Aug 2014, 16:39

Re: Locking a distort selection and nudging selection

Post by David_Fine »

This is really great. Thank you so much, Svengali. My only problem is that I am not able to assign anything to Control and Up, Down, etc. It just does not exist as an option. I'm on the Mac, if that makes a difference. I could assign Shift and Up, Down... So I did that for 1 pixel move, but can't assign the arrows to anything for the 10 pixel move.

DT, I have never used the FX panel to warp. That looks scary, or is it? It guess it's for using keyframes to have something warp on screen. Is that right?
David Fine
iMac late 2014 3.5 GHz, 32GB RAM
Snowden Fine Animation Inc.
Vancouver, Canada
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: Locking a distort selection and nudging selection

Post by Svengali »

Dave,
I think the control key on Windows works like the command key on Mac. Never used a Mac, ever. :(
So you would assign Command Up, Command Down, etc.

Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
David_Fine
Posts: 557
Joined: 29 Aug 2014, 16:39

Re: Locking a distort selection and nudging selection

Post by David_Fine »

Nope, there is no option to assign CMD arrow. I'm using Shift Down, Up, etc. for 1 pixel moves. There is no other key combo with the arrow keys on the Mac version of TVPaint. Anyway, this is still very useful. Thanks.
David Fine
iMac late 2014 3.5 GHz, 32GB RAM
Snowden Fine Animation Inc.
Vancouver, Canada
Post Reply