From 49ae5c082d9654d8f8113365f5411764c83866a8 Mon Sep 17 00:00:00 2001 From: zhouhang95 <765229842@qq.com> Date: Fri, 3 Nov 2023 11:09:06 +0800 Subject: [PATCH] read 2g obj --- zeno/src/nodes/neo/ReadObjPrim.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zeno/src/nodes/neo/ReadObjPrim.cpp b/zeno/src/nodes/neo/ReadObjPrim.cpp index fdc35c0718..34b697be53 100644 --- a/zeno/src/nodes/neo/ReadObjPrim.cpp +++ b/zeno/src/nodes/neo/ReadObjPrim.cpp @@ -125,8 +125,11 @@ std::shared_ptr parse_obj(std::vector &&bin) { struct ReadObjPrim : INode { virtual void apply() override { - auto path = get_input("path")->get(); - auto binary = file_get_binary>(path); + auto path = get_input2("path"); + std::string native_path = std::filesystem::u8path(path).string(); + std::ifstream file(native_path, std::ios::binary); + auto binary = std::vector((std::istreambuf_iterator(file)), + std::istreambuf_iterator()); auto prim = parse_obj(std::move(binary)); if (get_param("triangulate")) { primTriangulate(prim.get());