Blender 2.62 import Exception [SOLVED]

@Kaelthas , @nehon , @Momoko_fan models saved with blender 2.62 now have such exception below.

I guess it’s because of names for Blender data. Now blender Data supports 63 characters length (it was 21).



I loaded a model through swing canvas. A blender file with a Cube object without materials.



http://www.blendernation.com/2012/01/09/developer-meeting-notes-january-8-2012/

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.62/More_Features#Longer_Names_and_File_Paths

“Blender 2.62 release targets:



Longer names for Blender data, Sergey will try this week. Ton tries to be around for help.

…”



LOG:

WARNING Material 15:12:17 Material parameter m_Color uses a deprecated naming convention use Color instead

INFO LwjglCanvas 15:12:17 OGL: Creating display …

INFO LwjglCanvas 15:12:17 OGL: Waiting for canvas to become displayable…

INFO LwjglCanvas 15:12:17 OGL: Creating display context …

INFO LwjglRenderer 15:12:17 Deleting objects and invalidating state

INFO LwjglCanvas 15:12:19 OGL: Display is active!

INFO LwjglRenderer 15:12:19 Uniform m_VertexColor is not declared in shader [ShaderSource[name=Common/MatDefs/Misc/Unshaded.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Misc/Unshaded.frag, defines, type=Fragment]].

SEVERE BlenderModelLoader 15:12:23 Unknown data type: uint64_t

com.jme3.scene.plugins.blender.exceptions.BlenderFileException: Unknown data type: uint64_t

at com.jme3.scene.plugins.blender.file.Structure$DataType.getDataType(Structure.java:312)

at com.jme3.scene.plugins.blender.file.Field.fill(Field.java:92)

at com.jme3.scene.plugins.blender.file.Structure.fill(Structure.java:123)

at com.jme3.scene.plugins.blender.file.FileBlockHeader.getStructure(FileBlockHeader.java:113)

at com.jme3.scene.plugins.blender.BlenderLoader.setup(BlenderLoader.java:224)

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:56)

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:49)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:273)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:408)

at bigboots.editor.BBSceneGrid.loadExternalModel(BBSceneGrid.java:182)

at bigboots.editor.BBModelViewer.loadModelFromFile(BBModelViewer.java:379)

at bigboots.editor.BBModelViewer.access$000(BBModelViewer.java:60)

at bigboots.editor.BBModelViewer$1.actionPerformed(BBModelViewer.java:122)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6288)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6053)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4651)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4481)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2478)

at java.awt.Component.dispatchEvent(Component.java:4481)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)

at java.awt.EventQueue.access$000(EventQueue.java:84)

at java.awt.EventQueue$1.run(EventQueue.java:602)

at java.awt.EventQueue$1.run(EventQueue.java:600)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)

at java.awt.EventQueue$2.run(EventQueue.java:616)

at java.awt.EventQueue$2.run(EventQueue.java:614)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Exception in thread “AWT-EventQueue-0” com.jme3.asset.AssetLoadException: Error occured while loading asset “untitled.blend” usingBlenderModelLoader

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:280)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:408)

at bigboots.editor.BBSceneGrid.loadExternalModel(BBSceneGrid.java:182)

at bigboots.editor.BBModelViewer.loadModelFromFile(BBModelViewer.java:379)

at bigboots.editor.BBModelViewer.access$000(BBModelViewer.java:60)

at bigboots.editor.BBModelViewer$1.actionPerformed(BBModelViewer.java:122)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6288)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6053)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4651)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4481)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2478)

at java.awt.Component.dispatchEvent(Component.java:4481)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)

at java.awt.EventQueue.access$000(EventQueue.java:84)

at java.awt.EventQueue$1.run(EventQueue.java:602)

at java.awt.EventQueue$1.run(EventQueue.java:600)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)

at java.awt.EventQueue$2.run(EventQueue.java:616)

at java.awt.EventQueue$2.run(EventQueue.java:614)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Code:



[java]

// Load Model

DesktopAssetManager dsk = (DesktopAssetManager) assetManager;

ModelKey bk = new ModelKey(name);

Spatial tmpSpatial = assetManager.loadModel(bk);





[/java]

2.61 works fine just fyi

yeah… 2.61 works ok…

but 2.62 has the exception.

@mifth said:
yeah... 2.61 works ok...
but 2.62 has the exception.


Since 2.62 some SDNA field type has changed from int to uint64_t in blender.

In com.jme3.scene.plugins.blender.file.Structure the following line must be inserted after line 287:
PRIMARY_TYPES.put("uint64_t", LONG);

It worked for me, and so far I did not find any field where the datatype changed and the importer
actualy uses its value so it is safe to add this line.
@remorhaz said:
Since 2.62 some SDNA field type has changed from int to uint64_t in blender.

In com.jme3.scene.plugins.blender.file.Structure the following line must be inserted after line 287:
PRIMARY_TYPES.put("uint64_t", LONG);

It worked for me, and so far I did not find any field where the datatype changed and the importer
actualy uses its value so it is safe to add this line.

Thanks, should be fixed in SVN now

Thanks for the commit.



It looks like guys in blender are not wasting their time.

I wonder if I will ever manage to catch up with importing the most fresh blender features :wink:

@Kaelthas said:It looks like guys in blender are not wasting their time.
I wonder if I will ever manage to catch up with importing the most fresh blender features ;)

He he, funny how that works. I'm pretty sure we can call ourselves at the forefront of Blender support thanks to you though.

I'll be on the lookout for Blender developers who might be able to help out, starting with a nudge on twitter.

GUYS!!! BLENDER 2.62 MODELS NOW WORK!!!



THANKS A LOT!!!

@remorhaz said:
Since 2.62 some SDNA field type has changed from int to uint64_t in blender.

In com.jme3.scene.plugins.blender.file.Structure the following line must be inserted after line 287:
PRIMARY_TYPES.put("uint64_t", LONG);

It worked for me, and so far I did not find any field where the datatype changed and the importer
actualy uses its value so it is safe to add this line.


Where can i find this file?
I have looked all over my libraries and can't seem to find it.

Regards,

the fix was committed to nightly builds.