mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 03:50:52 +00:00
Compare commits
3 Commits
94ee8b4520
...
1180a31838
Author | SHA1 | Date | |
---|---|---|---|
|
1180a31838 | ||
|
d5f14bc037 | ||
|
f73f8a4704 |
@ -25,7 +25,6 @@ This guide assumes you use Blender 4.2 or newer and have set it to English.
|
|||||||
|
|
||||||
<img src="img/install.png" width=50%>
|
<img src="img/install.png" width=50%>
|
||||||
|
|
||||||
</summary>
|
|
||||||
</details>
|
</details>
|
||||||
- Leave all settings as is and click on `OK`
|
- Leave all settings as is and click on `OK`
|
||||||
|
|
||||||
@ -315,4 +314,4 @@ Okay, maybe not that much glory. But the important part is that the player is vi
|
|||||||
|
|
||||||
- Read the [Blenvy for Bevy](../../crates/blenvy/README.md) documentation for more features on the Bevy side.
|
- Read the [Blenvy for Bevy](../../crates/blenvy/README.md) documentation for more features on the Bevy side.
|
||||||
- Read the [Blenvy for Blender](../../tools/blenvy/README.md) documentation for more features on the Blender side.
|
- Read the [Blenvy for Blender](../../tools/blenvy/README.md) documentation for more features on the Blender side.
|
||||||
- Read about the [Avian Physics Integration](../avian/readme.md) to learn how to setup colliders in Blender that will be used by the Avian physics engine in Bevy.
|
- Read about the [Avian Physics Integration](../avian/README.md) to learn how to setup colliders in Blender that will be used by the Avian physics engine in Bevy.
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
|
|
||||||
#[derive(Component, Reflect, Debug)]
|
|
||||||
#[reflect(Component)]
|
|
||||||
/// Component for cameras, with an offset from the Trackable target
|
|
||||||
///
|
|
||||||
pub struct CameraTracking {
|
|
||||||
pub offset: Vec3,
|
|
||||||
}
|
|
||||||
impl Default for CameraTracking {
|
|
||||||
fn default() -> Self {
|
|
||||||
CameraTracking {
|
|
||||||
offset: Vec3::new(0.0, 6.0, 8.0),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Component, Reflect, Debug, Deref, DerefMut)]
|
#[derive(Component, Reflect, Debug, Deref, DerefMut)]
|
||||||
#[reflect(Component)]
|
#[reflect(Component)]
|
||||||
/// Component for cameras, with an offset from the Trackable target
|
/// Component for cameras, with an offset from the Trackable target
|
||||||
|
@ -11,7 +11,6 @@ pub struct CameraPlugin;
|
|||||||
impl Plugin for CameraPlugin {
|
impl Plugin for CameraPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.register_type::<CameraTrackable>()
|
app.register_type::<CameraTrackable>()
|
||||||
.register_type::<CameraTracking>()
|
|
||||||
.register_type::<CameraTrackingOffset>()
|
.register_type::<CameraTrackingOffset>()
|
||||||
.register_type::<SSAOSettings>()
|
.register_type::<SSAOSettings>()
|
||||||
.add_systems(
|
.add_systems(
|
||||||
|
@ -10,15 +10,15 @@ conversion_tables = {
|
|||||||
|
|
||||||
"glam::Vec2": lambda value: "Vec2(x:"+str(value[0])+ ", y:"+str(value[1])+")",
|
"glam::Vec2": lambda value: "Vec2(x:"+str(value[0])+ ", y:"+str(value[1])+")",
|
||||||
"glam::DVec2": lambda value: "DVec2(x:"+str(value[0])+ ", y:"+str(value[1])+")",
|
"glam::DVec2": lambda value: "DVec2(x:"+str(value[0])+ ", y:"+str(value[1])+")",
|
||||||
"glam::UVec2": lambda value: "UVec2(x:"+str(value[0])+ ", y:"+str(value[1])+")",
|
"glam::UVec2": lambda value: "UVec2(x:"+str(int(value[0]))+ ", y:"+str(int(value[1]))+")",
|
||||||
|
|
||||||
"glam::Vec3": lambda value: "Vec3(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+")",
|
"glam::Vec3": lambda value: "Vec3(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+")",
|
||||||
"glam::Vec3A": lambda value: "Vec3A(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+")",
|
"glam::Vec3A": lambda value: "Vec3A(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+")",
|
||||||
"glam::UVec3": lambda value: "UVec3(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+")",
|
"glam::UVec3": lambda value: "UVec3(x:"+str(int(value[0]))+ ", y:"+str(int(value[1]))+ ", z:"+str(int(value[2]))+")",
|
||||||
|
|
||||||
"glam::Vec4": lambda value: "Vec4(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
"glam::Vec4": lambda value: "Vec4(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
||||||
"glam::DVec4": lambda value: "DVec4(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
"glam::DVec4": lambda value: "DVec4(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
||||||
"glam::UVec4": lambda value: "UVec4(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
"glam::UVec4": lambda value: "UVec4(x:"+str(int(value[0]))+ ", y:"+str(int(value[1]))+ ", z:"+str(int(value[2]))+ ", w:"+str(int(value[3]))+")",
|
||||||
|
|
||||||
"glam::Quat": lambda value: "Quat(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
"glam::Quat": lambda value: "Quat(x:"+str(value[0])+ ", y:"+str(value[1])+ ", z:"+str(value[2])+ ", w:"+str(value[3])+")",
|
||||||
|
|
||||||
|
@ -65,17 +65,17 @@ class ComponentsRegistry(PropertyGroup):
|
|||||||
|
|
||||||
"glam::Vec2": {"type": FloatVectorProperty, "presets": dict(size = 2) },
|
"glam::Vec2": {"type": FloatVectorProperty, "presets": dict(size = 2) },
|
||||||
"glam::DVec2": {"type": FloatVectorProperty, "presets": dict(size = 2) },
|
"glam::DVec2": {"type": FloatVectorProperty, "presets": dict(size = 2) },
|
||||||
"glam::UVec2": {"type": FloatVectorProperty, "presets": dict(size = 2) },
|
"glam::UVec2": {"type": IntVectorProperty, "presets": {"size": 2, "min": 0} },
|
||||||
|
|
||||||
"glam::Vec3": {"type": FloatVectorProperty, "presets": {"size":3} },
|
"glam::Vec3": {"type": FloatVectorProperty, "presets": {"size":3} },
|
||||||
"glam::Vec3A":{"type": FloatVectorProperty, "presets": {"size":3} },
|
"glam::Vec3A":{"type": FloatVectorProperty, "presets": {"size":3} },
|
||||||
"glam::DVec3":{"type": FloatVectorProperty, "presets": {"size":3} },
|
"glam::DVec3":{"type": FloatVectorProperty, "presets": {"size":3} },
|
||||||
"glam::UVec3":{"type": FloatVectorProperty, "presets": {"size":3} },
|
"glam::UVec3":{"type": IntVectorProperty, "presets": {"size":3, "min":0} },
|
||||||
|
|
||||||
"glam::Vec4": {"type": FloatVectorProperty, "presets": {"size":4} },
|
"glam::Vec4": {"type": FloatVectorProperty, "presets": {"size":4} },
|
||||||
"glam::Vec4A": {"type": FloatVectorProperty, "presets": {"size":4} },
|
"glam::Vec4A": {"type": FloatVectorProperty, "presets": {"size":4} },
|
||||||
"glam::DVec4": {"type": FloatVectorProperty, "presets": {"size":4} },
|
"glam::DVec4": {"type": FloatVectorProperty, "presets": {"size":4} },
|
||||||
"glam::UVec4":{"type": FloatVectorProperty, "presets": {"size":4, "min":0.0} },
|
"glam::UVec4":{"type": IntVectorProperty, "presets": {"size":4, "min":0} },
|
||||||
|
|
||||||
"glam::Quat": {"type": FloatVectorProperty, "presets": {"size":4} },
|
"glam::Quat": {"type": FloatVectorProperty, "presets": {"size":4} },
|
||||||
|
|
||||||
|
@ -97,8 +97,6 @@ expected_custom_property_values = {'bevy_animation::AnimationPlayer': '(animatio
|
|||||||
'blenvy::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 0)',
|
'blenvy::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 0)',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: Vec3(x:0.0, y:0.0, '
|
|
||||||
'z:0.0))',
|
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, '
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, '
|
||||||
'z:0.0))',
|
'z:0.0))',
|
||||||
'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()',
|
'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()',
|
||||||
@ -359,10 +357,6 @@ expected_custom_property_values_randomized = {'bevy_animation::AnimationPlayer':
|
|||||||
'blenvy::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 73)',
|
'blenvy::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 73)',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: '
|
|
||||||
'Vec3(x:0.5714026093482971, '
|
|
||||||
'y:0.42888906598091125, '
|
|
||||||
'z:0.5780913233757019))',
|
|
||||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.5714026093482971, '
|
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.5714026093482971, '
|
||||||
'y:0.42888906598091125, '
|
'y:0.42888906598091125, '
|
||||||
'z:0.5780913233757019))',
|
'z:0.5780913233757019))',
|
||||||
|
Loading…
Reference in New Issue
Block a user