Open tnindd opened 9 months ago
Stud.io doesn't have a LDCfgalt.ldr file. Try setting use_alt_colors to false and see if that works.
That only removes the first "missing" line, but not the second.
It looks like you're using the model's path as the ldraw_path.
Try this format.
bpy.ops.ldraw_exporter.import_operator(filepath="d:\\ldraw\\models\\car.ldr", ldraw_path="d:\\ldraw", studio_ldraw_path="C:\\Program Files\\Studio 2.0\\ldraw")
If you don't have the official LDraw library:
bpy.ops.ldraw_exporter.import_operator(filepath="d:\\ldraw\\models\\car.ldr", studio_ldraw_path="C:\\Program Files\\Studio 2.0\\ldraw")
Yes, that worked, thank you!
If anyone else has the same problem, here is the python script for automatically converting ldraw to collada:
import bpy
bpy.ops.ldraw_exporter.import_operator(filepath="d:\\Car.ldr", ldraw_path="c:\\Users\\Public\\Documents\\LDraw", studio_ldraw_path="C:\\Program Files\\Studio 2.0\\ldraw")
bpy.ops.wm.collada_export(filepath='d:\\Car.dae')
Call it on the command line with:
"c:\Program Files\Blender Foundation\Blender 4.0\blender.exe" --background --python "d:\Car.py"
I want to automate the process of importing the ldr file and exporting it to another file. I tried the following line for importing:
bpy.ops.ldraw_exporter.import_operator(ldraw_path="d:\\test.ldr", studio_ldraw_path="C:\\Program Files\\Studio 2.0\\ldraw")
But I receive two errors:
I can switch off the colors by adding the additional parameter:
use_alt_colors=False
Which removes the first "missing" error but the second remains. And switching off the color-option seems not a professional way of solving this error.
How to correctly solve these errors?