Rebuild local Blender WASM environment and recovery evidence
This commit is contained in:
@@ -5,8 +5,13 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
set(OPENVDB_ROOT "/home/mes123456/working/build_oiio_deps/Release/openvdb" CACHE PATH "OpenVDB install prefix")
|
||||
set(TBB_ROOT "/home/mes123456/working/build_oiio_deps/Release/tbb" CACHE PATH "TBB install prefix")
|
||||
set(_web_deps_root "$ENV{BLENDER_DEPS_ROOT}")
|
||||
if(NOT _web_deps_root)
|
||||
get_filename_component(_web_deps_root "${CMAKE_CURRENT_LIST_DIR}/../../.deps/native" ABSOLUTE)
|
||||
endif()
|
||||
set(OPENVDB_ROOT "${_web_deps_root}/openvdb" CACHE PATH "OpenVDB install prefix")
|
||||
set(TBB_ROOT "${_web_deps_root}/tbb" CACHE PATH "TBB install prefix")
|
||||
unset(_web_deps_root)
|
||||
|
||||
find_path(OPENVDB_INCLUDE_DIR openvdb/openvdb.h HINTS "${OPENVDB_ROOT}/include" REQUIRED NO_DEFAULT_PATH)
|
||||
find_library(OPENVDB_LIBRARY openvdb HINTS "${OPENVDB_ROOT}/lib" REQUIRED NO_DEFAULT_PATH)
|
||||
|
||||
@@ -10,7 +10,8 @@ npm --prefix web run test:vdb-native
|
||||
The provisioner builds two native executables, generates real bounded OpenVDB fixtures once without overwriting
|
||||
their UUID-bearing source files, downloads the official
|
||||
CC-BY-4.0 `sphere.vdb` sample with its Git LFS SHA-256, converts the fixtures with OpenVDB 13.0/NanoVDB 32.9,
|
||||
and writes the resources under `/home/mes123456/resource-library/blender-web-vdb`.
|
||||
and writes the resources under `resource-library/blender-web-vdb` in the
|
||||
checkout by default. Set `VDB_RESOURCE_ROOT` to use another location.
|
||||
|
||||
`vdb_to_nanovdb` accepts only `.vdb`, limits source/output bytes, grid count and active voxels, supports a grid
|
||||
allowlist, writes uncompressed standard NanoVDB segments, and emits a machine-readable conversion report.
|
||||
|
||||
@@ -3,12 +3,17 @@ set -euo pipefail
|
||||
|
||||
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
build_dir=${VDB_TOOLS_BUILD_DIR:-"$repo_root/build_vdb_tools"}
|
||||
openvdb_root=${OPENVDB_ROOT:-/home/mes123456/working/build_oiio_deps/Release/openvdb}
|
||||
tbb_root=${TBB_ROOT:-/home/mes123456/working/build_oiio_deps/Release/tbb}
|
||||
deps_root=${BLENDER_DEPS_ROOT:-${repo_root}/.deps/native}
|
||||
openvdb_root=${OPENVDB_ROOT:-${deps_root}/openvdb}
|
||||
tbb_root=${TBB_ROOT:-${deps_root}/tbb}
|
||||
|
||||
cmake -S "$repo_root/tools/vdb" -B "$build_dir" \
|
||||
-DOPENVDB_ROOT="$openvdb_root" \
|
||||
-DTBB_ROOT="$tbb_root" \
|
||||
-DOPENVDB_INCLUDE_DIR="$openvdb_root/include" \
|
||||
-DTBB_INCLUDE_DIR="$tbb_root/include" \
|
||||
-DOPENVDB_LIBRARY="$openvdb_root/lib/libopenvdb.so" \
|
||||
-DTBB_LIBRARY="$tbb_root/lib/libtbb.so" \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build "$build_dir" --parallel "${VDB_BUILD_JOBS:-4}"
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? "/home/mes123456/resource-library/blender-web-vdb");
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? path.join(repoRoot, "resource-library", "blender-web-vdb"));
|
||||
const converter = path.join(repoRoot, "build_vdb_tools", "vdb_to_nanovdb");
|
||||
const generator = path.join(repoRoot, "build_vdb_tools", "vdb_fixture_generator");
|
||||
const openVDBLicense = "/home/mes123456/working/build_oiio_deps/build/openvdb/src/external_openvdb/LICENSE";
|
||||
const openVDBLicense = process.env.OPENVDB_LICENSE ?? path.join(repoRoot, ".deps/native/openvdb/LICENSE");
|
||||
const ccLicense = path.join(resourceRoot, "licenses", "CC-BY-4.0.txt");
|
||||
|
||||
function sha256(file) {
|
||||
@@ -22,7 +22,12 @@ function entry(id, relativePath, kind, license, origin, extra = {}) {
|
||||
|
||||
fs.mkdirSync(path.join(resourceRoot, "generated"), { recursive: true });
|
||||
fs.mkdirSync(path.join(resourceRoot, "licenses"), { recursive: true });
|
||||
fs.copyFileSync(openVDBLicense, path.join(resourceRoot, "licenses", "OpenVDB-Apache-2.0.txt"));
|
||||
if (!fs.existsSync(openVDBLicense)) {
|
||||
const bundledLicense = path.join(resourceRoot, "licenses", "OpenVDB-Apache-2.0.txt");
|
||||
if (!fs.existsSync(bundledLicense)) throw new Error(`OPENVDB_LICENSE_MISSING: ${openVDBLicense}`);
|
||||
} else {
|
||||
fs.copyFileSync(openVDBLicense, path.join(resourceRoot, "licenses", "OpenVDB-Apache-2.0.txt"));
|
||||
}
|
||||
if (!fs.existsSync(ccLicense)) throw new Error("VDB_RESOURCE_LICENSE_MISSING: CC-BY-4.0.txt");
|
||||
|
||||
const smoke = fs.readFileSync(path.join(resourceRoot, "generated", "generated-smoke.vdb"));
|
||||
@@ -63,9 +68,9 @@ const manifest = {
|
||||
toolchain: {
|
||||
openVDBVersion: "13.0.0",
|
||||
nanoVDBVersion: "32.9.0",
|
||||
converterPath: converter,
|
||||
converterPath: path.relative(repoRoot, converter).replaceAll(path.sep, "/"),
|
||||
converterSha256: sha256(converter),
|
||||
generatorPath: generator,
|
||||
generatorPath: path.relative(repoRoot, generator).replaceAll(path.sep, "/"),
|
||||
generatorSha256: sha256(generator),
|
||||
},
|
||||
entries,
|
||||
|
||||
@@ -6,7 +6,7 @@ import { spawnSync } from "node:child_process";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? path.join(os.homedir(), "resource-library/blender-web-vdb"));
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? path.join(root, "resource-library", "blender-web-vdb"));
|
||||
const source = path.join(resourceRoot, "generated", "generated-smoke.vdb");
|
||||
const generator = path.join(root, "build_vdb_tools", "vdb_volume_golden");
|
||||
const committedRoot = path.join(root, "tests", "golden", "M8-19");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
resource_root=${VDB_RESOURCE_ROOT:-/home/mes123456/resource-library/blender-web-vdb}
|
||||
resource_root=${VDB_RESOURCE_ROOT:-"$repo_root/resource-library/blender-web-vdb"}
|
||||
build_dir=${VDB_TOOLS_BUILD_DIR:-"$repo_root/build_vdb_tools"}
|
||||
sphere_sha=bb884a9a38354e47191c4ece4a11d1e051594a910fde56501cfc51ff52b171ab
|
||||
license_sha=8d3fceb4cb62663775f02c1c551cfbf332d1c736667c17817c16c635caba21e0
|
||||
|
||||
@@ -3,13 +3,13 @@ import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? "/home/mes123456/resource-library/blender-web-vdb");
|
||||
const resourceRoot = path.resolve(process.env.VDB_RESOURCE_ROOT ?? path.join(root, "resource-library", "blender-web-vdb"));
|
||||
const catalog = JSON.parse(fs.readFileSync(path.join(resourceRoot, "manifest.json"), "utf8"));
|
||||
if (catalog.schemaVersion !== 1 || !Array.isArray(catalog.entries) || catalog.entries.length === 0) throw new Error("VDB_RESOURCE_CATALOG_INVALID");
|
||||
|
||||
const evidence = {
|
||||
schemaVersion: 1,
|
||||
resourceLibrary: resourceRoot,
|
||||
resourceLibrary: path.relative(root, resourceRoot).replaceAll(path.sep, "/") || ".",
|
||||
browserOpenVDB: false,
|
||||
desktopOpenVDB: true,
|
||||
serverJobConfigured: true,
|
||||
|
||||
Reference in New Issue
Block a user