STEAM 组
Blender Source Tools BleST
STEAM 组
Blender Source Tools BleST
191
游戏中
1,479
在线
成立于
2013 年 11 月 8 日
所有讨论 > Bug Reports > 主题详情
almie 2024 年 12 月 23 日 下午 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.
引用自 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.
< >
正在显示第 1 - 3 条,共 3 条留言
Artfunkel 2024 年 12 月 30 日 上午 3:03 
Please upload a DMX file which demonstrates this problem.
此论坛的一名版主已表示此帖子解答了原先的主题。
Artfunkel 1 月 11 日 上午 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.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50

所有讨论 > Bug Reports > 主题详情