Frage

I'd like to be more efficient with processing programming, is there a way to run a sketch from the command line? maybe also with a watch for file saves?

Also, is there some autocompletion for processing? the default IDE is very limited..

War es hilfreich?

Lösung

As @erisoco mentions, using the Eclipse IDE is your best bet (especially for autocomplete/etc.) and the Proclipsing plugin makes it very easy to setup Processing projects in eclipse (including integration with external libraries)

Proclipsing

There's also a quick video tutorial on setup if necessary.

You mentioned "watch for file saves" - that sounds along the lines of "live coding". There are multiple options. One I've used in the past is through the FluidForms library. The library also includes some handy features for (3D) design (like parameter changer, automatic arcball for 3D scenes, STL export, etc.) You can find a few quick video tutorials on live coding Processing with Fluid Forms libs:

  1. Fluid-Forms-Libs ~ HelloWorld
  2. Fluid Forms Libs Parameter Changer
  3. FluidFormsLibs-LiveCoding

fluidforms hello world fluidforms param changer fluidforms live coding

Andere Tipps

Windows and Linux

Pretty much the same when you want to run the sketch from the command line.

Within your processing folder there should be a processing-java file. If you cd to it's folder, you can use

./processing-java --help

Which will show you the required parameters to running, compiling and whatnot.


If you are in a hurry, this would do (replace the $parameters with the folders you want or automate it with your editor):

$PROCESSING_DIR/processing-java --sketch=$CURRENT_DOCUMENT_DIR --output=$CURRENT_DOCUMENT_DIR/run --run --force

This is my Gedit script:

/home/otto/GameDev/processing-2.1/processing-java --sketch=$GEDIT_CURRENT_DOCUMENT_DIR  --output=$GEDIT_CURRENT_DOCUMENT_DIR/run --run --force

MacOSX

Haven't had a chance to test it but it shouldn't be any harder.


Source: http://wiki.processing.org/w/Command_Line

This is the command I use:

> processing-java --sketch=R:\sketch_folder --force --run

I do the coding using Visual Studio Code https://code.visualstudio.com/ with the processing extension.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top