Page 1 of 1

[updated] QuickSave & Load button set

Posted: 12 Nov 2013, 12:58
by Svengali
Here is a little Panel called Image - save&load that I use all the time...
Image - save&load.jpg
Image - save&load.jpg (5.97 KiB) Viewed 2997 times
They function outside the normal TVP file management and are really just a quick and dirty solution to save images with minimal fuss.

Files are always saved to the same Folder, the location and names are hardwired in the script: QuickSaveImages The folder is created the first time you save an image (and it tells you that it has been created.)

Supporting All OS...

Layer .png files automatically have a prefix: TVP-Layer followed by five numbers which start at 00000 and auto-increment with each save.
DISPLAY .png files automatically have a prefix: TVP-Display followed by five numbers which also start at 00000 and auto-increment with each save.


1.REloads any of the images already in the same directory (either TVP-Display with opaque background or TVP-Layer with alpha) on the current frame and current layer.
2. Saves the current frame, CURRENT LAYER ONLY (with alpha transparency) into a .png file
3. Saves the current frame DISPLAY (all visible layers and opaque background) into a .png file

After you click either save button you will see a dialog box with the name of the file about to be saved but if you want to overwrite the one you just saved, you can change the number back to the previous incremental value. Be warned that it will save immediately when you click OK in the dialog box.

I personally used them to capture any project frame or layer I want to save as WIP. I sometimes remove saved images from the folder and those missing numbers get filled in as new images are saved meaning the numbering of the images doesn't necessarily reflect the order in which they were saved (but the files dates would give you that anyway.)

Report any problems here, thanks.

Sven

UPDATE November 14, 2013: MAC and LINUX TVPaint users should now be able to use these three buttons for QuickSave of Display and Layers. Feedback appreciated from MAC and LINUX users.

Where to find the QuickSaveImages folder:
Windows 7 = C:\Users\<username>\My Documents\QuickSaveImages
MAC = /Users/<username>/QuickSaveImages
Linux = /home/<username>/QuickSaveImages

Re: QuickSave & Load button set

Posted: 12 Nov 2013, 14:37
by D.T. Nethery
Svengali wrote: Files are always saved to the same Folder, the location and names are hardwired in the script: C:\QuickSaveImages2\ The folder is created the first time you save an image (and it tells you that it has been created.)

(not sure if this filepath will work on MAC... if not, perhaps one of the programmers could explain the Mac path option?)

I can confirm that this does not work for me on my Mac (Mac OS 10.7) Clicking on Save Layer will get a pop-up saying "New Folder named QuickSaveImages2\ created" , but after clicking OK the result is a pop up that says: "Can't Open File"

Then a search for a new folder named QuickSaveImages2\ is not found on my Mac.

So as you suspected it must need to have a different file path option for Mac.






.

Re: QuickSave & Load button set

Posted: 12 Nov 2013, 14:57
by Thierry
This script cannot work on Mac OS, or Linux.
Only Windows uses letters for the disks (C:\, D:\...), while Mac OS and Linux use a different system.
In MacOS for example, your home directory is located in /Users/<username>.

Here's a comparison of how Linux, MacOS and Windows handle their filesystems :
Image

So, to make sure your script works on the 3 Os, the folder QuickSaveImages2 can be placed in :
- Linux : /home/<username>/QuickSaveImages2
- Mac : /Users/username>/QuickSaveImages2


To recover the home directory regardless of which OS you are using, you should use this George command : tv_getpath "Home"

Re: QuickSave & Load button set

Posted: 12 Nov 2013, 15:02
by ematecki
And I think accessing the root of c:\ doesn't work on a recent windows if you aren't administrator ...

Re: QuickSave & Load button set

Posted: 13 Nov 2013, 01:25
by Svengali
Thanks Thierry and Eric, for the info and comments.

I'll try to redo the scripts' for all three buttons and re-post the results in a day or two.

Sven

Re: [updated] QuickSave & Load button set

Posted: 14 Nov 2013, 10:41
by Svengali
The original post has been updated with a new TVPX file which has been modified to work for MAC and Linux users. If/when any MAC and/or Linux user tries out the update could you please post feedback here?

Thanks, Svengali

Re: [updated] QuickSave & Load button set

Posted: 16 Nov 2013, 15:15
by idragosani
It works well on Linux, for saving and loading. However, these things to note:

1. I get a dialog popup telling me it created /home/idragosani/QuickSaveImages for every use, even if the directory was already created.

2. When I load an image, even though the image loads into the frame, I get this error dialog.
tvp-error.png
tvp-error.png (8.51 KiB) Viewed 2934 times

Re: QuickSave & Load button set

Posted: 24 Nov 2013, 01:25
by masterchief
cant you just make the work directory for this user configurable?????

Re: QuickSave & Load button set

Posted: 24 Nov 2013, 21:16
by masterchief
ematecki wrote:And I think accessing the root of c:\ doesn't work on a recent windows if you aren't administrator ...
I would prefer being able to set the destination path, filetype, etc