First test of my editer

This is the first release of my seen editor for JME. Keep in mined wile testing it that it is not complete and still has bugs( Please mention them to me any way).



You need to use a JAR to start it with the standard JARs and dlls for jme. It was only tested for windows but should work with linux.



The main class is located at:

jmetest.editer.EditerMain



Edit-Removed the link. Get it on the Aplication page.

I don’t seem to see this in cvs…?

"renanse" wrote:
I don't seem to see this in cvs...?
It is not in the cvs. I want to make sure it works before releasing the source code

my light hearted comments (ie, you dont have to take them seriously)


  1. Could you please call frame.pack() on the swing frame because the frame is bigger than what it is suppose to be and im having to resize everytime I open.


  2. I didn’t seem to be able to remove RenderStates, but I could remove nodes


  3. VertexProgramState when added crashes the app with a null pointer exception.



    And one thing that would make this app heaven, is the ability to move around in the 3d world ( is this possible yet? )



    And would it be possible when calling load to attach the loaded node onto the selected node instead of wiping the tree out and loading the new loaded file again?



    Keep it up, this is great.



    Thx, DP

Pretty nice Badmi.



My initial suggestion (I only got a chance to play with it for a few minutes) is support right clicking. It’s more intuitive to right click on a node to (remove, add, change, etc).



I’d like the add items divided by type, nodes, meshes, states.



So far it looks like a very nice way of visualizing concretely the scene graph structure.

"DarkProphet" wrote:
1) Could you please call frame.pack() on the swing frame because the frame is bigger than what it is suppose to be and im having to resize everytime I open.

I use pack but for some reason it dose not shrink the form. If you know anything that can case this please tell me.
"DarkProphet" wrote:
2) I didn't seem to be able to remove RenderStates, but I could remove nodes

I did not fined any method in JME that allows resting the RenderStates to null aka removing it. If you can tell me how I can remove them I will fix it.
"DarkProphet" wrote:
3) VertexProgramState when added crashes the app with a null pointer exception.

Can you tell me where the problem is.
"DarkProphet" wrote:
And one thing that would make this app heaven, is the ability to move around in the 3d world ( is this possible yet? )

Right click on the 3D window.
"DarkProphet" wrote:
And would it be possible when calling load to attach the loaded node onto the selected node instead of wiping the tree out and loading the new loaded file again?

Click on Add, Mesh, type in the file name, answer no, and then it will do what you want.

regarding #2 above: If you clearRenderState(int) then updateRenderStates() that should do the trick.

"renanse" wrote:
regarding #2 above: If you clearRenderState(int) then updateRenderStates() that should do the trick.

I do not know how I missed that. I will upload a update soon.

Ok, I just updated the jar, download the new one from the link on the first post.



New features-

Thread safety.
More Error Checking.
Loading of Vertex Shadier( You cant set the properties yet).
Ability to add LightStates and Lights.
Ability to remove RenderStates.


I will looked into using the right button like mojomonk said.

By the way hear is the code I use to int the GUI (Generated by NetBeans). I would be happy if someone could tell me why it will not pact.


        java.awt.GridBagConstraints gridBagConstraints;
        javax.swing.JPanel jPanel1;

        TreeScrollPlane = new javax.swing.JScrollPane();
        seanTree = new javax.swing.JTree();
        PropeteyScroolPlane = new javax.swing.JScrollPane();
        propertiesTable = new javax.swing.JTable();
        ButtenPane = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        AddNew = new javax.swing.JButton();
        Remove = new javax.swing.JButton();
        Save = new javax.swing.JButton();
        Load = new javax.swing.JButton();
        New = new javax.swing.JButton();

        getContentPane().setLayout(new java.awt.GridBagLayout());

        setFocusCycleRoot(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                exitForm(evt);
            }
        });

        seanTree.setDoubleBuffered(true);
        seanTree.setFocusCycleRoot(true);
        seanTree.setAutoscrolls(true);
        seanTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
            public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
                seanTreeValueChanged(evt);
            }
        });

        TreeScrollPlane.setViewportView(seanTree);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 10;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.ipadx = 200;
        gridBagConstraints.ipady = 200;
        getContentPane().add(TreeScrollPlane, gridBagConstraints);

        propertiesTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        propertiesTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
        PropeteyScroolPlane.setViewportView(propertiesTable);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 10;
        gridBagConstraints.gridheight = 5;
        gridBagConstraints.ipadx = 200;
        gridBagConstraints.ipady = 300;
        getContentPane().add(PropeteyScroolPlane, gridBagConstraints);

        ButtenPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_NEVER);
        AddNew.setText("add");
        AddNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AddNewActionPerformed(evt);
            }
        });

        jPanel1.add(AddNew);

        Remove.setText("Remove");
        Remove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RemoveActionPerformed(evt);
            }
        });

        jPanel1.add(Remove);

        Save.setText("Save");
        Save.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SaveActionPerformed(evt);
            }
        });

        jPanel1.add(Save);

        Load.setText("Load");
        Load.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LoadActionPerformed(evt);
            }
        });

        jPanel1.add(Load);

        New.setText("New");
        New.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NewActionPerformed(evt);
            }
        });

        jPanel1.add(New);

        ButtenPane.setViewportView(jPanel1);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 10;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 200;
        gridBagConstraints.ipady = 30;
        getContentPane().add(ButtenPane, gridBagConstraints);

        pack();

I haven’t run your code, so I’m not sure what the behavior is… but I’m very familiar with Swing. I didn’t see anything in the code you posted that would cause the window to be sized strangely.



‘pack()’ is supposed to resize all the child components to their preferred sizes. Often times, if you don’t call ‘pack()’ on a frame (and you don’t set an absolute size of the frame), it will pop up as a teeny-tiny box… basically, the components will take up little or no space.



If that’s not happening (and it doesn’t sound like it is), maybe you’re specifying an absolute size somewhere else? Like in whatever creates this frame?



Basically… Are you setting the size of the frame somewhere else? (Usually done by creating a ‘Dimension’ object and then ‘setSize’ on the frame)



As a side note… It’s generally not going to behave as you want if you use absolute numbers to set the size of anything. It will look different on everybody’s machines based on their screen resolutions. I usually try to grab an object (like a JLabel of some length) and base calculations off of that if I need individual components to be smaller or bigger than they are (by using ‘setPreferredSize’)… but I avoid doing a ‘setSize’ on the frame itself because it will just never work right.



Generated GUI code is a real headache to work on, though… you might have trouble tracking down where and how it’s doing things.





Hope that helps.





–K

"Anonymous" wrote:
Hi there.
I don't think your jar file is complete, because it can't find the
class: ThredSaftyManeger cannot be resolved
Please help?

Ok, I fixed the problem and I will upload it when I can figure out how to upload the file to my ISP. (Something changed since I did it last)

The new file is up! By the way you can now add parts if you right-click when something is selected.

Do you know how to add manifest files to jars to make them self executable? It would make testing your editer much easier :slight_smile:

"Cep21" wrote:
Do you know how to add manifest files to jars to make them self executable? It would make testing your editer much easier :)

I would have to put all of JME into the jar file witch would make the size much larger. (If there is a way that I could make it self executable with out adding the rest of JME tell me.)

I get the following errors trying to run the linked jar. I think it’s missing some classes.


Exception in thread "main" java.lang.NoClassDefFoundError: jmetest/editer/Editer
ListForm
        at jmetest.editer.EditerMain.main(EditerMain.java:112)
Aug 9, 2004 5:02:05 PM com.jme.app.VariableTimestepGame start
INFO: Application started.
Aug 9, 2004 5:02:05 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
Aug 9, 2004 5:02:05 PM com.jme.system.PropertiesIO load
INFO: Read properties
Aug 9, 2004 5:02:07 PM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Aug 9, 2004 5:02:07 PM com.jme.system.PropertiesIO save
INFO: Saved properties
Aug 9, 2004 5:02:07 PM com.jme.util.lwjgl.LWJGLTimer <init>
INFO: Timer resolution: 3579545 ticks per second
Aug 9, 2004 5:02:08 PM com.jme.input.InputSystem getKeyInput
WARNING: KeyInput is null, insure that a call to createInputSystem was made befo
re getting the devices.
root (com.jme.scene.Node)
java.lang.NoClassDefFoundError: jmetest/editer/EditerListForm
        at jmetest.editer.EditerMain.initGame(EditerMain.java:266)
        at com.jme.app.VariableTimestepGame.start(Unknown Source)
        at jmetest.editer.EditerMain$1.run(EditerMain.java:106)

It should be there. If it is not then I will update it as soon as I can.

A new JAR is up. ://

badmi, have you had a look at what gregg was working on before he left jME?



http://www.mojomonkeycoding.com/jme/documents/IntroTojME.pdf



look on page 69 and 70. There are some screenshots of his Editor. Perhaps if you ditched Swing and used our new UI, we could build something similar to what gregg had.



Thx, DP

"Badmi" wrote:
A new JAR is up. ://

I is also bad. I will look into the problem. An dpost when in is fixed.

DarkProphet, the new UI is not at the level that I can use it, It neads at lest a tree class, a table class would help.