Procházet zdrojové kódy

Sujith :) ->
1. Refactoring the folder structure
2. Added documentation

Sujith:) před 17 hodinami
rodič
revize
58d107df1e

+ 4 - 4
Assets/LLM/Editor/DataExtractorMenu.cs

@@ -7,10 +7,10 @@ namespace LLM.Editor
 {
     public static class DataExtractorMenu
     {
-        private const string HighLevelScript = "Assets/LLM/source/extract_high_level.py";
-        private const string MidLevelScript = "Assets/LLM/source/extract_mid_level.py";
-        private const string LowLevelScript = "Assets/LLM/source/extract_low_level.py";
-        private const string CreateConfigScript = "Assets/LLM/source/create_config.py";
+        private const string HighLevelScript = "Assets/LLM/source/orchestrators/extract_high_level.py";
+        private const string MidLevelScript = "Assets/LLM/source/orchestrators/extract_mid_level.py";
+        private const string LowLevelScript = "Assets/LLM/source/orchestrators/extract_low_level.py";
+        private const string CreateConfigScript = "Assets/LLM/source/orchestrators/create_config.py";
 
         [MenuItem("Tools/DataExtractor/High Level Export")]
         private static void ExportHighLevel()

+ 8 - 0
Assets/LLM/source/orchestrators.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4f10920b60c854f85801f50482dee485
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
Assets/LLM/source/create_config.py

@@ -1,8 +1,8 @@
 import sys
 from pathlib import Path
 
-# Add the utils directory to the Python path
-utils_path = Path(__file__).parent / 'utils'
+# Add the parent directory to the Python path to find utils
+utils_path = Path(__file__).parent.parent / 'utils'
 sys.path.append(str(utils_path))
 
 from config_utils import load_config, get_config_path

Assets/LLM/source/create_config.py.meta → Assets/LLM/source/orchestrators/create_config.py.meta


+ 2 - 2
Assets/LLM/source/extract_high_level.py

@@ -6,8 +6,8 @@ import sys
 import json
 from pathlib import Path
 
-# Add the utils directory to the Python path
-utils_path = Path(__file__).parent / 'utils'
+# Add the parent directory to the Python path to find utils
+utils_path = Path(__file__).parent.parent / 'utils'
 sys.path.append(str(utils_path))
 
 from yaml_utils import load_unity_yaml, convert_to_plain_python_types

Assets/LLM/source/extract_high_level.py.meta → Assets/LLM/source/orchestrators/extract_high_level.py.meta


+ 3 - 3
Assets/LLM/source/extract_low_level.py

@@ -4,15 +4,15 @@ import subprocess
 import json
 from pathlib import Path
 
-# Add the utils directory to the Python path
-utils_path = Path(__file__).parent / 'utils'
+# Add the parent directory to the Python path to find utils
+utils_path = Path(__file__).parent.parent / 'utils'
 sys.path.append(str(utils_path))
 
 from config_utils import load_config
 
 def run_subprocess(script_name, input_dir, output_dir, indent=None, shrink=False, ignored_folders=None):
     """Helper function to run a parser subprocess."""
-    script_path = Path(__file__).parent / "parsers" / script_name
+    script_path = Path(__file__).parent.parent / "parsers" / script_name
     command = [
         sys.executable,
         str(script_path),

Assets/LLM/source/extract_low_level.py.meta → Assets/LLM/source/orchestrators/extract_low_level.py.meta


+ 4 - 3
Assets/LLM/source/extract_mid_level.py

@@ -4,9 +4,10 @@ import json
 import shutil
 from pathlib import Path
 
-# Add the utils directory to the Python path
-utils_path = Path(__file__).parent / 'utils'
-sys.path.append(str(utils_path))
+# Add parent directories to the Python path to find utils and parsers
+source_path = Path(__file__).parent.parent
+sys.path.append(str(source_path / 'utils'))
+sys.path.append(str(source_path / 'parsers'))
 
 from file_utils import replicate_directory_structure, find_files_by_extension, create_guid_to_path_map
 from json_utils import write_json

Assets/LLM/source/extract_mid_level.py.meta → Assets/LLM/source/orchestrators/extract_mid_level.py.meta


+ 8 - 0
Assets/LLM/source/parsers/__pycache__.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cf6058f71c64947598a2fe7b743f8ad0
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

binární
Assets/LLM/source/parsers/__pycache__/scene_processor.cpython-313.pyc


+ 7 - 0
Assets/LLM/source/parsers/__pycache__/scene_processor.cpython-313.pyc.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d70bcf214fb8b4ea78390ff52c8ea1f2
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
Assets/LLM/source/scene_processor.py

@@ -3,8 +3,8 @@ import sys
 import json
 from pathlib import Path
 
-# Add the utils directory to the Python path
-utils_path = Path(__file__).parent / 'utils'
+# Add the parent directory to the Python path to find utils
+utils_path = Path(__file__).parent.parent / 'utils'
 sys.path.append(str(utils_path))
 
 from yaml_utils import load_unity_yaml, convert_to_plain_python_types

Assets/LLM/source/scene_processor.py.meta → Assets/LLM/source/parsers/scene_processor.py.meta