Image Painter Plugin Available

Hmm, I thought I had set the source level to 1.5.



Damnit, it was set in most of the projects but looks like I missed it in one…the option on the actual ImagePainter library project was in a different place and labelled differently to all the others.



I’ve fixed it, now I just need to work out how to propagate the results of that back to SVN.

1 Like

Ok, this is stupid. How do I get the Image Painter plugin project to update with the clean-and-build rebuilt ImagePainter project? It’s not updating the jar files. Surely I don’t have to copy them over manually? (Especially since last time it created the doc/src jars automatically for me).

1 Like
@zarch said:
Ok, this is stupid. How do I get the Image Painter _plugin_ project to update with the clean-and-build rebuilt ImagePainter project? It's not updating the jar files. Surely I don't have to copy them over manually? (Especially since last time it created the doc/src jars automatically for me).

https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:setup <- last paragraph
1 Like

I didn’t put that in because I haven’t added the ImagePainter project, I built that separately then put it into the contributors repo ready packaged.



Presumably I need to put the library-creating project into the repository somewhere…but where?

1 Like

Best as a subfolder of the plugin project as mentioned in that paragraph as well :wink:

1 Like

Right, I’ve created ImagePainter as a sub project. I’ve set that to build the binary, javadoc and code jars. I’ve updated the parent project to copy those three.



Can you check I’ve done it right please? :slight_smile:

1 Like
@zarch said:
Right, I've created ImagePainter as a sub project. I've set that to build the binary, javadoc and code jars. I've updated the parent project to copy those three.

Can you check I've done it right please? :)

I triggered a build, you can check the output here: http://www.hub.jmonkeyengine.org:8080/job/jmp-contributions/1032/console
1 Like

Incredible!! :smiley:

I have no use for it atm but I will surely find one just because it’s so awsome :smiley:



Great job man!

1 Like

I noticed the package name is quite unusual, as per the java guidelines not even the “3” in our package name is “okay”. Not that its probable that anything will break but the underscore is very untypical. But I have to agree its a great job :wink:

It works now, thanks! :slight_smile:

Excellent :smiley:





@normen



In fact it’s worse than that because the company domain for Zero Sep is www.zero-separation.com which is a totally illegal package name. The correct response in that situation seems to be the use of an underscore to replace any characters not legal in a package name.



http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

I just put it together, like de.normenhansen.plugins



Edit: Why is there a separating element in zero separation anyway? :wink:

And then you should also snag zeroseparation.com (which you should do anyway).



Of course, I’m the guy that bought shorter domain names just because I didn’t want org.filamentgraph package names for one of my projects. :slight_smile: org.fgraph is so much easier to type. :slight_smile:

At the time it wasn’t available. I’ve not checked in the last few years so that might have changed.



I am aware of the irony of having a separator in light of the name :slight_smile:

Just checked. zeroseparation.com currently owned by a domain seller…who want $1999 for it. I think I’ll pass :slight_smile:

@zarch

I update to the lastest ImagePainter plugin and got an error with this small piece of code that @kwando posted. Don’t know what’s going on? The ImageRaster class has been changed?





[java]/*

package jme3test.renderer;



import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.ColorRGBA;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;

import com.jme3.texture.Image;

import com.jme3.texture.Texture2D;

import com.zero_separation.plugins.imagepainter.ImagePainter;



/**

*

  • @author cuong.nguyenmanh2

    */

    public class TestImagePainter extends SimpleApplication {



    @Override

    public void simpleInitApp() {

    Box b = new Box(Vector3f.ZERO, 1, 1, 1);

    Geometry geom = new Geometry("Box", b);



    ImagePainter ip = new ImagePainter(Image.Format.RGBA8, 256, 256);

    ip.paintRect(10, 10, 50, 50, ColorRGBA.Blue, ImagePainter.BlendMode.SET);



    Texture2D texture = new Texture2D(ip.getImage());

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");

    mat.setColor("Color", ColorRGBA.Blue);

    mat.setTexture("ColorMap", texture);

    geom.setMaterial(mat);





    rootNode.attachChild(geom);

    }



    public static void main(String[] args) {

    TestImagePainter app = new TestImagePainter();

    app.start();

    }

    }

    [/java]

    [java]

    java.lang.NoSuchMethodError: com.jme3.texture.image.ImageRaster.getWidth()I

    at com.zero_separation.plugins.imagepainter.ImagePainter.paintRect(ImagePainter.java:292)

    at jme3test.renderer.TestImagePainter.simpleInitApp(TestImagePainter.java:29)

    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)

    at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)

    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)

    at java.lang.Thread.run(Thread.java:722)[/java]

It looks like you are running against an old jme3 version. You may need Nightly as I don’t know if that method has made it into stable yet.

My core lib is also the lastest Nighty build of the jME that I can get through the SDK. Don’t know is it the lastest one should work with your plugin?

All I can say is that the latest jME3 core contains those methods so you must be picking up an out of date one from somewhere.



Open up jme3-core. Look at com.jme3.texture.image, ImageRaster.class.



You can see the methods there.

Yes, I check the source code in the SVN, all methods are there.

One question : the lastest jMonkeyEngine3 Library plugin’s update was 02 Oct 2012. Is it true?

The nightly update path:

URL: http://jmonkeyengine.com/updates/nightly/3.0beta/plugins/updates.xml

is still valid?

Cause I got the lastest jMonkeyEngine3 Library plugin and the method are missing. So I think I didn’t got update for a while or my path are wrong.