Import JT with python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys,
i want to import a bunch of .jt files with python. When i import one by hand, the import window opens, i press okay and i get my geometry. But with the script, it doesn't work
The line: vrFileIOService.importFiles([filename], findNode("Root")) changes nothing, VRED does something but the scenegraph remains the same, nothing is imported.
The line: vrFileIOService.importAtfFile(filename, findNode("Root")) changes nothing but stops the script without any error messages - so something really goes wrong there.
Any Ideas?
VRED 2025.1 and 2023.4 tested:
--------------------------------
import os
# Pfad zum Ordner mit den JT-Dateien
input_folder = r"C:\temp\JT\BLENDERKONVERT"
output_folder = r"C:\temp\JT\BLENDERKONVERT"
for filename in os.listdir(input_folder):
if filename.endswith(".jt"):
print(filename)
settings = vrFileIOService.getImportSettingsFromPreferences(vrCADFileTypes.FileType.JT)
print(settings.getImportMeshes())
# changes nothing
vrFileIOService.importFiles([filename], findNode("Root"))
# changes nothing and stops python
#vrFileIOService.importAtfFile(filename, findNode("Root"))
print("Done!")