修改角度读取方式

This commit is contained in:
zhangshixiang
2026-04-14 15:58:37 +08:00
parent c001f6a151
commit a45db46cf1
8 changed files with 254 additions and 201 deletions

View File

@@ -244,6 +244,12 @@ class ResourceDictInstance(object):
height= content["config"].get("size_y", 0),
depth= content["config"].get("size_z", 0),
)
if "rotation" not in pose:
pose["rotation"] = ResourceDictPositionObjectType(
x=content["config"].get("rotation", {}).get("x", 0),
y=content["config"].get("rotation", {}).get("y", 0),
z=content["config"].get("rotation", {}).get("z", 0),
)
content["pose"] = pose
try:
res_dict = ResourceDict.model_validate(content)