Customizing the SDK to fit the need of the project

Hello,

I’m a new user of JME3 SDK, and i wanted to know how to add a new item to the scene explorer, to better explain what i need/want :

After i clic on the HexMap button i need it to generate an HexGrid inside the sceneComposer, who got custom properties show in the Properties Windows so the Map can be edited easily.

So far my question is more about how to customize the SDK than how to generate a grid. I’m pretty new in java and NetBeans, i can say without doubt “i’m a noob in these two”. I’ve looked at :
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:setup ;
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development ;
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:sceneexplorer ;
but i don’t realy understand how to make that work, even with the exemple code, i don’t know where to put these exemple… how to activate them… Well i’m lost help XD

Ps: I’m not a native english, sorry for my poor english.

You would create a class that implements the Control interface. You can then “Add Control -> Custom Control” from the right-click menu as you were attempting to do before.

First do what the first link you posted says (installing the plugins for plugin development)
Then do what the last link you posted said (making a new entry for the menu), specifically this:
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:sceneexplorer#adding_items_to_the_add_and_tools_menus

@jayfella said: You would create a class that implements the Control interface. You can then "Add Control -> Custom Control" from the right-click menu as you were attempting to do before.

jayfella. Thank you but as far as i’ve seen with custom control, i can’t run them directly in the scene composer, I have to run the game to get them running. Maybe i missed something ?

@normen said: First do what the first link you posted says (installing the plugins for plugin development) Then do what the last link you posted said (making a new entry for the menu), specifically this: https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:sceneexplorer#adding_items_to_the_add_and_tools_menus

@normen / Normen Hansen. Well… i did what the first link said, installing all the plugins needed, then i’ve followed the last link with the specifically link you posted but, i see nothing inside the SceneExplorer, i’m always getting the default stuff listed on a right-clic on a Node.

Make sure you register a jar with the used classes in the plugin preferences under "wrapped libraries", otherwise the IDE cannot access those classes. https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:sceneexplorer#the_sceneexplorer
I'm wondering if my trouble it's not comming from something like this or this, since now i can create my class without having tons of errors... How to register the plugins in fact... maybe ?

Thank you for all.

You make a plugin with a class as in the example, compile it (right-click the project and select “create nbm”) and then install the plugin in your SDK (Tools->Plugins->Downloaded). You will need a compiled version of your special classes and register it under “wrapped libraries”.

As jayfella hinted, you can also just use the “Add Custom Control” command to add a Control without coding any plugin. This requires your “HexGrid” to be realized in form of (or initialized by) a Control though. As our manual says, extending Spatial / Geometry / Node is not a good practice anyway.

@normen said: You make a plugin with a class as in the example, compile it (right-click the project and select "create nbm") and then install the plugin in your SDK (Tools->Plugins->Downloaded). You will need a compiled version of your special classes and register it under "wrapped libraries".

Where did i’m suppose to register my class ? where is the “wrapped libraries”, actually to wrappe the library i do “right-clic -> My Lybrary -> properties -> Libraries -> Wrapped jars -> add Jar -> mypackage”.

I realy have hard time to get it sorry :confused:

Edit : I forgot to say, can install the plugins, but it still did nothing in the scene manager… (i’m using the exemple class code at the moment)

Its in the project settings of your new plugin. Don’t forget the @Annotation at the top of the class.

Thank you, it work, i was doing the right-clic on a Node and not on a gemetry that why i was not seing it (Pretty dumb i agree, nvm). Thank you Again:D

Ps: Just to know when we create a new empty scene why they is like 900~ vertex and 19~ objet in it ? why the empty scene in aren’t empty ? where did these objet/vertex come from ?

Edit : made a new Subject.