[3d] fix file path issue for preview 3d node (#2005)

This commit is contained in:
Terry Jia
2024-12-22 16:13:15 -05:00
committed by GitHub
parent 72f7c3101d
commit ac952fbee3

View File

@@ -1748,7 +1748,17 @@ app.registerExtension({
node.onExecuted = function (message: any) {
onExecuted?.apply(this, arguments)
modelWidget.value = message.model_file[0]
let filePath = message.model_file[0]
if (!filePath) {
const msg = 'unable to get model file path.'
console.error(msg)
useToastStore().addAlert(msg)
}
modelWidget.value = filePath.replaceAll('\\', '/')
configureLoad3D(
load3d,