2#include <Threedim/TinyObj.hpp>
3#include <Threedim/TransformHelper.hpp>
4#include <halp/controls.hpp>
5#include <halp/file_port.hpp>
6#include <halp/meta.hpp>
8#include <ossia/dataflow/geometry_port.hpp>
10#include <Gfx/Graph/GpuResourceRegistry.hpp>
12#include <score_plugin_threedim_export.h>
17class QRhiResourceUpdateBatch;
42 using ParseFn = std::shared_ptr<const ossia::scene_state> (*)(
43 const halp::text_file_view&);
48 static void register_parser(std::string_view extension, ParseFn fn);
51 static ParseFn lookup(std::string_view extension_lower)
noexcept;
77 halp_meta(name,
"Asset Loader")
78 halp_meta(category,
"Visuals/3D")
79 halp_meta(c_name,
"asset_loader")
80 halp_meta(authors,
"ossia team, ufbx / fastgltf / tinyobj / miniply / vcglib")
83 "https://ossia.io/score-docs/processes/asset-loader.html")
84 halp_meta(uuid,
"2f6a8c41-7d93-4e5b-b1c8-4e3f9a7d2c5b")
88 struct asset_t : halp::file_port<"Asset file">
92 "3D assets (*.fbx *.gltf *.glb *.obj *.ply *.stl *.off "
94 "*.usd *.usda *.usdc *.usdz)");
95 static std::function<void(
AssetLoader&)> process(file_type data);
109 void update(
AssetLoader& n) { n.rebuild_format_state(); }
117 halp_meta(name,
"Scene");
118 ossia::scene_spec scene;
141 std::shared_ptr<const ossia::scene_state> m_parsed_state;
142 std::shared_ptr<const ossia::scene_state> m_overridden_state;
143 std::shared_ptr<const ossia::scene_state> m_wrapped_state;
144 std::string m_cached_format_override;
146 int64_t m_version_counter{0};
151 void rebuild_format_state();
154 ossia::gpu_slot_ref m_xform_ref{};
157 void rebuild_wrapped_state();
Definition AssetLoader.hpp:75
Definition AssetLoader.hpp:40
List of nodes to be rendered to an output.
Definition RenderList.hpp:30
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Definition AssetLoader.hpp:89
Definition AssetLoader.hpp:87
Definition AssetLoader.hpp:114
Definition TransformHelper.hpp:26
Definition TinyObj.hpp:98
Definition TinyObj.hpp:103
Definition TinyObj.hpp:107
Connection between two score::gfx::Port.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:103
Definition GpuResourceRegistry.hpp:84