Skip to content

Commit

Permalink
Added print in server, fixed gltf format bug, reverted removed / from…
Browse files Browse the repository at this point in the history
… server paths
  • Loading branch information
grebtsew committed Oct 9, 2024
1 parent e0825e7 commit 2da4c95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Blender/blender_export_any.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
elif format == ".fbx":
bpy.ops.export_scene.fbx(filepath=output_path)
elif format == ".gltf":
bpy.ops.export_scene.gltf(filepath=output_path)
bpy.ops.export_scene.gltf(filepath=output_path, export_format='GLTF_SEPARATE')
elif format == ".x3d":
bpy.ops.export_scene.x3d(filepath=output_path)
elif format == ".blend":
Expand Down
8 changes: 5 additions & 3 deletions Server/process/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ def run(self):
self.process["state"] = self.process["state"] + 1
self.update("status", "Create Object file")

check_output(
[
cmd = [
blender_install_path,
"-noaudio", # this is a dockerfile ubuntu hax fix
"--background",
Expand All @@ -133,6 +132,8 @@ def run(self):
self.process["format"],
"./storage/objects/" + self.process["out"],
]
check_output(
cmd
)

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

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

# Reindex here
self.shared.reindex_files()
print(f"Done with task: {cmd}")
4 changes: 2 additions & 2 deletions Server/test/test_blender_paths_in_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"../Blender/floorplan_to_3dObject_in_blender.py",
"/home/floorplan_to_blender/Server/",
"storage/objects/" + str(sys.argv[1]) + ".blend",
"storage/data/" + str(sys.argv[1]) + "0/",
"storage/data/" + str(sys.argv[1]) + "/0/",
]
)
)
Expand All @@ -41,6 +41,6 @@
"../Blender/floorplan_to_3dObject_in_blender.py",
"/home/floorplan_to_blender/Server/",
"storage/objects/" + str(sys.argv[1]) + ".blend",
"storage/data/" + str(sys.argv[1]) + "0/",
"storage/data/" + str(sys.argv[1]) + "/0/",
]
)

0 comments on commit 2da4c95

Please sign in to comment.