Skip to content

Commit 653f5e4

Browse files
authored
add v0.0.1 with original 2d gs as submodule (#14)
1 parent ddf5515 commit 653f5e4

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.pyc
22
.vscode
33
output
4+
temp
45
build
56
edited
67
assets
@@ -9,6 +10,5 @@ assets
910
**__pycache__**
1011
*.png
1112
*.out
12-
*.gif
1313
*.npz
1414
**/tmp

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "2d_gaussian_splatting"]
2+
path = 2d_gaussian_splatting
3+
url = https://github.com/hbb1/2d-gaussian-splatting.git

2d_gaussian_splatting

Submodule 2d_gaussian_splatting added at c6e0b75

internal/viewer/ui/edit_panel.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,14 @@ def _setup_mesh_export_folder(self):
324324
self.unshow_mesh_button = self.server.add_gui_button("unshow Mesh", color="yellow", icon=viser.Icon.PLAYER_PLAY, visible=False)
325325

326326
def export_mesh_block(self):
327-
self._default_export_log = f"**Model path**: {self.viewer.model_paths} \\\n **Data path**: {self.viewer.source_path} \\\n ![visualization]({os.getcwd() + '/assets/loading.gif'})"
327+
self._default_export_log = f"**Model path**: {self.viewer.model_paths} \\\n **Data path**: {self.viewer.source_path}})"
328328
self._mesh_export_log_dir = os.path.join(os.getcwd(), 'temp/mesh_log.txt')
329329
if os.path.exists(self._mesh_export_log_dir):
330330
os.remove(self._mesh_export_log_dir)
331-
with open(self._mesh_export_log_dir, 'w') as file:
332-
file.write("mesh exporting... \\\n ")
331+
dir_path = os.path.dirname(self._mesh_export_log_dir)
332+
if not os.path.exists(dir_path):
333+
os.makedirs(dir_path)
333334
# Mesh Export !!!
334-
335335
def read_last_lines(file_path, num_lines):
336336
with open(file_path, 'r') as file:
337337
lines = file.readlines()
@@ -351,6 +351,8 @@ def _(_) -> None:
351351
# Update the GUI first before starting the thread
352352
def update_gui_and_start_export():
353353
def export() -> None:
354+
with open(self._mesh_export_log_dir, 'w') as file:
355+
file.write("mesh exporting... \\\n ")
354356
ex_args, model_params, export_pipe_params = MeshExporter.parse_args_mesh(self.viewer.model_paths,
355357
self.viewer.source_path,
356358
self.viewer.args,

viewer.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23
import math
34
import glob
45
import time
@@ -11,6 +12,8 @@
1112
import threading
1213
import warnings
1314
warnings.filterwarnings('ignore')
15+
current_dir = os.path.dirname(os.path.abspath(__file__))
16+
sys.path.append(os.path.join(current_dir, '2d_gaussian_splatting'))
1417

1518
from pathlib import Path
1619
from argparse import ArgumentParser

0 commit comments

Comments
 (0)