STEAM-GRUPPE
Blender Source Tools BleST
STEAM-GRUPPE
Blender Source Tools BleST
355
I SPIL
2,279
ONLINE
Grundlagt:
8. november 2013
Alle diskussioner > Bug Reports > Trådoplysninger
almie 23. dec. 2024 kl. 12:40
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.
Oprindeligt skrevet af 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.
< >
Viser 1-3 af 3 kommentarer
Artfunkel 30. dec. 2024 kl. 3:03 
Please upload a DMX file which demonstrates this problem.
En moderator af dette forum har angivet, at dette indlæg besvarer det oprindelige emne.
Artfunkel 11. jan. kl. 3:47 
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.
< >
Viser 1-3 af 3 kommentarer
Per side: 1530 50

Alle diskussioner > Bug Reports > Trådoplysninger