Skip to content

Commit 4d29249

Browse files
committedJan 31, 2024
update exportOBJ scripts (changed python API)
1 parent 0388738 commit 4d29249

6 files changed

+6
-6
lines changed
 

‎utilities/scripts/exportOBJ_Ampeln.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
bpy.ops.wm.open_mainfile(filepath=currentFile)
1616
blendfileName = blendfile.replace('.blend', '.obj')
1717
exportPath = os.path.join(pathOBJ,blendfileName)
18-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, use_triangles=True, path_mode='RELATIVE')
18+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')
1919

2020
textureFolder = os.path.join(runDir,'Ampeln/textures')
2121
dest = os.path.join(pathOBJ,'textures/')

‎utilities/scripts/exportOBJ_Ausleger.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
bpy.ops.wm.open_mainfile(filepath=currentFile)
1616
blendfileName = blendfile.replace('.blend', '.obj')
1717
exportPath = os.path.join(pathOBJ,blendfileName)
18-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, use_triangles=True, path_mode='RELATIVE')
18+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')
1919

2020
textureFolder = os.path.join(runDir,'Beleuchtung/Ausleger/textures')
2121
dest = os.path.join(pathOBJ,'textures/')

‎utilities/scripts/exportOBJ_Masten.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
bpy.ops.wm.open_mainfile(filepath=currentFile)
1616
blendfileName = blendfile.replace('.blend', '.obj')
1717
exportPath = os.path.join(pathOBJ,blendfileName)
18-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, use_triangles=True, path_mode='RELATIVE')
18+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')
1919

2020
textureFolder = os.path.join(runDir,'Beleuchtung/Masten/textures')
2121
dest = os.path.join(pathOBJ,'textures/')

‎utilities/scripts/exportOBJ_Verkehrszeichen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
bpy.ops.wm.open_mainfile(filepath=currentFile)
1515
blendfileName = blendfile.replace('.blend', '.obj')
1616
exportPath = os.path.join(pathTemp,blendfileName)
17-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, path_mode='RELATIVE')
17+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')

‎utilities/scripts/exportOBJ_Wandhalterung.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
bpy.ops.wm.open_mainfile(filepath=currentFile)
1616
blendfileName = blendfile.replace('.blend', '.obj')
1717
exportPath = os.path.join(pathOBJ,blendfileName)
18-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, use_triangles=True, path_mode='RELATIVE')
18+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')
1919

2020
textureFolder = os.path.join(runDir,'Beleuchtung/Wandhalterung/textures')
2121
dest = os.path.join(pathOBJ,'textures/')

‎utilities/scripts/exportOBJ_Werbeanlagen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
bpy.ops.wm.open_mainfile(filepath=currentFile)
1616
blendfileName = blendfile.replace('.blend', '.obj')
1717
exportPath = os.path.join(pathOBJ,blendfileName)
18-
bpy.ops.export_scene.obj(filepath=exportPath, axis_forward='-Y', axis_up='Z', use_materials=True, use_triangles=True, path_mode='RELATIVE')
18+
bpy.ops.wm.obj_export(filepath=exportPath, forward_axis='NEGATIVE_Y', up_axis='Z', export_materials=True, export_triangulated_mesh=True, path_mode='RELATIVE')
1919

2020
textureFolder = os.path.join(runDir,'Werbeanlagen/textures')
2121
dest = os.path.join(pathOBJ,'textures/')

0 commit comments

Comments
 (0)
Failed to load comments.