Editor: jMonkeyBuilder

Hi, if you look at the page:
https://bitbucket.org/JavaSabr/jmonkeybuilder/wiki/How%20to%20use%20extended%20features%20from%20an%20editor%20in%20your%20project.
you can see that I offer to use the method to install the scene loader:

SceneLoader.install(application, filterPostProcessor);

where the second argument is your filter post processor. If you install it only with your application, the scene loader can’t load scene filters.

Super it works, thank you

Great job, it becomes really nice to use your software in parallel Sdk.

1 Like

When I use tree generation with SimArborealTree in JMonkeyBuilder and then I try to open the game, an error occurs telling me that TreeLighting.j3md material definition is not present.

Uncaught Thrown in Thread [jME3 Main, 5, main]
AssetNotFoundException: MatDefs / TreeLighting.j3md

What should I do to correct this problem? should I generate the materials manually?

You need to add 2 dependencies ;):

repositories {
    maven { url 'https://jitpack.io' }
}
compile 'com.github.JavaSaBr:SimArboreal:1.2.1'
compile 'com.github.JavaSaBr:SimArboreal:1.2.1:assets'

What makes me think, you could add a button that shows a snipet with the required dependencies for the displayed model/scene/whatever. That snipet could be gradle/maven ready so you only should copy/paste it.

It’s a good thing :slight_smile: can you make a ticket about this, please?

Hello,

Using the Static LightProbe, after recording the scene and having it closed, I then tried to open it but the following exception appears:

java.lang.Exception: java.lang.ClassCastException: [Lcom.jme3.export.Savable; cannot be cast to [Lcom.jme3.math.Vector3f;
at com.ss.editor.ui.component.editor.area.EditorAreaComponent.processOpenFileImpl(Unknown Source)
at com.ss.editor.ui.component.editor.area.EditorAreaComponent.lambda$processOpenFile$9(Unknown Source)
at com.ss.editor.executor.impl.BackgroundEditorTaskExecutor.doExecute(Unknown Source)
at com.ss.editor.executor.impl.AbstractEditorTaskExecutor.run(Unknown Source)
Caused by: java.lang.ClassCastException: [Lcom.jme3.export.Savable; cannot be cast to [Lcom.jme3.math.Vector3f;
at com.jme3.light.LightProbe.read(LightProbe.java:129)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.readSavable(BinaryInputCapsule.java:457)
at com.ss.editor.extension.scene.app.state.impl.pbr.StaticLightProbeSceneAppState.read(StaticLightProbeSceneAppState.java:271)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:483)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:471)
at com.ss.editor.extension.scene.SceneNode.read(SceneNode.java:238)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:242)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:125)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:109)
at com.ss.editor.extension.loader.SceneLoader.load(SceneLoader.java:110)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.ss.editor.ui.component.editor.impl.scene.SceneFileEditor.doOpenFile(Unknown Source)
at com.ss.editor.plugin.api.editor.BaseFileEditor.openFile(Unknown Source)
at com.ss.editor.plugin.api.editor.Base3DFileEditor.openFile(Unknown Source)
… 4 more

caused by java.lang.ClassCastException: [Lcom.jme3.export.Savable; cannot be cast to [Lcom.jme3.math.Vector3f;
at com.jme3.light.LightProbe.read(LightProbe.java:129)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.readSavable(BinaryInputCapsule.java:457)
at com.ss.editor.extension.scene.app.state.impl.pbr.StaticLightProbeSceneAppState.read(StaticLightProbeSceneAppState.java:271)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:483)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:471)
at com.ss.editor.extension.scene.SceneNode.read(SceneNode.java:238)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:242)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:125)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:109)
at com.ss.editor.extension.loader.SceneLoader.load(SceneLoader.java:110)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.ss.editor.ui.component.editor.impl.scene.SceneFileEditor.doOpenFile(Unknown Source)
at com.ss.editor.plugin.api.editor.BaseFileEditor.openFile(Unknown Source)
at com.ss.editor.plugin.api.editor.Base3DFileEditor.openFile(Unknown Source)
at com.ss.editor.ui.component.editor.area.EditorAreaComponent.processOpenFileImpl(Unknown Source)
at com.ss.editor.ui.component.editor.area.EditorAreaComponent.lambda$processOpenFile$9(Unknown Source)
at com.ss.editor.executor.impl.BackgroundEditorTaskExecutor.doExecute(Unknown Source)
at com.ss.editor.executor.impl.AbstractEditorTaskExecutor.run(Unknown Source)

I can not edit the scene anymore with JMonkeyBuilder

Can we call it jMB for lazy typing? :grin:

yep, I use it as well :wink:
for example: ‘jmb-…something…’

It’s an exception on jME side(saving/loading LightProbes), I will make a PR about this.

1 Like

thank you, I had just tested locally the same modification that corrected the problem.

Another question, when adding a link to a model in a scene, there is no way to add a UserData to the node containing the link. Since it is not possible to add a controller or copy the link. Will these options be added in the next version ?

THOCED

I think I must first add a node and attach the link to add a userdata

The linked model is a readonly object, if you want to edit a model in your scene, you need to use the action “load model”:

If possible, I think that the addition of adding user data to linked objects would be useful. In some cases, I’m adding user data to my models in the editor, and then I change the materials at run time based on the user data. Normally it is not possible to change a linked model’s material in any editor without changing the source model as well, so my workaround has been to use userData for linked models in the SDK editor.

Adding user data to my linked models is the only thing I still find myself going back to the SDK’s editor for, otherwise I’ve been able to do everything I need in JMB excellently :slight_smile:

do you change a source model or a linked model?

Linked models. When I load the map at run time, i search the scene for objects that are flagged with a userData string, and I’m able to change the materials on any linked model without affecting its source model or the other linked copies of the source model.

And you can change user data for linked models as well in SDK, right?

Yes in the SDK editor you can.

Once I’ve added data in the SDK, the user data also begins to show up in your editor.

hm, in your example, you added it to the link node, not to the linked model, so, I will fix this case in the next release.

1 Like