[SOLVED]Error on Import

@normen said:
Right, theres the warning sign, next to the "176 | 12 | INS"

@Normen: Any chance you can include the exception in the error message? It is not really user friendly as it is right now.
@Momoko_Fan said:
@Normen: Any chance you can include the exception in the error message? It is not really user friendly as it is right now.

Somebody told me jme would import models w/o crashing regardless of missing assets.
@normen said:
Somebody told me jme would import models w/o crashing regardless of missing assets.

If an exception happens in the thread that loads the model, the model will not be available, thus, the model has not been imported.
E.g.
[java]try {
Spatial model = assetManager.loadAsset( ... )
} catch (Exception ex) {
// Cannot access model here
}[/java]

Also, if you implement AssetLoadListener, you can receive notifications when a dependent asset has failed to load.
@Momoko_Fan said:
If an exception happens in the thread that loads the model, the model will not be available, thus, the model has not been imported.
E.g.
[java]try {
Spatial model = assetManager.loadAsset( ... )
} catch (Exception ex) {
// Cannot access model here
}[/java]

Also, if you implement AssetLoadListener, you can receive notifications when a dependent asset has failed to load.

Yes, catching the exception makes them appear in the warning sign. The model is probed for its assets before the import as well so any proper asset issues would be caught as well and missing assets could be listed. This is a failure in the engine and no user-solvable problem though.

@Normen: Sure, it is a failure of the engine. Still, it would be helpful for the user to see the error message as some of those errors can be fixed by the user.

@Momoko_Fan said:
@Normen: Sure, it is a failure of the engine. Still, it would be helpful for the user to see the error message as some of those errors can be fixed by the user.

You mean all global errors should pop up instead of just creating the warning sign like when running the SDK in development mode?
@Momoko_Fan said:
@Normen: Any chance you can include the exception in the error message? It is not really user friendly as it is right now.


strange as i selected the very file, it says it is not there :


com.jme3.asset.AssetNotFoundException: C:/WORK/jMonkeyProjects/RobotMonk/blends/test261.blend
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:277)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:410)
[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:90)
at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:53)
at com.jme3.gde.core.assets.AssetData.loadAsset(AssetData.java:84)
at com.jme3.gde.modelimporter.ModelImporterVisualPanel1.loadModel(ModelImporterVisualPanel1.java:95)
at com.jme3.gde.modelimporter.ModelImporterVisualPanel1.loadModel(ModelImporterVisualPanel1.java:74)
at com.jme3.gde.modelimporter.ModelImporterVisualPanel1$8.run(ModelImporterVisualPanel1.java:305)
at java.lang.Thread.run(Thread.java:722)
@normen said:
You mean all global errors should pop up instead of just creating the warning sign like when running the SDK in development mode?


why not both

what would be nice is that i send my blend file, but there is no point, as it is the default blender scene



so far i have to create my scenes by exporting each mesh and then exporting the scenegraph(pos and rot only) of nodes

to reimplement it at runtime

dotScene script is cool but for my nedds, i don’t really need to go that direction



the import from jme is more achieved and seems to do what i need

@rompelstilchen said:
strange as i selected the very file, it says it is not there :

You use an old version of the SDK it seems, newer versions inform you that you cannot load assets outside the assets folder (except for when using the model import tool)
@normen said:
You use an old version of the SDK it seems, newer versions inform you that you cannot load assets outside the assets folder (except for when using the model import tool)


seems reductive, but anyway

but the trick is that i just updated the whole platform
@rompelstilchen said:
seems reductive, but anyway

but the trick is that i just updated the whole platform


btw i use the model import tool (green arrow under the menu)

again, put your model in the assets folder

@normen said:
again, put your model in the assets folder


yep, i have done that, it works
althought :
- no message about that (even with latest updates)
- really reductive as my blends folder is in my main project folder and the assets are in another folder(gamelibrary)

anyway hx for your help IT WORKS !!! yeepeeeeeee

You don’t get a message as its in the project folder but not in the assets folder… If you manually start hampering with your project structure it gets hard to help. Also please read this about how to best manage your assets: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:multi-media_asset_pipeline

@normen said:
You don't get a message as its in the project folder but not in the assets folder.. If you manually start hampering with your project structure it gets hard to help. Also please read this about how to best manage your assets: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:multi-media_asset_pipeline


thx for the tip

although, i think it is discutable to put blends in a particular place
after all, the button says "import" so i should be able to import from anywhere

some blends files come from other projects, and as i sort my files and folder the way i need, i don't feel confortable having double version of a blend file and i don't want to mess my folder organisation for a particular engine, i never had to do that before

those blends will not be put in the archive at compile time, so i must admit i don't understand this limitation

it is not user friendly and makes not much sense

I did not modify the project structure, as i have a server and a game code, obviously, i have to manage a separate game library folder with my assets, so i have 3 unmodified jme3 projects

anyway, thx again
have a nice day

If you knew about the assetManager it would make sense to you

@normen said:
Thats what the model import tool is for and thats what it does. But if you store your model in a way that the image location and the model file have no relation whatsoever then the importer cannot just assume that relation for you. That is why the images have to be in the same folder or a subfolder, else the whole path (e.g. /Username/Mydocuments/images/textures/image.jpg) would have to be transferred to your assets folder. So as outlined in the wiki, just save your models and textures in the assets folder from the start so the relative location is defined from the start. Really, we don't do it this way because we are dumb or want to annoy you.


well as i select the file, you can have te root location of it
and no matter the images are stored with relative paths or not, it can be found, right ??
or wy not, for instance, have apacked blend wich stores all infos ?

i mean i agree with you and as it is working, well fine, but i think everything is possible
with a more robust scenario, you would'nt probably receive questions about import not working, i mean it is just an opinion :P

by the way, i managed to make a game, with caracters, landscape and everything, but on my own the project seems unbearable, do you have any advice on this ?(even if it is not the actual subject of this thread)
thx mate
@rompelstilchen said:
i mean i agree with you and as it is working, well fine, but i think everything is possible

So go ahead and write the code to import every model on this planet with images stored where ever. :roll: You' d have to remap names, register strange folder roots, change the paths of the imported images again and much more. Again, you don't understand how the assetmanager works which is okay but please don't try to tell me whats possible and how easy it is.
@rompelstilchen said:
by the way, i managed to make a game, with caracters, landscape and everything, but on my own the project seems unbearable, do you have any advice on this ?(even if it is not the actual subject of this thread)

Don't make a mess and don't think you can outsmart everything all the time. This is the perfect example, just store your textures in a properly accessible place in the first place, keep your project in order.

i just tried to contribute with some ideas, that’s all, maybe my writing is not apropriate or i was just wrong

i guess you’re never wrong right ?

Code:
it was just a question, no offense and i mean it !!! it is all about curiosity and trying to use your engine the best i can

@normen said:
So go ahead and write the code to import every model on this planet with images stored where ever. :roll: You' d have to remap names, register strange folder roots, change the paths of the imported images again and much more. Again, you don't understand how the assetmanager works which is okay but please don't try to tell me whats possible and how easy it is.


it is not about outsmarting, and now i got my answer, wich means it was a good idea to ask it. thx

as i said, i already have alot of work with the game i try to make, i guess everyone should stick to his attributions, me and my game, you and jme

and thx for not answering my question about how and where to find help for my project, but that's ok, i still like you (lol)

come on man this is all childish,

so open your eyes, i repeat : YOU DON'T KNOW ME !!!

i did not meant to be rude, it is just hard to express oneself through a forum without leading to misunderstanding

i can understand you(obviously) don't like me, but i got no other choice to receive your sinical answers although i try to make you understand that i adress respect to you and your team, so enjoy your little supremacy on me

btw, thanks for the over reaction and for spitting on my face, oh don't forget to add me bad points, just like at school

have a nice day