Page 1 of 1

Grid & Guideline save

Posted: 01 Feb 2018, 14:04
by KF | Animation
Hi there,
i am using TVP 11.0.8 and i am looking for a possibility to save my grid settings.
I ad in the guideline panel a grid and do some adjustments. Everthing is fine.
But if I open a new dokument, i have to do it again. The same adjustments for each new dokument.
Does somebody know how can i save this grid adjustments to ad my own grid in a new dokument?

Thank you.
Jens.

Re: Grid & Guideline save

Posted: 01 Feb 2018, 20:17
by Svengali
One way is to make a button with the following embedded script. Note that you will have to enter your own Xcell and Ycell dimensions.

Code: Select all

Xcell = 8
Ycell = 6
msg =  Xcell " by " YCell " grid|display|erase"
tv_Request msg
IF result = = 1
  tv_GetWidth
  Width = result
  tv_GetHeight
  Height = result
  GW = Width / Xcell
  GH = Height / Ycell
  tv_GuideLineAdd GRID X 0 Y 0 W GW H GH 
ELSE
  tv_GuideLineRemove ALL GRID
END
sven

Re: Grid & Guideline save

Posted: 03 Feb 2018, 10:53
by Animationriver
Svengali wrote: 01 Feb 2018, 20:17 One way is to make a button with the following embedded script. Note that you will have to enter your own Xcell and Ycell dimensions.

Code: Select all

Xcell = 8
Ycell = 6
msg =  Xcell " by " YCell " grid|display|erase"
tv_Request msg
IF result = = 1
  tv_GetWidth
  Width = result
  tv_GetHeight
  Height = result
  GW = Width / Xcell
  GH = Height / Ycell
  tv_GuideLineAdd GRID X 0 Y 0 W GW H GH 
ELSE
  tv_GuideLineRemove ALL GRID
END
sven
Hello! And how to set black color and disconnected magnet?
Thanks!

Re: Grid & Guideline save

Posted: 03 Feb 2018, 11:52
by KF | Animation
Hi Sven,

thank you so much. This is great. It works perfect.
But there is no other way to save a grid or any other guidelines (marks, circle, vanish point etc.) directly in the guideline panel?

Thanks a lot,
Jens.

Re: Grid & Guideline save

Posted: 03 Feb 2018, 13:28
by Svengali
All of the commands for Guideline management can be found >>HERE<< in the Wiki for TVPaint George...

Specifically, check out commands: tv_GuidelineSnap and tv_GuidelineColor.

sven

Re: Grid & Guideline save

Posted: 03 Feb 2018, 15:00
by Animationriver
Thank you! You are a wonderful professional and showed where to look, in order to learn. :D
I do not understand how to make this button smart, but sooner or later I'll understand.
But today. :D I do not know the iterations that seem very simple for you personally.
My attempt was recorded on video. 8)
I want to change the color of the guiding lines to black. And cancel the magnet. :lol:

Re: Grid & Guideline save

Posted: 03 Feb 2018, 22:14
by Svengali
I've modified the script adding the tv_GuideLineSnap command and the tv_GuideLineColor command.

Code: Select all

Xcell = 8
Ycell = 6
R = 0
G = 0
B = 0
A = 255
msg =  Xcell " by " YCell " grid|display|erase"
tv_Request msg
IF result == 1
  tv_GetWidth
  Width = result
  tv_GetHeight
  Height = result
  GW = Width / Xcell
  GH = Height / Ycell
  tv_GuideLineAdd GRID X 0 Y 0 W GW H GH 
  tv_GuideLineSnap GRID OFF
  tv_GuideLinecolor GRID R G B A
ELSE
  tv_GuideLineRemove GRID
END
Everyone finds their own way to scripting, usually by reading docs like those found in the Wiki, watching tutorials and looking at scripts written by others to decipher what each command line does. GEORGE scripts are totally accessible, written in plain text form. Start by making simple changes in a script like this one: Try to make a new button that generates a red grid and another button that generates a green grid with different dimensions. You can make another button with a one-line embedded script that will let you Toggle the Snap-to-Grid-state on and off (hint instead of using ON or OFF, use TOGGLE as described in the documentation). Experiment - its hard to break anything with GEORGE scripts and GEORGE will often tell you exactly which line in your script is the problem. You'll quickly understand how it works. Where it takes you is up to you.

With Guidelines, the interface is wonderfully designed for interactive use. But GEORGE provides GuideLine script commands that users can combine in scripts, for example, to store and retrieve user defined-grid dimensions, user-defined grid states like color and snapping, etc.

sven

Re: Grid & Guideline save

Posted: 04 Feb 2018, 10:38
by Animationriver
This is a kind act from your side. Thank you, Sven!
Unfortunately I am an animator and my brain perceives everything only through video and video lessons. We live in a new era. It's very difficult for me to become a programmer, even if George's language is very simple. But I'm very happy that you are at this forum! And you're very responsive.
You made a button that I dreamed about for a very long time.
Thanks again!

Re: Grid & Guideline save

Posted: 04 Feb 2018, 15:17
by Animark
KF | Animation wrote: 01 Feb 2018, 14:04 But if I open a new dokument, i have to do it again. The same adjustments for each new dokument.
Does somebody know how can i save this grid adjustments to ad my own grid in a new dokument?
Another way could be to save one empty project with your grid settings and use it as a base for new projects (open and save under new name). I am not sure, if the grid-settings will stay when converting the project to a new size. But let's see. I think this is also the one and only way to save a library with different stuff (color-sheets, modellsheets, ...) when being too lazy to reproduce the lib with every new project.

:)

Re: Grid & Guideline save

Posted: 04 Feb 2018, 22:30
by NathanOtano
@TVP team : Could be nice to be able to save some presets and move/scale all guidelines together (to move those presets or just in general). Copy Paste beetween projects could be nice also

Re: Grid & Guideline save

Posted: 06 Feb 2018, 17:55
by Elodie
NathanOtano wrote: 04 Feb 2018, 22:30 @TVP team : Could be nice to be able to save some presets and move/scale all guidelines together (to move those presets or just in general). Copy Paste beetween projects could be nice also
In the To do list already :)

Re: Grid & Guideline save

Posted: 02 Apr 2018, 21:38
by Peter Wassink
haha...
i was gonna ask how to copy/export a guideline stack to another project...
and that i forgot how to do that...

it turns out i forgot you can't :P