[Solved] Import Blender File (int64_t)

Hi all,

I am having problems importing even the simplest content from Blender (.blend–import). I always get an IOException saying “Unknown data type: int64_t”. I am using Blender 2.81 and jMonkey 3.2.4-stable (I also checked with version 3.3.0-alpha5 - same result) on a Mac with macOS Catalina. Any ideas?

Thanks in advance

Hi, could you provide full Exception and exactly when it happends? (sdk j3o export or when?)

int64_t seems like some native code break.

Sure, here is an excerpt from the stacktrace:

INFORMATION: Loading animations that will be later applied to scene features.
Nov. 23, 2019 6:26:52 VORM. com.jme3.app.LegacyApplication handleError
SCHWERWIEGEND: Uncaught exception thrown in Thread[jME3 Main,5,main]
com.jme3.asset.AssetLoadException: An exception has occurred while loading asset: Models/cube.blend
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:261)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
	at app.HelloAnimation.simpleInitApp(HelloAnimation.java:42)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: Unknown data type: int64_t
	at com.jme3.scene.plugins.blender.BlenderLoader.load(BlenderLoader.java:221)
	at com.jme3.scene.plugins.blender.BlenderLoader.load(BlenderLoader.java:88)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
	... 8 more
Caused by: com.jme3.scene.plugins.blender.file.BlenderFileException: Unknown data type: int64_t
	at com.jme3.scene.plugins.blender.file.Structure$DataType.getDataType(Structure.java:318)
	at com.jme3.scene.plugins.blender.file.Field.fill(Field.java:92)
	at com.jme3.scene.plugins.blender.file.Structure.fill(Structure.java:118)
	at com.jme3.scene.plugins.blender.file.Field.fill(Field.java:183)
	at com.jme3.scene.plugins.blender.file.Structure.fill(Structure.java:118)
	at com.jme3.scene.plugins.blender.file.Pointer.fetchData(Pointer.java:122)
	at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:170)
	at com.jme3.scene.plugins.blender.BlenderLoader.load(BlenderLoader.java:105)

I am using Gradle (not the SDK). My gradle build file looks like this:

buildscript {
    repositories {
apply plugin: 'java'
apply plugin: 'application'
repositories {
def jme3 = [v:'3.2.4-stable', g:'org.jmonkeyengine']
dependencies {
	compile "${jme3.g}:jme3-core:${jme3.v}"
    compile "${jme3.g}:jme3-effects:${jme3.v}"
    compile "${jme3.g}:jme3-blender:${jme3.v}"
    runtime "${jme3.g}:jme3-desktop:${jme3.v}"
	runtime "${jme3.g}:jme3-lwjgl:${jme3.v}"
	compile group: 'junit', name: 'junit', version: '4.12'

The relevant lines in the code are:

    public void simpleInitApp() {
        DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());
        Spatial cube = assetManager.loadModel("Models/cube.blend");

I am using the JDK 11 which comes with IntelliJ.

Unfortunately, the SDK is not running either. I guess the reason therefore ist Apples security policy.

Additional remark: the jMonkey import Structure.java knows a type uint64_t but my blender file seems to contain a int64_t type, which is unknown to jMonkey.

Seems related

1 Like

just please note .blend exporter is unstable because Blender often change version and API(for saves).

So anyway i suggest gltf exporter(in Blender 2.8 its already in exporters list)

GLTF format is new standard for exporting game models.


I found this similar importer and it lists the scalar types.

Couldn’t find anything on Blender site except bug fixes for the use of int64_t.

Would adding this fix things I wonder? I know not what it does, just that it does something…

PRIMARY_TYPES.put("int64_t", LONG);

Edit: Ok so you guys already are on it…

Thanks guys. It works using GLTF (and adding compile ‘org.glassfish.jaxb:jaxb-runtime:2.3.2’ to my gradle build file). Great and fast help!

1 Like

The blender importer is not compatible with blender 2.8+

and adding compile ‘org.glassfish.jaxb:jaxb-runtime:2.3.2’ to my gradle build file

Im using Blender 2.8 (64 BIT if i good remember) and export to GLTF and:

i dont use anything like this in build.gradle

So i really dont know why you needed it.

Anyway im glad it work for you now.

Maybe you use an older Java version: https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

yes, im using:

openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)

SDK itself anyway use older java as i know.

btw. didnt JME had issues with new Javas?

Note, using JME 3.3-alpha2+ you wont need to add javax.xml dependency anymore.

It is replaced with java’s Base64 decoder: