Skip to content

Commit 59624ba

Browse files
committed
Prepping to move more examples to another PR
1 parent bab7adc commit 59624ba

File tree

6 files changed

+6
-15
lines changed

6 files changed

+6
-15
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ assets:
55
rm -r assets || true
66
blender -b test_scenes/Cube.blend --python export.py -- --output-file="assets/scenes/Cube.scn" --log-level=DEBUG
77
blender -b test_scenes/PhysicsTest.blend --python export.py -- --output-file="assets/scenes/PhysicsTest.scn" --log-level=DEBUG
8-
blender -b test_scenes/Heirarchy.blend --python export.py -- --output-file="assets/scenes/Heirarchy.scn" --log-level=DEBUG
98

109
run:
11-
cargo run --example scenes -- scenes/PhysicsTest.scn
10+
cargo run --example scenes

blender_bevy_toolkit/rapier_definitions/rigid_body_description.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
"type": "bool",
3434
"default": false,
3535
"description": "allow this body to sleep when velocity is low - this increases performance"
36-
},
36+
}
3737
]
3838
}

examples/scenes/main.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use bevy_rapier3d::physics::{NoUserData, RapierPhysicsPlugin};
44
use bevy_rapier3d::prelude::*;
55
use blender_bevy_toolkit::BlendLoadPlugin;
66

7-
use std::env;
8-
97

108
fn spawn_scene(
119
mut commands: Commands,
@@ -27,16 +25,7 @@ fn spawn_scene(
2725
..Default::default()
2826
});
2927

30-
let args: Vec<String> = env::args().collect();
31-
32-
if args.len() != 2 {
33-
println!("Please specify a scene file to load. For example:\n cargo run --example scenes -- scenes/Heirarchy.scn");
34-
std::process::exit(1);
35-
}
36-
37-
println!("Running scene: {}", args[1]);
38-
39-
let scene_handle: Handle<DynamicScene> = asset_server.load(args[1].as_str());
28+
let scene_handle: Handle<DynamicScene> = asset_server.load("scenes/PhysicsTest.scn");
4029
scene_spawner.spawn_dynamic(scene_handle);
4130
}
4231

@@ -48,6 +37,8 @@ fn setup_physics(mut physics_config: ResMut<RapierConfiguration>) {
4837

4938

5039
fn main() {
40+
println!("Running example scenes");
41+
5142
App::new()
5243
.add_plugins(DefaultPlugins)
5344
.add_plugin(RapierPhysicsPlugin::<NoUserData>::default())

export.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def export_all(args):
2323

2424
logging.basicConfig(level=config.log_level)
2525

26+
2627
try:
2728
import blender_bevy_toolkit
2829
print("WARNING: Plugin is installed in blender, using installed version for export")

test_scenes/Cube.blend

46.8 KB
Binary file not shown.

test_scenes/Heirarchy.blend

-774 KB
Binary file not shown.

0 commit comments

Comments
 (0)