Import models from the command line


I am the maintainer of blender2ogre, I want to add one-click preview to open jmonkey and load the blender scene. I found “jmonkeyplatform --open <myfile.scene>”, but it didn’t load my meshes. After loading what is the next step? Converting to j3o binary first?


Hi, Im using your blender2ogre too, thanks!

But why dont you make simple java program that opens scene what you write in command line parameter. Dont know if it works on release build but I think that with debug build you can open .scene, .blend, etc formats.

But if you meant something else, sorry my misunderstanding :slight_smile:

You can’t really open the model via the command line, the application is not concepted that way. Since the jME3 asset manager requires a managed asset root you can either use the “Model Import Tool” (green arrow button when you have opened a project) or copy the model to a project folder to open it.

Hi I know a number of people use your plugin for blender, thanks!

@normen where art thou?

@larda said: Hi, Im using your blender2ogre too, thanks!

95% from forum uses that plugin xD.

Probably a better idea is to have some sort of TCP socket in jMP to which you can send a command like “open C:model.mesh.xml” and then it will invoke the import dialog automatically

A local files locator could be added to jme and a new command line option?

jMP has its own way of handling locators when you use the import dialog. You just need to give it a model path. @normen: would it be possible to implement this?

Uh, I guess when the blender-jmp bridge is started I’ll have to add such features anyway, then I’ll make it a generic interface to the SDK. Noted :slight_smile:

How can I export the physics settings from blender into JME? I found projects/basicgame/nbproject/project.xml Is this where object physics settings like physics are stored?

You cannot export physics from blender. All scene data is stored in the j3o file.

You can export the physics but jME3 won’t import it.

In most cases you probably have your own custom properties set on the scene objects that specify how to handle them as game entities, so specifying physics data isn’t that useful