-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
30 lines (26 loc) · 1006 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export EXTISM_ENABLE_WASI_OUTPUT := "1"
repl:
blender --log-level 3 --factory-startup -b -P repl.py
_schema:
#!/bin/bash
if [ ! -e schema.json ] || [ genschema.py -nt schema.json ]; then
blender --log-level 3 --factory-startup -b -P genschema.py | grep -v 'WARN (bpy.rna)' | grep -v 'Blender quit' | grep -v 'Device with name' | grep -ve '^Blender' > schema.json
fi
build: _schema
#!/bin/bash
cargo build --release -p blextism-bindgen
<schema.json target/release/blextism-bindgen > target/bindings.rs
if [ -e crates/pdk/src/bindings.rs ]; then
lhs=$(shasum target/bindings.rs | cut -d' ' -f1)
rhs=$(shasum crates/pdk/src/bindings.rs | cut -d ' ' -f1)
echo "$lhs" "$rhs"
if [ "$lhs" != "$rhs" ]; then
cp target/bindings.rs crates/pdk/src/bindings.rs
fi
else
mv target/bindings.rs crates/pdk/src/bindings.rs
fi
cargo build --release --target wasm32-wasi -p plugin
run: build
rm -f *.blend
blender --log-level 3 --factory-startup -b -P run.py