fix(yaml): 添加UTF-8编码参数以正确读取YAML文件

当打开YAML文件时指定UTF-8编码,确保文件能够正确解析,
避免因编码问题导致的读取错误。

refactor(gitignore): 注释掉特定文件扩展名的忽略规则

将 *.txo.pz 和 data/**/*.txo 的忽略规则注释掉,
以便这些文件能够被纳入版本控制。
```
This commit is contained in:
赵豪 2026-01-13 17:27:20 +08:00
parent 8401142a14
commit e7b0e9b88c
10 changed files with 3 additions and 3 deletions

4
.gitignore vendored
View File

@ -15,7 +15,7 @@
*.mip
mitsuba.*.log
*.exr
*.txo.pz
# *.txo.pz
*.log
*.tmp
*.bak
@ -60,7 +60,7 @@ samples/
test_models/
# Generated pipeline assets
data/**/*.txo
# data/**/*.txo
toolkit/**/__pycache__/
# --- Ignored files ---

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28,7 +28,7 @@ def load_yaml_file(filename):
start = time.process_time()
try:
with open(filename, "r") as handle:
with open(filename, "r",encoding='utf-8') as handle:
parsed_yaml = yaml_load(handle, Loader=SafeLoader)
except IOError as msg:
RPObject.global_error("YAMLLoader", "Could not find or open file:", filename)

Binary file not shown.

Binary file not shown.

Binary file not shown.