OU blog

Personal Blogs

ExLibris

Another pasted background

Visible to anyone in the world
Edited by Martin Thomas Humby, Saturday, 7 June 2014, 21:52

Falling Blobs

Black Rain 1

Permalink Add your comment
Share post
Attachments:
application/zipVerControl.zip
ExLibris

Version Control for Processing sketches

Visible to anyone in the world
Edited by Martin Thomas Humby, Saturday, 4 Oct 2014, 13:19

The attached sketch template provides completely transparent saving of numbered versions to .jpg files in the same directory as the .pde file. It does this using a file VerNo.dat to save the current version number as an integer.

Pressing 's' or 'S' gets the version number from VerNo.dat, appends it to an appropriate string you hard code into the save routine and updates VerNo.dat with the next integer in the sequence. If VerNo.dat does not exist it is created with version number 0.

The clipboard copy and paste from my previous posting is also included in the template. If you don't want it do not copy it and leave out the Ctrl+C, Ctrl+V entries from the 

    public void keyReleased() {

method.

Revision: problem with verNo.dat file path fixed.

Permalink Add your comment
Share post
Attachments:
text/plainClipboard.pde
ExLibris

Cliboard for Processing sketch

Visible to anyone in the world
Edited by Martin Thomas Humby, Saturday, 7 June 2014, 18:27

Giving a sketch copy and paste capability allows sequential copy and save to a graphics application (Photoshop, Paint.NET are suitable) and reverting back to an earlier version by pasting it into the sketch.

Clipboard images

As show an image can also be produced using two separate sketches.

The attached file provides a template. Simply place the Java library imports at the top of your sketch and past in the rest of the clipboard code at the end.

Permalink Add your comment
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 97645