Closed peedeeboy closed 1 year ago
And then there is this, not maybe 100% related but: WARNING [com.jme3.gde.core.assets.ExternalChangeScanner]: File is not part of a jME project but tries to find original model...
If I create a scene file to the Gradle template... It doesn't seem to understand it is a jME project or something....
If I create a scene file to the Gradle template... It doesn't seem to understand it is a jME project or something....
Yes - I noticed that. Similar, in that I think it is to do with the ProjectAssetManager
, but I don't think directly related.
With SDK3.4, if I create a new Gradle project, the Asset node gets created in the Project view. This appears to be when the ProjectAssetManager
then gets initialised. Opening Scenes etc. works in this new project.
But when Opening an existing project (or restarting SDK), the Asset node doesn't get created, and assets can't be viewed in the SDK.
My hunch was that if it were possible to fix the detection of the assets
folder and creation of the Assets node, then opening Scenes / Models would start working again. I only had chance to have a cursory look through the code, and it seemed like it is simply looking for a folder called assets
, so I'm not sure why it would be failing. Needs a proper look at some point...
I also did some experimentation at trying to get the classpaths out of NB's Gradle API, so that compiled jars could be classloaded to load assets from dependencies. No joy so far, every when trying to mimic NB's Gradle classpath tests 🤷
I'm acquiring some knowledge around this when figuring out how and which icons are loaded. I'll keep a look out, too, and report back.
It would be super cool to get the kinks ironed out from the Gradle template to the SDK 3.5 release (slated for next month).
Progress!
Very hacky progress though - and the Material editor, whilst listing out all the .j3md
files, doesn't then load their parameters correctly 😢 Still a ways to go to fix this properly 👎
Hmm, is this issue totally unrelated? https://github.com/jMonkeyEngine/sdk/issues/266 Because the fix works both on ant and gradle projects. Could we somehow do a similar fix for this issue?
Got the MatDef properties loading in the Materials Editor 👍 :
Close?
As mentioned by @yaRnMcDonuts in #305 :
This happens because the Materials Editor does two things:
1) Scans for files in the project directory tree with a
.j3m
extension 2) Defers to the ProjectAssetsManager to load dependencies from .jar files in the projectPart 1) still works, and will find .j3m files in the
/assets
folder/sub-project, but theProjectAssetManager
class is using NB's Java Project API to the files on the classpath, and its not returning the files for Gradle projects.ProjectAssetManager
needs to be extended to be "Gradle-aware" and probably use NB's Gradle Java Projects API to locate the dependency .jars (after a priming build) in Gradle projects and load the materials from them.This would probably fix a bunch of other things that are squiffy in Gradle projects, like the textures browser etc.