STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
341
IN-GAME
2,015
ONLINE
Founded
8 November, 2013
All Discussions > Bug Reports > Topic Details
almie 23 Dec, 2024 @ 12:40pm
Error loading Source 2 SFM session DMX file with datamodel.py
Hi, I'm encountering an issue when trying to load an SFM session with datamodel.py originating from the Dota 2 SFM.

Repro steps:
1. Install Dota 2 Workshop Tools
2. Open Dota 2 SFM
3. Create new session and add any random model as an animation set
4. Save session
5. In Python:
import datamodel as dm dm_object = dm.load('path/to/session.dmx')

Result:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "datamodel.py", line 1073, in load read_element(elem) File "datamodel.py", line 1039, in read_element attr_type = _get_dmx_id_type(encoding,encoding_ver,attr_type_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "datamodel.py", line 453, in _get_dmx_id_type return eval("_" + attr_list_v3[id-32].__name__.capitalize() + "Array") ~~~~~~~~~~~~^^^^^^^ IndexError: list index out of range

The file header is <!-- dmx encoding binary 9 format sfm_session 22 --> but I suspect that this is to do with this branch of source 2 using a different binary encoding than previously supported by datamodel.py. Converting the file to keyvalues2 format using dmxconvert allows me to load it without issue, but I'd like to be able to read the binary files directly if possible.
Originally posted by Artfunkel:
I pushed a new commit which adds support for 8 bit and 64 bit integer values.

This doesn't affect model import/export so I won't create a new release of the tools.
< >
Showing 1-3 of 3 comments
Artfunkel 30 Dec, 2024 @ 3:03am 
Please upload a DMX file which demonstrates this problem.
A moderator of this forum has indicated that this post answers the original topic.
I pushed a new commit which adds support for 8 bit and 64 bit integer values.

This doesn't affect model import/export so I won't create a new release of the tools.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details