Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Assetbrowser #506

Merged
merged 14 commits into from
Sep 9, 2023
Merged

Assetbrowser #506

merged 14 commits into from
Sep 9, 2023

Conversation

neph1
Copy link
Contributor

@neph1 neph1 commented May 15, 2023

This is a mammoth PR, but there's no other way to do it..

@neph1
Copy link
Contributor Author

neph1 commented May 18, 2023

I need a break from this now...

Some outstanding issues:

  • Gradle project returns a path to 'assets' rather than the project folder.
  • Opening a model from the asset browser is much much slower than doing it from the assets node.
    - Some space utilization issues in the asset browser panel.
    - Previews not updating after being created?
    - Browser not resizing when layout changes
  • Not recognizing projects opened after editor starts.

@neph1
Copy link
Contributor Author

neph1 commented May 27, 2023

@peedeeboy Before I dig into this myself, do you know why this happens?

When I do a
projectAssetManager.getProject().getProjectDirectory();
on an Ant project, I receive the expected project folder. but when I do the same call on a Gradle project, it returns the 'assets' folder?

Pics or it didn't happen!
Ant:

Screenshot from 2023-05-27 08-47-02

Gradle:
Screenshot from 2023-05-27 08-49-50

@peedeeboy
Copy link
Contributor

I came across this comment from @MeFisto94 when I was looking into the Project Asset Manager previously:

                /* Note: The ProjectAssetManager needs the Subproject's Project,
                 * because otherwise reading assets won't work (as assets is
                 * not in the scope of the parent project). But it still needs 
                 * to be added to the Parent Project's Lookup
                */
                
                /* Complicated code to find the relative path, because the 
                 * assets subproject could be stored in a folder called "foo"
                 * or "bar" and we still need to locate it correctly
                */

@neph1
Copy link
Contributor Author

neph1 commented May 28, 2023

Thanks, then I know it's not a bug. I'll add some 'complicated code' of my own to circumvent it :)

@peedeeboy
Copy link
Contributor

peedeeboy commented May 28, 2023

I came across this as I when I looked into get the PAM to load from assets from Gradle files on the classpath I was thinking / hoping to refactor ProjectAssetManager out to an Interface / Abstract class and have AntProjectAssetManager and GradleProjectAssetManager implementations, but that turned into a rabbit hole.....

Probably why nobody else had already done it :(

@neph1
Copy link
Contributor Author

neph1 commented May 29, 2023

I won't attempt to change anything there, just handle it on the behalf of the asset browser

@neph1
Copy link
Contributor Author

neph1 commented Aug 13, 2023

Note to self: Still need to do the ant/gradle assets switch.

@neph1 neph1 marked this pull request as ready for review August 13, 2023 16:36
@neph1 neph1 closed this Sep 9, 2023
@neph1 neph1 reopened this Sep 9, 2023
@neph1 neph1 merged commit 697a5f2 into jMonkeyEngine:master Sep 9, 2023
@neph1 neph1 added this to the 3.6.1-sdk3 milestone Oct 8, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants