Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

recursive data folder fix

aaroncherian33cf7c638f11
diff --git a/freemocap/fmc_startup/startupGUI.py b/freemocap/fmc_startup/startupGUI.py
index 01d10964..c2ba8646 100644
--- a/freemocap/fmc_startup/startupGUI.py
+++ b/freemocap/fmc_startup/startupGUI.py
@@ -9,7 +9,7 @@ class setDataPathGUI:
self.master = master
self.session = session
- chooseText = "Please choose the directory your FreeMoCap folder is located in"
+ chooseText = "Please choose the directory your FreeMoCap_data folder is located in"
chooseLabel = Label(master, text=chooseText)
chooseLabel.pack(side="top")
diff --git a/freemocap/session.py b/freemocap/session.py
index 5eceff83..b2e19f3e 100644
--- a/freemocap/session.py
+++ b/freemocap/session.py
@@ -39,8 +39,17 @@ class Session: #self like "recording self"
When starting a session from stage 1, create all the file paths necessary, and create a session dictionary to save settings.
Calls the create_session_paths and create_session_dictionary function
"""
- dataFolderPath = self.basePath/self.dataFolderName
+ #dataFolderPath = self.basePath/self.dataFolderName
+
+
+ if self.basePath.stem == self.dataFolderName: #don't recursively craete 'FreeMoCap_Data' folders!
+ dataFolderPath = self.basePath
+ else:
+ dataFolderPath = self.basePath/self.dataFolderName
+
dataFolderPath.mkdir(exist_ok= True)
+
+
self.sessionPath = dataFolderPath/self.sessionID
self.sessionPath.mkdir(exist_ok=True)
@@ -151,6 +160,8 @@ class Session: #self like "recording self"
self.sessionPath = self.dataFolderPath/self.sessionID
self.sessionPath.mkdir(exist_ok=True)
+
+
self.session_yaml_path = self.sessionPath/'{}_config.yaml'.format(self.sessionID)
# if stage == 3: