Skip to content

Commit

Permalink
Tests updates
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Dec 1, 2023
1 parent 28756f2 commit b012c9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions tests/export_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import os
import sys

bpy.ops.preferences.addon_enable(module="io_hubs_addon")

try:
argv = sys.argv
if "--" in argv:
Expand Down
3 changes: 1 addition & 2 deletions tests/test/test_export.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ describe('Exporter', function () {
describe(blenderVersion + '_export' + variant[0], function () {
blenderSampleScenes.forEach((scene) => {
it(scene, function (done) {
let outDirName = 'out' + blenderVersion + variant[0];
let blenderPath = `scenes/${scene}.blend`;
let ext = args.indexOf('--glb') === -1 ? '.gltf' : '.glb';
let outDirPath = path.resolve(OUT_PREFIX, 'scenes', outDirName);
let outDirPath = path.resolve(OUT_PREFIX, 'scenes', ext);
let dstPath = path.resolve(outDirPath, `${scene}${ext}`);
utils.blenderFileToGltf(blenderVersion, blenderPath, outDirPath, (error) => {
if (error)
Expand Down
4 changes: 2 additions & 2 deletions tests/test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12

function blenderFileToGltf(blenderVersion, blenderPath, outDirName, done, options = '') {
const { exec } = require('child_process');
const cmd = `${blenderVersion} -b --factory-startup --addons io_hubs_addon -noaudio ${blenderPath} --python export_gltf.py -- ${outDirName} ${options}`;
const cmd = `BLENDER_USER_SCRIPTS=${path.resolve("../")} ${blenderVersion} -b --factory-startup --addons io_hubs_addon -noaudio ${blenderPath} --python export_gltf.py -- ${outDirName} ${options}`;
var prc = exec(cmd, (error, stdout, stderr) => {
//if (stderr) process.stderr.write(stderr);

Expand All @@ -21,7 +21,7 @@ function blenderFileToGltf(blenderVersion, blenderPath, outDirName, done, option

function blenderRoundtripGltf(blenderVersion, gltfPath, outDirName, done, options = '') {
const { exec } = require('child_process');
const cmd = `${blenderVersion} -b --factory-startup --addons io_hubs_addon -noaudio --python roundtrip_gltf.py -- ${gltfPath} ${outDirName} ${options}`;
const cmd = `BLENDER_USER_SCRIPTS=${path.resolve("../")} ${blenderVersion} -b --factory-startup --addons io_hubs_addon -noaudio --python roundtrip_gltf.py -- ${gltfPath} ${outDirName} ${options}`;
var prc = exec(cmd, (error, stdout, stderr) => {
//if (stderr) process.stderr.write(stderr);

Expand Down

0 comments on commit b012c9f

Please sign in to comment.