Loading...
Logo
Processing Forum
poifox's Profile
5 Posts
29 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    Hi!, I've been all day trying to update my tools initSketch and saveTemplate to better code practices and using the awesome tool templates on github.

    The data folder contains a README that says that if you place files in there they will be put along the tool folders so you can use the new file finding functions they recommend, but the data folder is not being put with the compiled tool, which is built just fine, but this causes me some inconveniences.

    For those who know the tools, they depend on template files, specially for initSketch which creates the #sketchbook/templates folder and install a default.txt file in there, I'd like to have that default template in #tool_root/data but Eclipse is not doing it right.

    Am I missing something?

    I'm developing in Eclipse Juno on Ubuntu 12.10 with Oracle Java 7 JRE.

    EDIT:
    Additionally, the .properties file is not copied either which leaves my tool with no description in the tool management dialog :S

    http://poifox.com
    Hello, fellas! I'm trying to write a new app to export video from a bunch of PNG images using P5 as the video export engine.

    This is how it should work:

    Using NetBeans, I'll creat a simple UI with a browse folders function to look for a path in my HDD and a "Render Video" button. when clicked, the Button will create and execute a PApplet that exports the video to a RAW video Stream.

    However to where my first basic attempts have gone, I've been able to implement the UI and the companion class (extends PApplet), but my button triggers errors everytime I try to make the companion class run. This is the error message I get every time:

    Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.lang.ClassNotFoundException: PAppletRenderer So here is the code for both the Main Class and the Renderer: The

    Main CLass

    1. package tooraw;
    2. import java.awt.event.ActionEvent;
    3. import java.awt.event.ActionListener;
    4. import javax.swing.*;
    5. public class TooRawMain extends JPanel implements ActionListener {
    6.   protected JButton renderButton;
    7.   public TooRawMain() {
    8.     renderButton = new JButton("Render");
    9.     renderButton.setText("Render");
    10.     renderButton.setToolTipText("Render the Selected Path as Raw Stream.");
    11.     renderButton.setActionCommand("render");
    12.     renderButton.addActionListener( this );
    13.     add( renderButton );
    14.   }
    15.   public static void createAndShowGUI() {
    16.     JFrame frame = new JFrame( "Main Frame" );
    17.     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    18.     TooRawMain pane = new TooRawMain();
    19.     pane.setOpaque(true);
    20.     frame.setContentPane( pane );
    21.     frame.pack();
    22.     frame.setVisible(true);
    23.   }
    24.   public void actionPerformed(ActionEvent ae) {
    25.     if ( "render".equals( ae.getActionCommand() ) ) {
    26.       System.out.println("render command received");
    27.       renderButton.setText("doing");
    28.       PAppletRenderer.main( new String[] { "PAppletRenderer" } );
    29.     } else {
    30.       // do nothing
    31.     }
    32.   }
    33.   public static void main(String[] args) {
    34.     javax.swing.SwingUtilities.invokeLater(new Runnable() {
    35.       public void run() {
    36.         createAndShowGUI();
    37.       }
    38.     });
    39.   }
    40. }


    the Renderer Class

    1. package tooraw;
    2. import processing.core.PApplet;
    3. public class PAppletRenderer extends PApplet {
    4.   public String thePath;
    5.   public PAppletRenderer( String path ) {
    6.     thePath = path;
    7.   }
    8.   @Override public void setup() {
    9.     System.out.println("running setup!");
    10.     size( 200,200 );
    11.     smooth();
    12.   }
    13.   @Override public void draw() {
    14.     System.out.println("running draw!");
    15.     background( 255, 10 );
    16.     rect( 20,20,160,160 );
    17.     text( thePath,10,10 );
    18.   }
    19.   public static void main(String args[]) {
    20.     PApplet.main(new String[] { "PAppletRenderer" });
    21.   }
    22. }


    I just want to know if what I'm trying to do is actually doable or not, and if it is doable, what am I doing wrong? Thanks for your answers :)
    Hello there!

    I have been developing software for quite a while and have created a little suite of utilities for my movie studio that help me a lot while making, converting and scaling video.

    But now I'd like to make of them a single program in or, at least, use them from a single UI.

    This is the target:

    I have made three sketches in processing for different purposes and exported them as apps and use them when I need something specific; one is called ScalePNG which basically takes a whole directory full of PNG images and scales them to the desider factor chosen when the app starts (via JOptionDialog during setup() ), another app takes a directory full of PNG images and adds them one by one to a RAW video stream and then saves the resulting video in the same directory, it is call ExportRAW, and finally I created a utility to add dither to images and videos to enhance image quality when compressing the final videos wich is just called Ditherer. Every app starts by asking the user for entry files/directories, then loads all data and process it to render some output.

    What I want to do now is to make a single UI from which I choose the input and then send it to one of my utility apps without having to open each app by separate. The UI would be made in, say, NetBeans,  and the messaging would take place after parameters have been determined.

    So, the question is this:

    After An app is compiled, is it possible to message it with, say, a string with a directory from another app in order to make it do the requested job without it asking for input, but instead, just receiving it and doing it's job? just like a library or (more the way I want it to work) a tool does it when used from processing :P

    The main objective is to make my utility apps become plugins triggered from another central UI app. I have tried to investigate the whole JavaSE javadocs and the JAva Tutorial provided by sun but I don't seem to find the way to do this. I also revised how processing loads the tools an registers their methods but I just don't get it :P

     Thanks for your time and for sharing your expertise on this issue.