Help Needed with j3o SDK Functions

Hello everyone,

I’m working with the j3o SDK and need some clarification on two functionalities:

Question 1: AppState Selection in AppStateExplorer

When editing a j3o file, clicking “Attach…” in the AppStateExplorer tab opens the “Add New AppState” window. However, the “Select App State” dropdown is empty, even though my project contains classes extending BaseAppState.

  • Can someone explain why the list of classes is empty?
  • How does the population of this list work?
  • Is this a potential bug?

Question 2: Updating Scene Graph Tree with Animations

I implemented a method to add animations from files to a 3D model already open in the scene. However, the “list of animations” under the AnimComposer node doesn’t update when I add them via code. Clicking the “update” button in the SceneExplorer tab also doesn’t refresh the tree.

  • Are there any suggestions on how to force the scene graph tree to update with newly added animations?

Thanks in advance for your assistance!

Edit:
Important note: I am not modifying the core of the SDK but am injecting functions via BaseAppState.

2 Likes

Regarding 1. Yes, possible bug. It works if you enter the class name. But the list is empty for me too.
It should also be possible to run an appstate by right clicking it and selecting “Run AppState” but that doesn’t work either.

2 Likes

I have a “fix” for this. The problem was it did a String match for AbstractAppState. Most people extend BaseAppState nowadays.

1 Like

Hi guys,
In the SDK editor, when viewing a 3D model and opening the Add Custom Control popup, my AbstractControls are not listed in the selection window.

  • This issue occurs specifically with Gradle projects.
  • Projects created with Ant do not exhibit this problem.

Could you please investigate this issue?

Thank you for your time and attention to this matter.@rickard @tonihele

Note: I’m still using the SDK with jme-3.6.1 version because I’ve encountered a regression in the latest release that prevents me from successfully starting BaseAppStates. Specifically, neither the ‘Run AppState’ command nor the selection dialog that appears when clicking the ‘attach…’ button is functioning as expected. This issue has been previously reported and discussed.

Does Release SDK Release 3.7.0-sdk2 · jMonkeyEngine/sdk · GitHub provide any help on this?

1 Like

Hi @tonihele ,
I noticed that you and @rickard have made numerous fixes. Thank you both for your hard work!
I will test the new version of the SDK as soon as possible.

1 Like

Hi @tonihele ,
I have downloaded and configured the latest portable version of the SDK. I tried my model conversion pipelines and tested some features I had developed to be injected into the SceneEditor and everything seems to be working correctly and better. Good job!!!

However, I think there is a problem with the gltf loader and the addition of the jme3-plugins-json module released with jme-3.7.0-stable. To reproduce it, just create the Ant project of JmeTests and run the TestGltfLoading class.

When I try to load a glTF model I get the following error message:

com.jme3.asset.AssetLoadException: An error occurred loading Models/gltf/duck/Duck.gltf
	at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:181)
	at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:107)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:274)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:390)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:441)
	at jme3test.model.TestGltfLoading.loadModel(TestGltfLoading.java:234)
	at jme3test.model.TestGltfLoading.loadModel(TestGltfLoading.java:229)
	at jme3test.model.TestGltfLoading.simpleInitApp(TestGltfLoading.java:137)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:240)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:142)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:224)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: No JsonParser implementation found
	at com.jme3.plugins.json.Json.create(Json.java:102)
	at com.jme3.scene.plugins.gltf.GltfUtils.parse(GltfUtils.java:70)
	at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:124)
	... 11 more

Here are the libraries used by the JmeTests project:

Could you kindly verify that?

Thanks

1 Like

Yeah looks not to work. I wonder why since the JSON library is added on the project…

Edit: ah, but jme3-plugins-json-gson is not…

2 Likes

Hi guys,
I am converting some pipelines from Ant projects to Gradle projects. Unfortunately, in Jme Gradle projects it is not possible to add Custom Controls or Custom AppStates in the SceneEditor when viewing 3D models. These two features would be really useful.

Could you kindly take a look at the problem?

Thanks

1 Like