Skip to content

Commit 2da4c95

Browse files
committed
Added print in server, fixed gltf format bug, reverted removed / from server paths
1 parent e0825e7 commit 2da4c95

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

Blender/blender_export_any.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
elif format == ".fbx":
2727
bpy.ops.export_scene.fbx(filepath=output_path)
2828
elif format == ".gltf":
29-
bpy.ops.export_scene.gltf(filepath=output_path)
29+
bpy.ops.export_scene.gltf(filepath=output_path, export_format='GLTF_SEPARATE')
3030
elif format == ".x3d":
3131
bpy.ops.export_scene.x3d(filepath=output_path)
3232
elif format == ".blend":

Server/process/create.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ def run(self):
122122
self.process["state"] = self.process["state"] + 1
123123
self.update("status", "Create Object file")
124124

125-
check_output(
126-
[
125+
cmd = [
127126
blender_install_path,
128127
"-noaudio", # this is a dockerfile ubuntu hax fix
129128
"--background",
@@ -133,6 +132,8 @@ def run(self):
133132
self.process["format"],
134133
"./storage/objects/" + self.process["out"],
135134
]
135+
check_output(
136+
cmd
136137
)
137138

138139
self.process["state"] = self.process["state"] + 1
@@ -141,10 +142,11 @@ def run(self):
141142
# Don't remove target!
142143
# Remove data
143144
# TODO: handle multiple floorplan removeal
144-
fh.remove("./storage/data/" + self.process["in"] + "0/")
145+
fh.remove("./storage/data/" + self.process["in"] + "/0/")
145146

146147
self.process["state"] = self.process["state"] + 1
147148
self.update("status", "Done")
148149

149150
# Reindex here
150151
self.shared.reindex_files()
152+
print(f"Done with task: {cmd}")

Server/test/test_blender_paths_in_docker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"../Blender/floorplan_to_3dObject_in_blender.py",
2626
"/home/floorplan_to_blender/Server/",
2727
"storage/objects/" + str(sys.argv[1]) + ".blend",
28-
"storage/data/" + str(sys.argv[1]) + "0/",
28+
"storage/data/" + str(sys.argv[1]) + "/0/",
2929
]
3030
)
3131
)
@@ -41,6 +41,6 @@
4141
"../Blender/floorplan_to_3dObject_in_blender.py",
4242
"/home/floorplan_to_blender/Server/",
4343
"storage/objects/" + str(sys.argv[1]) + ".blend",
44-
"storage/data/" + str(sys.argv[1]) + "0/",
44+
"storage/data/" + str(sys.argv[1]) + "/0/",
4545
]
4646
)

0 commit comments

Comments
 (0)