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.
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 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 ?
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
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)
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 ?