mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
74ead1eb80
# Objective when loading gltfs we may want to filter the results. in particular, i need to be able to exclude cameras. i can do this already by modifying the gltf after load and before spawning, but it seems like a useful general option. ## Solution add `GltfLoaderSettings` struct with bool members: - `load_cameras` : checked before processing camera nodes. - `load_lights` : checked before processing light nodes - `load_meshes` : checked before loading meshes, materials and morph weights Existing code will work as before. Now you also have the option to restrict what parts of the gltf are loaded. For example, to load a gltf but exclude the cameras, replace a call to `asset_server.load("my.gltf")` with: ```rust asset_server.load_with_settings( "my.gltf", |s: &mut GltfLoaderSettings| { s.load_cameras = false; } ); ``` --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
---|---|---|
.. | ||
lib.rs | ||
loader.rs | ||
vertex_attributes.rs |