Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect derived traits on all components and resources: bevy_gltf #15218

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions crates/bevy_gltf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ use bevy_app::prelude::*;
use bevy_asset::{Asset, AssetApp, AssetPath, Handle};
use bevy_ecs::{prelude::Component, reflect::ReflectComponent};
use bevy_pbr::StandardMaterial;
use bevy_reflect::std_traits::ReflectDefault;
use bevy_reflect::{Reflect, TypePath};
use bevy_render::{
mesh::{skinning::SkinnedMeshInverseBindposes, Mesh, MeshVertexAttribute},
Expand Down Expand Up @@ -422,7 +423,7 @@ impl GltfPrimitive {
///
/// See [the relevant glTF specification section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-extras).
#[derive(Clone, Debug, Reflect, Default, Component)]
#[reflect(Component)]
#[reflect(Component, Default, Debug)]
pub struct GltfExtras {
/// Content of the extra data.
pub value: String,
Expand All @@ -432,7 +433,7 @@ pub struct GltfExtras {
///
/// See [the relevant glTF specification section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-extras).
#[derive(Clone, Debug, Reflect, Default, Component)]
#[reflect(Component)]
#[reflect(Component, Default, Debug)]
pub struct GltfSceneExtras {
/// Content of the extra data.
pub value: String,
Expand All @@ -442,7 +443,7 @@ pub struct GltfSceneExtras {
///
/// See [the relevant glTF specification section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-extras).
#[derive(Clone, Debug, Reflect, Default, Component)]
#[reflect(Component)]
#[reflect(Component, Default, Debug)]
pub struct GltfMeshExtras {
/// Content of the extra data.
pub value: String,
Expand All @@ -452,7 +453,7 @@ pub struct GltfMeshExtras {
///
/// See [the relevant glTF specification section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-extras).
#[derive(Clone, Debug, Reflect, Default, Component)]
#[reflect(Component)]
#[reflect(Component, Default, Debug)]
pub struct GltfMaterialExtras {
/// Content of the extra data.
pub value: String,
Expand Down