Error importing new animations on old model

I can import a model (Blender->Ogre->JME) and it works fine, but if I update the animation, re-export, and re-import, the animation data for JME does not change, even after clean & build or deleting the model before re-importing. The only workaround I’ve found is to delete the model, close JMP, reopen JMP, and import the model again.

Anyone else have this problem? Is there a better way to force JMP to update it?

Did you update the SDK to the latest stable version? I cannot reproduce this.

Yes, I had just updated before posting this. I’m still getting the same error. For example, if I change the name of an animation, the skeleton.xml file updates (I can see it in a text editor) but when I import it again and change the code, it would say that it couldn’t find animation “x”. If I delete the file out of JMP and restart JMP, then re-import, it works.

Where does it say it “cannot find animation x”? In the SceneComposer you cannot select animations that are not there.

Oh, sorry. When I run the project and use channel.setAnim(“fall”) (or whatever the animation is), it crashes and says "Cannot find animation named: ‘fall’ ". If I use animations with the same name as before, they aren’t updated, etc.

Running the application has nothing to do with the state of the SDK at all… Are you loading the blend file directly? Make sure blender is closed then, else it might still hold a lock on that file and windows is picky about that lately. And btw you shouldn’t load model files directly, convert them to j3o instead.

I’m loading it through the OGRE exporter and converting that to .j3o. Running the application is just an example of the problem- just a test to see if the model was updated when I re-imported it. The problem is that re-importing the file won’t update the copy in JMP, even if I delete the file out of the project and import it again. The color of the material won’t change, etc. If I delete the file out of the project, close JMP, reopen JMP, and import the model, it works.

What do you mean by re-import? What do you mean by “copy in jmp”? How can a newly created file not be current? None of the used AssetManagers in the SDK cache anything when opening a file and your application has a new AssetManager each time its started. Why do you mention the material color? If you use a j3m file for you material you have to change that as well. Also how do you start your application? If you run it from command line or by double-clicking the jar file then the created assets jar is used and not the files in the assets folder. Press the “Clean and Build” button to make sure all jar files are recreated. Finally what do you mean by “works”. As said I cannot reproduce your problem any way.

Sorry for being unclear-

I’m using JMonkeyPlatform for the game, and to add the model into the project, I click the green “Import Model” button. Then I select the ogre mesh.xml file that I exported from blender and it is converted into a .j3o file. The material is included with the export and when I run the game (using the “run main project” button), the model appears with the material and everything. Everything is ok up to this point. Then I edit the model in Blender (for example, changing the color or changing an animation). I want the game to reflect this change, so I delete the file out of the Project Assets window in JMP, check Finder under the project folders to ensure everything was deleted, then follow the same procedure as before (Import Model prompt → .j3o). Then I click “Clean and Build” to regenerate everything, then press the “Run Main Project” button. When the game runs, it acts as if I didn’t change the model at all. The animations are the same as the first time I ran it, the updated color isn’t reflected, etc.

Then, I delete the file out of the Project Assets window again and close JMonkeyPlatform. Then I re-open JMonkeyPlatform, and once it starts up again, I follow the exact same procedure to import the model through the prompt. This time, though, when I run the game (without even performing a “Clean and Build”), the changed model shows up. The ogre files are the exact same as the second run of the game where it didn’t reflect the changes- the only difference is restarting JMonkeyPlatform in between.

EDIT: I should mention that after changing the file, I followed the same export procedure from blender to ogre before re-import. So the ogre files are definitely updating in the process.

Second Edit: I deleted jmonkeyplatform, downloaded and re-installed it, ran the updates, and am still having the same problem.

It seems this is some windows issue, do you get any error messages (warning sign in lower right)? At any instance its better to model in the assets folder directly, so export the model to the assets folder and then double-click it to convert.

No error messages appear when it is imported, even through double clicking. Hmm. It must be something with my system if you cannot reproduce it (I have Mac OSX Lion).

Thanks for taking the time to look into it. I guess I’ll just deal with it for now.

Nope, I have Lion too, works fine.