|
| 1 | +# Filesystem Browser Plugin for xStudio |
| 2 | + |
| 3 | +A high-performance, multi-threaded filesystem browser for xStudio, designed to handle large directories and image sequences efficiently. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Fast Multi-threaded Scanning**: Uses a thread pool and BFS algorithm to scan directories quickly without freezing the UI. |
| 8 | +- **Image Sequence Detection**: Automatically detects and groups file sequences (e.g., `shot_001.1001.exr` -> `shot_001.####.exr`). Supports exclusion of specific extensions (e.g., `.mov`, `.mp4`) via configuration. |
| 9 | +- **Smart Filtering**: |
| 10 | + - **Text Filter**: Supports "AND" logic (space-separated terms). E.g., `comp exr` finds files matchings both "comp" and "exr". |
| 11 | + - **Time Filter**: Filter by modification time (Last 1 day, 1 week, etc.). |
| 12 | + - **Version Filter**: Filter to show only the latest version or latest 2 versions of a shot. |
| 13 | +- **Navigation**: |
| 14 | + - Native Directory Picker integration. |
| 15 | + - Path completion/suggestions. |
| 16 | + - History tracking (via sticky attributes). |
| 17 | +- **Playback Integration**: |
| 18 | + - **Double-Click**: Loads media and immediately starts playback using the playlist's playhead logic. |
| 19 | + - **Context Menu**: |
| 20 | + - **Replace**: Replaces the currently viewed media with the selected item. |
| 21 | + - **Compare with**: Loads the selected item and sets up an A/B comparison with the current media. |
| 22 | + |
| 23 | +## Usage |
| 24 | + |
| 25 | +1. **Open the Browser**: |
| 26 | + - Go to `View` -> `Panels` -> `Filesystem Browser`. |
| 27 | + - Or use the hotkey **'B'**. |
| 28 | +2. **Navigation**: |
| 29 | + - Enter a path in the text field or click the folder icon to browse. |
| 30 | + - **Double-click** a folder to navigate into it. |
| 31 | + - **Quick Access (▼)**: Click the arrow next to the path field to open the Quick Access list. |
| 32 | + - **History**: Shows recently visited directories. |
| 33 | + - **Pinned**: Shows your pinned locations for easy access. |
| 34 | + - **Pinning**: Click the "Pin" icon (📌) next to any item to pin or unpin it. Pinned items appear at the top in gold. |
| 35 | + |
| 36 | +## Configuration |
| 37 | + |
| 38 | +### Environment Variables |
| 39 | + |
| 40 | +- `XSTUDIO_BROWSER_PINS`: Pre-define a list of pinned directories. |
| 41 | + - Format: JSON list of objects or simple path string (colon-separated on Unix, semicolon on Windows). |
| 42 | + - Example (JSON): `'[{"name": "Show", "path": "/jobs/show"}, "/home/user"]'` |
| 43 | + - Example (Simple): `/jobs/show:/home/user` |
| 44 | + |
| 45 | +3. **Loading Media**: |
| 46 | + - **Double-click** a file/sequence to load it into the current or new playlist. |
| 47 | + - **Right-click** for advanced actions (Replace, Compare). |
| 48 | + |
| 49 | +## Logic & Performance |
| 50 | + |
| 51 | +- **Scanning**: The scanner runs in a background thread, reporting partial results to the UI to keep it responsive. |
| 52 | +- **Sequences**: Uses the `fileseq` library (for robust sequence parsing. |
| 53 | + |
| 54 | +## Testing |
| 55 | + |
| 56 | +A benchmark script is included to test the scanner performance: |
| 57 | + |
| 58 | +```bash |
| 59 | +python scanner_benchmark.py --threads 2 /shots/MYSHOW/MYSHOT |
| 60 | +``` |
| 61 | + |
| 62 | +This allows you to test the scanning performance at different thread speeds for the specified directory. |
| 63 | + |
| 64 | +```bash |
| 65 | +python test_scanner.py |
| 66 | +``` |
| 67 | +Unit test for scanner. |
| 68 | + |
0 commit comments