Skip to content

Commit 90b0759

Browse files
authored
Merge branch 'develop' into build-improvements
Signed-off-by: tedwaine <59868698+tedwaine@users.noreply.github.com>
2 parents 21debc3 + 2f5377c commit 90b0759

25 files changed

Lines changed: 5618 additions & 11 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ if (USE_VCPKG)
216216
message(FATAL_ERROR "Failed to ensurepip.")
217217
else()
218218
execute_process(
219-
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy
219+
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy fileseq
220220
RESULT_VARIABLE PIP_RESULT
221221
)
222222
if(PIP_RESULT)

include/xstudio/ui/canvas/stroke.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ namespace ui {
7777
bool fade(const float fade_amount);
7878

7979
[[nodiscard]] float opacity() const { return _opacity; }
80+
void set_opacity(const float o) { _opacity = o; }
81+
void set_colour(const utility::ColourTriplet &c) { _colour = c; }
8082
[[nodiscard]] float thickness() const { return _thickness; }
8183
[[nodiscard]] float softness() const { return _softness; }
8284
[[nodiscard]] float size_sensitivity() const { return _size_sensitivity; }

src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ nlohmann::json populate_stream(AVFormatContext *avfc, int index, MediaStream *is
444444
result["profile"] = nullptr;
445445
if (profile = avcodec_profile_name(par->codec_id, par->profile))
446446
result["profile"] = profile;
447-
else if (par->profile != FF_PROFILE_UNKNOWN) {
447+
else if (par->profile != AV_PROFILE_UNKNOWN) {
448448
result["profile"] = std::to_string(par->profile);
449449
}
450450

src/plugin/python_plugins/annotations_exporter/annotations_exporter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def attribute_changed(self, attr, role):
159159
if attr == self.scope:
160160
if self.scope.value() in ["Current Media", "Current Frame"]:
161161
self.user_name.set_value(
162-
self.connection.api.session.viewed_container.playhead.on_screen_media.name
162+
self.current_playhead().on_screen_media.name
163163
)
164164
elif self.scope.value() == "Current Playlist / Timeline":
165165
self.user_name.set_value(
@@ -232,7 +232,7 @@ def do_export(self, scope, export_type, user_name, output_folder, file_type, res
232232
elif scope == "Current Media":
233233

234234
self.export_media_annotations(
235-
self.connection.api.session.viewed_container.playhead.on_screen_media
235+
self.current_playhead().on_screen_media
236236
)
237237

238238
elif scope == "Current Playlist / Timeline":
@@ -254,7 +254,7 @@ def do_export(self, scope, export_type, user_name, output_folder, file_type, res
254254
gp_file_path = self.__output_folder + "/greasePencil.xml"
255255
self.make_greaspencil_xml_file(
256256
gp_file_path,
257-
self.connection.api.session.viewed_container.playhead.on_screen_media.media_source().rate.fps()
257+
self.current_playhead().on_screen_media.media_source().rate.fps()
258258
)
259259
# now we zip the folder
260260
final_name = shutil.make_archive(self.__output_folder + "/" + self.user_name.value(), 'zip', __tmp_folder)
@@ -314,8 +314,8 @@ def export_frame(self, idx, frame, duration, bookmark, media):
314314

315315
def export_bookmark_on_current_frame(self):
316316

317-
m = self.connection.api.session.viewed_container.playhead.on_screen_media
318-
current_frame = self.connection.api.session.viewed_container.playhead.attributes['Media Logical Frame'].value()
317+
m = self.current_playhead().on_screen_media
318+
current_frame = self.current_playhead().attributes['Media Logical Frame'].value()
319319
bookmarks = m.ordered_bookmarks()
320320
bookmark = None
321321
for bm in bookmarks:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .filesystem_browser import create_plugin_instance
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"extensions": [
3+
".mov",
4+
".mp4",
5+
".mkv",
6+
".exr",
7+
".jpg",
8+
".jpeg",
9+
".png",
10+
".dpx",
11+
".tiff",
12+
".tif",
13+
".wav",
14+
".mp3",
15+
".pdf"
16+
],
17+
"ignore_dirs": [
18+
".git",
19+
".quarantine",
20+
"eryx_unreal_plugin",
21+
".DS_Store"
22+
],
23+
"root_ignore_dirs": [
24+
"/Applications",
25+
"/bin",
26+
"/cores",
27+
"/dev",
28+
"/etc",
29+
"/Library",
30+
"/opt",
31+
"/private",
32+
"/sbin",
33+
"/System",
34+
"/usr",
35+
"/var",
36+
"/proc",
37+
"/sys",
38+
"/snap"
39+
],
40+
"max_recursion_depth": 6,
41+
"auto_scan_threshold": 4
42+
}

0 commit comments

Comments
 (0)