From 19b826dea6fe0548405d8c37985e454e8463713f Mon Sep 17 00:00:00 2001 From: MrFruitDude <130157411+MrFruitDude@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:40:26 -0400 Subject: [PATCH 01/11] fix: reapply timeline horizontal wheel scrolling on develop (#220) --- .../panels/timeline/XsTimeline.qml | 56 ++++++++++++++++--- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/ui/qml/xstudio/application/panels/timeline/XsTimeline.qml b/ui/qml/xstudio/application/panels/timeline/XsTimeline.qml index 3424d8678..4c23f070a 100644 --- a/ui/qml/xstudio/application/panels/timeline/XsTimeline.qml +++ b/ui/qml/xstudio/application/panels/timeline/XsTimeline.qml @@ -1399,6 +1399,43 @@ Rectangle { property var initialValue: 0 property real minScaleX: 0 + function wheelDelta(pixelDelta, angleDelta) { + return pixelDelta !== 0 ? pixelDelta : angleDelta + } + + function scrollTimelineHorizontally(deltaX) { + let stackItem = list_view.itemAtIndex(0) + if( + !stackItem || + Math.abs(deltaX) < 1 || + stackItem.scrollbar.size >= 1.0 || + stackItem.scrollbar.width <= 0 + ) { + return false + } + + let positionDelta = (stackItem.scrollbar.size / stackItem.scrollbar.width) * deltaX + stackItem.jumpToPosition(stackItem.currentPosition() + positionDelta) + return true + } + + function scrollTimelineVertically(deltaY) { + if( + hovered == null || + Math.abs(deltaY) < 1 || + !["Video Track", "Audio Track", "Gap", "Clip"].includes(hovered.itemTypeRole) + ) { + return false + } + + if(["Video Track", "Audio Track"].includes(hovered.itemTypeRole)) + hovered.parentLV.flick(0, deltaY > 0 ? 500 : -500) + else if(["Gap", "Clip"].includes(hovered.itemTypeRole)) + hovered.parentLV.parentLV.flick(0, deltaY > 0 ? 500 : -500) + + return true + } + Rectangle { id: region visible: ma.isRegionSelection @@ -1608,16 +1645,18 @@ Rectangle { } onWheel: wheel => { + let deltaX = wheelDelta(wheel.pixelDelta.x, wheel.angleDelta.x) + let deltaY = wheelDelta(wheel.pixelDelta.y, wheel.angleDelta.y) // maintain position as we zoom.. if(wheel.modifiers == Qt.ShiftModifier) { // wheel.angleDelta.y always return 0 on MacOS laptops // when SHIFT is pressed and a mouse wheel is used, but in // that case the x component is updating and usable. - let deltaY = wheel.angleDelta.y == 0 ? wheel.angleDelta.x : wheel.angleDelta.y + let zoomDelta = deltaY == 0 ? deltaX : deltaY // Limit the scale to keep it within a usable range and // avoid a negative scaleY value. - if(deltaY > 1) { + if(zoomDelta > 1) { scaleY = Math.min(2.0, scaleY + 0.2) } else { scaleY = Math.max(0.6, scaleY - 0.2) @@ -1625,7 +1664,8 @@ Rectangle { wheel.accepted = true } else if(wheel.modifiers == Qt.ControlModifier) { let tmp = scaleX - if(wheel.angleDelta.y > 1) { + let zoomDelta = deltaY == 0 ? deltaX : deltaY + if(zoomDelta > 1) { tmp += 0.2 } else { tmp -= 0.2 @@ -1633,11 +1673,9 @@ Rectangle { scaleX = Math.max((list_view.width - trackHeaderWidth) / theSessionData.timelineRect([timeline_items.rootIndex]).width, tmp) list_view.itemAtIndex(0).jumpToFrame(timelinePlayhead.logicalFrame, ListView.Center) wheel.accepted = true - } else if(hovered != null && ["Video Track", "Audio Track","Gap","Clip"].includes(hovered.itemTypeRole)) { - if(["Video Track", "Audio Track"].includes(hovered.itemTypeRole)) - hovered.parentLV.flick(0, wheel.angleDelta.y > 1 ? 500 : -500) - else if(["Gap", "Clip"].includes(hovered.itemTypeRole)) - hovered.parentLV.parentLV.flick(0, wheel.angleDelta.y > 1 ? 500 : -500) + } else if(Math.abs(deltaX) > Math.abs(deltaY)) { + wheel.accepted = scrollTimelineHorizontally(deltaX) + } else if(scrollTimelineVertically(deltaY)) { wheel.accepted = true } else { wheel.accepted = false @@ -2232,4 +2270,4 @@ Rectangle { // } // } -} \ No newline at end of file +} From 6159d6b1f7c5f23546f3ee186c4b002e05bd4253 Mon Sep 17 00:00:00 2001 From: julien hery Date: Mon, 27 Apr 2026 07:00:13 -0400 Subject: [PATCH 02/11] Fix annotation export crash when viewed container is a Subset (#244) The annotations exporter accessed the playhead via session.viewed_container.playhead, which assumes the viewed container is always a Playlist. When media is loaded by a Python plugin (e.g. rdo_browser) that sets the viewer to a Subset, this crashes with "'Subset' object has no attribute 'playhead'" because the Subset class does not expose a playhead property. Replace all 5 call sites with self.current_playhead(), which is provided by PluginBase and returns the active playhead regardless of the viewed container type. --- .../annotations_exporter/annotations_exporter.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugin/python_plugins/annotations_exporter/annotations_exporter.py b/src/plugin/python_plugins/annotations_exporter/annotations_exporter.py index 2523e19a5..94b4fca43 100644 --- a/src/plugin/python_plugins/annotations_exporter/annotations_exporter.py +++ b/src/plugin/python_plugins/annotations_exporter/annotations_exporter.py @@ -159,7 +159,7 @@ def attribute_changed(self, attr, role): if attr == self.scope: if self.scope.value() in ["Current Media", "Current Frame"]: self.user_name.set_value( - self.connection.api.session.viewed_container.playhead.on_screen_media.name + self.current_playhead().on_screen_media.name ) elif self.scope.value() == "Current Playlist / Timeline": self.user_name.set_value( @@ -232,7 +232,7 @@ def do_export(self, scope, export_type, user_name, output_folder, file_type, res elif scope == "Current Media": self.export_media_annotations( - self.connection.api.session.viewed_container.playhead.on_screen_media + self.current_playhead().on_screen_media ) elif scope == "Current Playlist / Timeline": @@ -254,7 +254,7 @@ def do_export(self, scope, export_type, user_name, output_folder, file_type, res gp_file_path = self.__output_folder + "/greasePencil.xml" self.make_greaspencil_xml_file( gp_file_path, - self.connection.api.session.viewed_container.playhead.on_screen_media.media_source().rate.fps() + self.current_playhead().on_screen_media.media_source().rate.fps() ) # now we zip the folder 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): def export_bookmark_on_current_frame(self): - m = self.connection.api.session.viewed_container.playhead.on_screen_media - current_frame = self.connection.api.session.viewed_container.playhead.attributes['Media Logical Frame'].value() + m = self.current_playhead().on_screen_media + current_frame = self.current_playhead().attributes['Media Logical Frame'].value() bookmarks = m.ordered_bookmarks() bookmark = None for bm in bookmarks: From 84fb1b3bf474e662ba787f98b027719f9ad59f7d Mon Sep 17 00:00:00 2001 From: kenmcgaugh Date: Thu, 21 May 2026 04:54:50 +1200 Subject: [PATCH 03/11] Fix for mouse wheel zooming on HiDPI displays. (#247) Signed-off-by: Ken McGaugh Signed-off-by: Ken McGaugh --- src/ui/qml/viewport/src/qml_viewport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/qml/viewport/src/qml_viewport.cpp b/src/ui/qml/viewport/src/qml_viewport.cpp index 6443eb052..731e733df 100644 --- a/src/ui/qml/viewport/src/qml_viewport.cpp +++ b/src/ui/qml/viewport/src/qml_viewport.cpp @@ -518,10 +518,10 @@ void QMLViewport::wheelEvent(QWheelEvent *event) { PointerEvent ev( EventType::MouseWheel, static_cast((int)event->buttons()), - event->position().x(), - event->position().y(), - width(), // FIXME should be width, but this function appears to never be called. - height(), // FIXME should be height + int(round(float(event->position().x()) * window()->effectiveDevicePixelRatio())), + int(round(float(event->position().y()) * window()->effectiveDevicePixelRatio())), + int(round(float(width()) * window()->effectiveDevicePixelRatio())), + int(round(float(height()) * window()->effectiveDevicePixelRatio())), qtModifierToOurs(event->modifiers()), renderer_actor ? renderer_actor->std_name() : "", std::make_pair(event->angleDelta().rx(), event->angleDelta().ry()), From f7626aa9d2d9ca6e26eb68ac6bc924fe641e0700 Mon Sep 17 00:00:00 2001 From: Julien Hery Date: Sat, 11 Apr 2026 16:19:45 -0400 Subject: [PATCH 04/11] Add annotation onion skinning viewport overlay plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New self-contained viewport overlay plugin that displays annotations from neighboring frames as semi-transparent, color-tinted overlays on the current frame. Enables reviewers and animators to see annotation progression across frames without scrubbing. Architecture: - HUDPluginBase subclass with configurable frames before/after, opacity falloff, and separate past/future tint colours - Opacity and tint baked directly into copied Canvas items (strokes, captions, shapes), rendered via standard render_canvas() path - Stack order 1.5 (below current annotations at 2.0, above image) - Plugin-local bookmark cache built from frame.bookmarks() during playback — zero core data structure changes - Canvas accessed via public AnnotationBase::user_data() API, no dependency on annotations plugin internals Also adds set_opacity()/set_colour() setters to Stroke, matching the pattern already established by Caption. Signed-off-by: Julien Hery Co-Authored-By: Nicolas Felix --- include/xstudio/ui/canvas/stroke.hpp | 2 + src/plugin/viewport_overlay/CMakeLists.txt | 1 + .../annotation_onion_skin/src/CMakeLists.txt | 15 + .../src/onion_skin_plugin.cpp | 284 ++++++++++++++++++ .../src/onion_skin_plugin.hpp | 57 ++++ .../src/onion_skin_render_data.hpp | 28 ++ .../src/onion_skin_renderer.cpp | 42 +++ .../src/onion_skin_renderer.hpp | 33 ++ .../annotation_onion_skin/test/CMakeLists.txt | 0 9 files changed, 462 insertions(+) create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/CMakeLists.txt create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.cpp create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.hpp create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_render_data.hpp create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.cpp create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.hpp create mode 100644 src/plugin/viewport_overlay/annotation_onion_skin/test/CMakeLists.txt diff --git a/include/xstudio/ui/canvas/stroke.hpp b/include/xstudio/ui/canvas/stroke.hpp index 24d452b4b..d09c4b36d 100644 --- a/include/xstudio/ui/canvas/stroke.hpp +++ b/include/xstudio/ui/canvas/stroke.hpp @@ -77,6 +77,8 @@ namespace ui { bool fade(const float fade_amount); [[nodiscard]] float opacity() const { return _opacity; } + void set_opacity(const float o) { _opacity = o; } + void set_colour(const utility::ColourTriplet &c) { _colour = c; } [[nodiscard]] float thickness() const { return _thickness; } [[nodiscard]] float softness() const { return _softness; } [[nodiscard]] float size_sensitivity() const { return _size_sensitivity; } diff --git a/src/plugin/viewport_overlay/CMakeLists.txt b/src/plugin/viewport_overlay/CMakeLists.txt index 25e514562..08ad2a7d4 100644 --- a/src/plugin/viewport_overlay/CMakeLists.txt +++ b/src/plugin/viewport_overlay/CMakeLists.txt @@ -2,5 +2,6 @@ add_src_and_test(basic_viewport_mask) add_src_and_test(annotations) add_src_and_test(audio_waveform) add_src_and_test(media_metadata_hud) +add_src_and_test(annotation_onion_skin) build_studio_plugins("${STUDIO_PLUGINS}") diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/CMakeLists.txt b/src/plugin/viewport_overlay/annotation_onion_skin/src/CMakeLists.txt new file mode 100644 index 000000000..7efd0c18a --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/CMakeLists.txt @@ -0,0 +1,15 @@ + +SET(LINK_DEPS + xstudio::module + xstudio::plugin_manager + xstudio::ui::opengl::viewport + Imath::Imath +) + +find_package(Imath) + +create_plugin_with_alias( + annotation_onion_skin + xstudio::viewport::annotation_onion_skin + ${XSTUDIO_GLOBAL_VERSION} + "${LINK_DEPS}") diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.cpp b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.cpp new file mode 100644 index 000000000..71b2148df --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.cpp @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: Apache-2.0 +#include "onion_skin_plugin.hpp" +#include "onion_skin_render_data.hpp" +#include "onion_skin_renderer.hpp" +#include "xstudio/media_reader/image_buffer.hpp" +#include "xstudio/bookmark/bookmark.hpp" +#include "xstudio/plugin_manager/plugin_base.hpp" +#include "xstudio/utility/blind_data.hpp" + +#include +#include +#include + +using namespace xstudio; +using namespace xstudio::ui::viewport; + +OnionSkinPlugin::OnionSkinPlugin( + caf::actor_config &cfg, const utility::JsonStore &init_settings) + : plugin::HUDPluginBase(cfg, "Annotation Onion Skin", init_settings, 10.0f) { + + frames_before_ = add_integer_attribute("Frames Before", "Before", 3, 0, 20); + add_hud_settings_attribute(frames_before_); + frames_before_->set_tool_tip( + "Maximum frame distance to look back for annotations"); + frames_before_->set_redraw_viewport_on_change(true); + + frames_after_ = add_integer_attribute("Frames After", "After", 3, 0, 20); + add_hud_settings_attribute(frames_after_); + frames_after_->set_tool_tip( + "Maximum frame distance to look ahead for annotations"); + frames_after_->set_redraw_viewport_on_change(true); + + base_opacity_ = + add_float_attribute("Base Opacity", "Opacity", 0.4f, 0.05f, 1.0f, 0.05f); + add_hud_settings_attribute(base_opacity_); + base_opacity_->set_tool_tip("Opacity of the nearest neighboring annotation"); + base_opacity_->set_redraw_viewport_on_change(true); + + opacity_falloff_ = + add_float_attribute("Opacity Falloff", "Falloff", 0.5f, 0.1f, 1.0f, 0.05f); + add_hud_settings_attribute(opacity_falloff_); + opacity_falloff_->set_tool_tip( + "Multiplier applied per frame step further from current frame"); + opacity_falloff_->set_redraw_viewport_on_change(true); + + use_original_colours_ = add_boolean_attribute( + "Use Original Colours", "Orig Colours", false); + add_hud_settings_attribute(use_original_colours_); + use_original_colours_->set_tool_tip( + "When enabled, keep annotation colours and only reduce opacity. " + "When disabled, tint with Previous/Next colours."); + use_original_colours_->set_redraw_viewport_on_change(true); + + past_tint_ = add_colour_attribute( + "Previous Tint", "Prev Tint", utility::ColourTriplet(1.0f, 0.3f, 0.3f)); + add_hud_settings_attribute(past_tint_); + past_tint_->set_tool_tip("Tint colour for annotations from previous frames"); + past_tint_->set_redraw_viewport_on_change(true); + + future_tint_ = add_colour_attribute( + "Next Tint", "Next Tint", utility::ColourTriplet(0.3f, 1.0f, 0.3f)); + add_hud_settings_attribute(future_tint_); + future_tint_->set_tool_tip("Tint colour for annotations from future frames"); + future_tint_->set_redraw_viewport_on_change(true); + + add_hud_description( + "Shows annotations from neighboring frames as semi-transparent, " + "color-tinted overlays on the current frame."); + + frames_before_->set_preference_path("/plugin/annotation_onion_skin/frames_before"); + frames_after_->set_preference_path("/plugin/annotation_onion_skin/frames_after"); + base_opacity_->set_preference_path("/plugin/annotation_onion_skin/base_opacity"); + opacity_falloff_->set_preference_path("/plugin/annotation_onion_skin/opacity_falloff"); + use_original_colours_->set_preference_path("/plugin/annotation_onion_skin/use_original_colours"); + past_tint_->set_preference_path("/plugin/annotation_onion_skin/past_tint"); + future_tint_->set_preference_path("/plugin/annotation_onion_skin/future_tint"); +} + +plugin::ViewportOverlayRendererPtr +OnionSkinPlugin::make_overlay_renderer(const std::string & /*viewport_name*/) { + return plugin::ViewportOverlayRendererPtr(new OnionSkinRenderer()); +} + +utility::BlindDataObjectPtr OnionSkinPlugin::onscreen_render_data( + const media_reader::ImageBufPtr &image, + const std::string & /*viewport_name*/, + const utility::Uuid & /*playhead_uuid*/, + const bool /*is_hero_image*/, + const bool /*images_are_in_grid_layout*/) const { + + if (!visible() || !image) + return {}; + + const int current_frame = image.playhead_logical_frame(); + const int range_before = static_cast(frames_before_->value()); + const int range_after = static_cast(frames_after_->value()); + const float base_opac = base_opacity_->value(); + const float falloff = opacity_falloff_->value(); + const bool orig_colours = use_original_colours_->value(); + const auto &prev_colour = past_tint_->value(); + const auto &next_colour = future_tint_->value(); + + if (range_before == 0 && range_after == 0) + return {}; + + // ── Update bookmark cache ── + // image.bookmarks() carries bookmarks covering the current frame. + // We cache them keyed by logical frame to find neighbors later. + // + // Invalidation: when revisiting a frame, if its bookmarks changed + // (different UUIDs or count), we clear the entire cache. This handles + // bookmark deletion, media changes, and bookmark additions. + const auto &frame_bookmarks = image.bookmarks(); + { + std::lock_guard lock(cache_mutex_); + + auto it = frame_bookmark_cache_.find(current_frame); + if (it != frame_bookmark_cache_.end()) { + bool changed = (it->second.size() != frame_bookmarks.size()); + if (!changed) { + for (size_t i = 0; i < it->second.size(); ++i) { + if (it->second[i]->detail_.uuid_ != + frame_bookmarks[i]->detail_.uuid_) { + changed = true; + break; + } + } + } + if (changed) { + frame_bookmark_cache_.clear(); + } + } + + if (!frame_bookmarks.empty()) { + frame_bookmark_cache_[current_frame] = frame_bookmarks; + } else { + frame_bookmark_cache_.erase(current_frame); + } + } + + // Collect current frame's annotation pointers — skip these when + // walking neighbors (same annotation spans multiple frames). + std::set current_annotations; + for (const auto &bm : frame_bookmarks) { + if (bm && bm->annotation_ && bm->annotation_->user_data()) + current_annotations.insert(bm->annotation_->user_data()); + } + + // ── Helpers ── + auto tint_colour = [](const utility::ColourTriplet &c, + const utility::ColourTriplet &tint) -> utility::ColourTriplet { + return {c.r * tint.r, c.g * tint.g, c.b * tint.b}; + }; + + auto make_canvas_copy = [&](const ui::canvas::Canvas &src, float opacity, + const utility::ColourTriplet &tint, + bool keep_original) -> ui::canvas::Canvas { + ui::canvas::Canvas out(src); + for (auto it = out.begin(); it != out.end(); ++it) { + auto item = *it; + std::visit( + [&](auto &v) { + using T = std::decay_t; + if constexpr (std::is_same_v) { + v.set_opacity(v.opacity() * opacity); + if (!keep_original) + v.set_colour(tint_colour(v.colour(), tint)); + } else if constexpr (std::is_same_v) { + v.set_opacity(v.opacity() * opacity); + v.set_bg_opacity(v.background_opacity() * opacity); + if (!keep_original) + v.set_colour(tint_colour(v.colour(), tint)); + } else { + v.opacity *= opacity; + if (!keep_original) + v.colour = tint_colour(v.colour, tint); + } + }, + item); + out.overwrite_item(it, item); + } + return out; + }; + + // Opacity falls off with distance: nearest = base_opac, farther = less. + auto compute_opacity = [&](int distance) -> float { + return base_opac * std::pow(falloff, static_cast(distance - 1)); + }; + + // ── Find neighbor annotations from cache (distance-bounded) ── + struct Candidate { + const ui::canvas::Canvas *canvas; + int abs_distance; + float opacity; + utility::ColourTriplet tint; + }; + std::vector candidates; + + { + std::lock_guard lock(cache_mutex_); + + // Walk backward — stop when distance exceeds range_before. + if (range_before > 0) { + auto it = frame_bookmark_cache_.lower_bound(current_frame); + if (it != frame_bookmark_cache_.begin()) { + auto pit = it; + while (pit != frame_bookmark_cache_.begin()) { + --pit; + int dist = current_frame - pit->first; + if (dist > range_before) + break; + for (const auto &bm : pit->second) { + if (!bm || !bm->annotation_ || !bm->annotation_->user_data()) + continue; + const auto *canvas = static_cast( + bm->annotation_->user_data()); + if (!canvas || canvas->empty()) + continue; + if (current_annotations.count(canvas)) + continue; + candidates.push_back( + {canvas, dist, compute_opacity(dist), prev_colour}); + break; + } + } + } + } + + // Walk forward — stop when distance exceeds range_after. + if (range_after > 0) { + auto it = frame_bookmark_cache_.upper_bound(current_frame); + while (it != frame_bookmark_cache_.end()) { + int dist = it->first - current_frame; + if (dist > range_after) + break; + for (const auto &bm : it->second) { + if (!bm || !bm->annotation_ || !bm->annotation_->user_data()) + continue; + const auto *canvas = static_cast( + bm->annotation_->user_data()); + if (!canvas || canvas->empty()) + continue; + if (current_annotations.count(canvas)) + continue; + candidates.push_back( + {canvas, dist, compute_opacity(dist), next_colour}); + break; + } + ++it; + } + } + } + + if (candidates.empty()) + return {}; + + // Render farthest first so closest onion skin draws on top. + std::sort(candidates.begin(), candidates.end(), + [](const auto &a, const auto &b) { return a.abs_distance > b.abs_distance; }); + + std::vector canvases; + canvases.reserve(candidates.size()); + for (const auto &c : candidates) { + canvases.push_back(make_canvas_copy(*c.canvas, c.opacity, c.tint, orig_colours)); + } + + return std::make_shared(std::move(canvases)); +} + + +extern "C" { +plugin_manager::PluginFactoryCollection *plugin_factory_collection_ptr() { + return new plugin_manager::PluginFactoryCollection( + std::vector>( + {std::make_shared>( + OnionSkinPlugin::PLUGIN_UUID, + "AnnotationOnionSkin", + plugin_manager::PluginFlags::PF_HEAD_UP_DISPLAY | + plugin_manager::PluginFlags::PF_VIEWPORT_OVERLAY, + true, + "RodeoFX", + "Annotation Onion Skinning Overlay")})); +} +} diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.hpp b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.hpp new file mode 100644 index 000000000..ed1fc6fa4 --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_plugin.hpp @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include + +#include "xstudio/bookmark/bookmark.hpp" +#include "xstudio/plugin_manager/hud_plugin.hpp" +#include "xstudio/ui/canvas/canvas.hpp" + +namespace xstudio { +namespace ui { + namespace viewport { + + class OnionSkinRenderer; + + class OnionSkinPlugin : public plugin::HUDPluginBase { + public: + inline static const utility::Uuid PLUGIN_UUID{ + "b7e3a1c0-5d4f-4e8b-9a2c-1f6d8e0b3c5a"}; + + OnionSkinPlugin( + caf::actor_config &cfg, const utility::JsonStore &init_settings); + + ~OnionSkinPlugin() override = default; + + protected: + utility::BlindDataObjectPtr onscreen_render_data( + const media_reader::ImageBufPtr &image, + const std::string &viewport_name, + const utility::Uuid &playhead_uuid, + const bool is_hero_image, + const bool images_are_in_grid_layout) const override; + + plugin::ViewportOverlayRendererPtr + make_overlay_renderer(const std::string &viewport_name) override; + + private: + module::IntegerAttribute *frames_before_; + module::IntegerAttribute *frames_after_; + module::FloatAttribute *base_opacity_; + module::FloatAttribute *opacity_falloff_; + module::BooleanAttribute *use_original_colours_; + module::ColourAttribute *past_tint_; + module::ColourAttribute *future_tint_; + + // Bookmark cache: built from image.bookmarks() as user scrubs. + // Invalidated when bookmarks change (detected by comparing + // bookmark UUIDs for revisited frames). + mutable std::mutex cache_mutex_; + mutable std::map frame_bookmark_cache_; + }; + + } // namespace viewport +} // namespace ui +} // namespace xstudio diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_render_data.hpp b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_render_data.hpp new file mode 100644 index 000000000..1bfcf3f56 --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_render_data.hpp @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include + +#include "xstudio/ui/canvas/canvas.hpp" +#include "xstudio/utility/blind_data.hpp" + + +namespace xstudio { +namespace ui { + namespace viewport { + + // Each neighbor canvas has opacity and tint baked into its items, + // so it can be rendered directly with no FBO compositing. + class OnionSkinRenderData : public utility::BlindDataObject { + public: + OnionSkinRenderData() = default; + explicit OnionSkinRenderData(std::vector c) + : canvases(std::move(c)) {} + ~OnionSkinRenderData() override = default; + + std::vector canvases; // farthest-to-nearest order + }; + + } // namespace viewport +} // namespace ui +} // namespace xstudio diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.cpp b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.cpp new file mode 100644 index 000000000..932c04be2 --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.cpp @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: Apache-2.0 +#include "onion_skin_renderer.hpp" +#include "onion_skin_plugin.hpp" +#include "onion_skin_render_data.hpp" +#include "xstudio/media_reader/image_buffer.hpp" +#include "xstudio/utility/blind_data.hpp" + +using namespace xstudio; +using namespace xstudio::ui::viewport; + + +void OnionSkinRenderer::render_image_overlay( + const Imath::M44f &transform_window_to_viewport_space, + const Imath::M44f &transform_viewport_to_image_space, + const float viewport_du_dpixel, + const float device_pixel_ratio, + const xstudio::media_reader::ImageBufPtr &frame) { + + auto blind = frame.plugin_blind_data(OnionSkinPlugin::PLUGIN_UUID); + const auto *render_data = + dynamic_cast(blind.get()); + if (!render_data || render_data->canvases.empty()) + return; + + if (!canvas_renderer_) + canvas_renderer_ = std::make_unique(); + + const float img_aspect = media_reader::image_aspect(frame); + + // Opacity and tint are already baked into each canvas's items, + // so we just render them directly — no FBO needed. + for (const auto &canvas : render_data->canvases) { + canvas_renderer_->render_canvas( + canvas, + transform_window_to_viewport_space, + transform_viewport_to_image_space, + viewport_du_dpixel, + device_pixel_ratio, + img_aspect, + false); // don't hide strokes + } +} diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.hpp b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.hpp new file mode 100644 index 000000000..408ea6fb3 --- /dev/null +++ b/src/plugin/viewport_overlay/annotation_onion_skin/src/onion_skin_renderer.hpp @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include + +#include "xstudio/plugin_manager/plugin_base.hpp" +#include "xstudio/ui/opengl/opengl_canvas_renderer.hpp" + +namespace xstudio { +namespace ui { + namespace viewport { + + class OnionSkinRenderer : public plugin::ViewportOverlayRenderer { + + public: + OnionSkinRenderer() = default; + + void render_image_overlay( + const Imath::M44f &transform_window_to_viewport_space, + const Imath::M44f &transform_viewport_to_image_space, + const float viewport_du_dpixel, + const float device_pixel_ratio, + const xstudio::media_reader::ImageBufPtr &frame) override; + + float stack_order() const override { return 1.5f; } + + private: + std::unique_ptr canvas_renderer_; + }; + + } // namespace viewport +} // namespace ui +} // namespace xstudio diff --git a/src/plugin/viewport_overlay/annotation_onion_skin/test/CMakeLists.txt b/src/plugin/viewport_overlay/annotation_onion_skin/test/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb From 2f5377c4b9f394776649c29329281bc067ad365e Mon Sep 17 00:00:00 2001 From: Sam Richards Date: Wed, 20 May 2026 18:06:06 +0100 Subject: [PATCH 05/11] FEATURE - Filesystem plugin browser (#198) * Add numpy to pip installed packages Signed-off-by: Ted Waine Signed-off-by: Sam.Richards@taurich.org * Tweak for set video range action Signed-off-by: Ted Waine Signed-off-by: Sam.Richards@taurich.org * Handle missing Decklink hardware when drivers are installed (#238) Signed-off-by: xShirae Signed-off-by: Ted Waine Signed-off-by: Sam.Richards@taurich.org * Initial checkin of filesystem_plugin prior to refactor. Signed-off-by: Sam.Richards@taurich.org * A ffmpeg constant changed, I believe the older one FF_PROFILE_UNKOWN has been obsolete for a while. Signed-off-by: Sam.Richards@taurich.org * Cleanup GUI Better filtering, got progress bar working, and version and date filtering. Signed-off-by: Sam.Richards@taurich.org * Adding fileseq for the python libraries for the FileSystem Browser. Signed-off-by: Sam.Richards@taurich.org * Got the progress bar to work correctly. Also added a separate timing test where you can specify an output directory, not really for unit testing, but good for testing against real directories. Signed-off-by: Sam.Richards@taurich.org * Fix for color scheme for right click menu. Signed-off-by: Sam.Richards@taurich.org * Add readme. Signed-off-by: Sam.Richards@taurich.org * Adding copyright/license info. Signed-off-by: Sam.Richards@taurich.org * Adding (c). Signed-off-by: Sam.Richards@taurich.org * Dont be quite so agressive updating the UI, only do it every 5 secs or so. Signed-off-by: Sam.Richards@taurich.org * Swapped file-browser with a history view. Signed-off-by: Sam.Richards@taurich.org * Updated readme. Signed-off-by: Sam.Richards@taurich.org * Fixing QML issue. Signed-off-by: Sam.Richards@taurich.org * Demo of widget as a floating window. Signed-off-by: Sam.Richards@taurich.org * Filtering fixes. Signed-off-by: Sam.Richards@taurich.org * Switched to a tree-view with some "smart" collapsing of directories. Signed-off-by: Sam.Richards@taurich.org * Fixed the file-loading issue, it was trying to load a relative path. Signed-off-by: Sam.Richards@taurich.org * Double clicking on a directory changes the overall search window path. Signed-off-by: Sam.Richards@taurich.org * Make the search case insensitive. Signed-off-by: Sam.Richards@taurich.org * Adding different types of tree view. and recursion depths. Signed-off-by: Sam.Richards@taurich.org * Minor tweak to prune empty folders if we are filtering. Signed-off-by: Sam.Richards@taurich.org * Adding a directory view. The directory view allows a more obvious browsing of the tree. For the very top of the directory tree we dont auto-scan for media, once you get down to 4 levels it will start scanning. We have also made a config.json file to store configurations of things like the auto_scan_threashold, along with adding a list of folders that need to be ignored. Signed-off-by: Sam.Richards@taurich.org * Filtering all the time. Signed-off-by: Sam.Richards@taurich.org * GUI update: * Fixed auto-complete * Tree view opens to node when path is entered in path dialog. * Added a refresh button * Tree view now persistent, with a nicer sidebar label. * Smart scan button now visible. Signed-off-by: Sam.Richards@taurich.org * Added a preview mode, so when you click on a clip, it will automatically load it into the player * double click will load it into your target * Cursor keys will allow you to move through the results loading as you go (left right for icon view, up down for list view) * Enter will do the same as double click. * Preview playlist will be deleted on Enter. Signed-off-by: Sam.Richards@taurich.org * Updated to have a common style, and synced style with xstudio. Signed-off-by: Sam.Richards@taurich.org * More style fixes, and also making menu options consistent between icon and list view: * Adding Append menu option * Adding copy path menu option * Add compare menu option Signed-off-by: Sam.Richards@taurich.org * Adding a show-in-finder menu option. Signed-off-by: Sam.Richards@taurich.org * MInor bug fixes, cleaning threading. Signed-off-by: Sam.Richards@taurich.org * Some code refactoring to simplify it, in particular the dispatch table. Signed-off-by: Sam.Richards@taurich.org * Setup a interface class, so that if you want to change the back end you have a centralized area to do that. Signed-off-by: Sam.Richards@taurich.org * Removed some debug output and removed an un-necesary header. Signed-off-by: Sam.Richards@taurich.org * Fixed a padding issue. Signed-off-by: Sam.Richards@taurich.org * Added ability to set the directory root. Signed-off-by: Sam.Richards@taurich.org --------- Signed-off-by: Ted Waine Signed-off-by: Sam.Richards@taurich.org Signed-off-by: xShirae Signed-off-by: tedwaine <59868698+tedwaine@users.noreply.github.com> Co-authored-by: Ted Waine Co-authored-by: xShirae <83482842+xShirae@users.noreply.github.com> Co-authored-by: tedwaine <59868698+tedwaine@users.noreply.github.com> --- CMakeLists.txt | 2 +- .../ffprobe/src/ffprobe_lib.cpp | 2 +- .../filesystem_browser/README.md | 68 + .../filesystem_browser/__init__.py | 1 + .../filesystem_browser/config.json | 42 + .../filesystem_browser/filesystem_browser.py | 1514 +++++++++++ .../qml/FilesystemBrowser.1/DirectoryTree.qml | 584 +++++ .../FilesystemBrowser.1/FilesystemBrowser.qml | 2295 +++++++++++++++++ .../FilesystemBrowser.1/XsFileSystemStyle.qml | 39 + .../icons/folder_closed.svg | 38 + .../qml/FilesystemBrowser.1/qmldir | 3 + .../filesystem_browser/scanner.py | 416 +++ .../filesystem_browser/scanner_benchmark.py | 29 + .../filesystem_browser/test_scanner.py | 116 + 14 files changed, 5147 insertions(+), 2 deletions(-) create mode 100644 src/plugin/python_plugins/filesystem_browser/README.md create mode 100644 src/plugin/python_plugins/filesystem_browser/__init__.py create mode 100644 src/plugin/python_plugins/filesystem_browser/config.json create mode 100644 src/plugin/python_plugins/filesystem_browser/filesystem_browser.py create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/DirectoryTree.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/FilesystemBrowser.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/XsFileSystemStyle.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/icons/folder_closed.svg create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/qmldir create mode 100644 src/plugin/python_plugins/filesystem_browser/scanner.py create mode 100644 src/plugin/python_plugins/filesystem_browser/scanner_benchmark.py create mode 100644 src/plugin/python_plugins/filesystem_browser/test_scanner.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed59875e..7531eff9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,7 @@ if (USE_VCPKG) message(FATAL_ERROR "Failed to ensurepip.") else() execute_process( - COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy + COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy fileseq RESULT_VARIABLE PIP_RESULT ) if(PIP_RESULT) diff --git a/src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp b/src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp index 3ae4e994f..0028d5549 100644 --- a/src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp +++ b/src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp @@ -444,7 +444,7 @@ nlohmann::json populate_stream(AVFormatContext *avfc, int index, MediaStream *is result["profile"] = nullptr; if (profile = avcodec_profile_name(par->codec_id, par->profile)) result["profile"] = profile; - else if (par->profile != FF_PROFILE_UNKNOWN) { + else if (par->profile != AV_PROFILE_UNKNOWN) { result["profile"] = std::to_string(par->profile); } diff --git a/src/plugin/python_plugins/filesystem_browser/README.md b/src/plugin/python_plugins/filesystem_browser/README.md new file mode 100644 index 000000000..b69d591ca --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/README.md @@ -0,0 +1,68 @@ +# Filesystem Browser Plugin for xStudio + +A high-performance, multi-threaded filesystem browser for xStudio, designed to handle large directories and image sequences efficiently. + +## Features + +- **Fast Multi-threaded Scanning**: Uses a thread pool and BFS algorithm to scan directories quickly without freezing the UI. +- **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. +- **Smart Filtering**: + - **Text Filter**: Supports "AND" logic (space-separated terms). E.g., `comp exr` finds files matchings both "comp" and "exr". + - **Time Filter**: Filter by modification time (Last 1 day, 1 week, etc.). + - **Version Filter**: Filter to show only the latest version or latest 2 versions of a shot. +- **Navigation**: + - Native Directory Picker integration. + - Path completion/suggestions. + - History tracking (via sticky attributes). +- **Playback Integration**: + - **Double-Click**: Loads media and immediately starts playback using the playlist's playhead logic. + - **Context Menu**: + - **Replace**: Replaces the currently viewed media with the selected item. + - **Compare with**: Loads the selected item and sets up an A/B comparison with the current media. + +## Usage + +1. **Open the Browser**: + - Go to `View` -> `Panels` -> `Filesystem Browser`. + - Or use the hotkey **'B'**. +2. **Navigation**: + - Enter a path in the text field or click the folder icon to browse. + - **Double-click** a folder to navigate into it. + - **Quick Access (▼)**: Click the arrow next to the path field to open the Quick Access list. + - **History**: Shows recently visited directories. + - **Pinned**: Shows your pinned locations for easy access. + - **Pinning**: Click the "Pin" icon (📌) next to any item to pin or unpin it. Pinned items appear at the top in gold. + +## Configuration + +### Environment Variables + +- `XSTUDIO_BROWSER_PINS`: Pre-define a list of pinned directories. + - Format: JSON list of objects or simple path string (colon-separated on Unix, semicolon on Windows). + - Example (JSON): `'[{"name": "Show", "path": "/jobs/show"}, "/home/user"]'` + - Example (Simple): `/jobs/show:/home/user` + +3. **Loading Media**: + - **Double-click** a file/sequence to load it into the current or new playlist. + - **Right-click** for advanced actions (Replace, Compare). + +## Logic & Performance + +- **Scanning**: The scanner runs in a background thread, reporting partial results to the UI to keep it responsive. +- **Sequences**: Uses the `fileseq` library (for robust sequence parsing. + +## Testing + +A benchmark script is included to test the scanner performance: + +```bash +python scanner_benchmark.py --threads 2 /shots/MYSHOW/MYSHOT +``` + +This allows you to test the scanning performance at different thread speeds for the specified directory. + +```bash +python test_scanner.py +``` +Unit test for scanner. + diff --git a/src/plugin/python_plugins/filesystem_browser/__init__.py b/src/plugin/python_plugins/filesystem_browser/__init__.py new file mode 100644 index 000000000..da8023aea --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/__init__.py @@ -0,0 +1 @@ +from .filesystem_browser import create_plugin_instance diff --git a/src/plugin/python_plugins/filesystem_browser/config.json b/src/plugin/python_plugins/filesystem_browser/config.json new file mode 100644 index 000000000..3e549079e --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/config.json @@ -0,0 +1,42 @@ +{ + "extensions": [ + ".mov", + ".mp4", + ".mkv", + ".exr", + ".jpg", + ".jpeg", + ".png", + ".dpx", + ".tiff", + ".tif", + ".wav", + ".mp3", + ".pdf" + ], + "ignore_dirs": [ + ".git", + ".quarantine", + "eryx_unreal_plugin", + ".DS_Store" + ], + "root_ignore_dirs": [ + "/Applications", + "/bin", + "/cores", + "/dev", + "/etc", + "/Library", + "/opt", + "/private", + "/sbin", + "/System", + "/usr", + "/var", + "/proc", + "/sys", + "/snap" + ], + "max_recursion_depth": 6, + "auto_scan_threshold": 4 +} \ No newline at end of file diff --git a/src/plugin/python_plugins/filesystem_browser/filesystem_browser.py b/src/plugin/python_plugins/filesystem_browser/filesystem_browser.py new file mode 100644 index 000000000..9b2bad637 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/filesystem_browser.py @@ -0,0 +1,1514 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Sam Richards + +from xstudio.plugin import PluginBase +from xstudio.core import JsonStore, FrameList, add_media_atom, Uuid +import os +import sys +import json +import threading +import queue +import time +import subprocess +import shutil +import pathlib +import tempfile +import uuid as _uuid +import atexit +from collections import OrderedDict +from datetime import datetime + +# Try importing fileseq +try: + import fileseq + fileseq_available = True +except ImportError: + fileseq_available = False + print("Warning: fileseq module not found. Sequence detection will be disabled.") + +# File-based debug log (more reliable than print in xStudio's embedded Python) +_DEBUG_LOG = "/tmp/xstudio_thumb_debug.txt" +def _dbg(msg): + try: + with open(_DEBUG_LOG, "a") as _f: + _f.write(f"{msg}\n") + _f.flush() + except Exception: + pass + + +def _find_ffmpeg(): + """Find ffmpeg binary. Checks env var, xStudio app bundle, then system PATH.""" + # 1. Explicit override + env_path = os.environ.get("FFMPEG_PATH") + if env_path and os.path.isfile(env_path): + return env_path, None # (binary, dyld_lib_path) + + # 2. xStudio app bundle (same directory as the main binary) + exe = sys.argv[0] if sys.argv else "" + bundle_ffmpeg = os.path.join(os.path.dirname(exe), "ffmpeg") + if os.path.isfile(bundle_ffmpeg): + # Bundled ffmpeg needs Frameworks dir on DYLD_LIBRARY_PATH + frameworks = os.path.join(os.path.dirname(exe), "..", "Frameworks") + frameworks = os.path.normpath(frameworks) + return bundle_ffmpeg, frameworks + + # 3. System PATH + system_ffmpeg = shutil.which("ffmpeg") + if system_ffmpeg: + return system_ffmpeg, None + + return None, None + + +# PySide6 dependency removed +# from PySide6.QtCore import QObject, Signal, Qt +# from PySide6.QtWidgets import QApplication, QFileDialog + +# MainThreadExecutor removed. +# xstudio attributes .set_value() is generally thread-safe (posts to actor). +# For GUI dialogs, we need another approach or they are disabled without PySide. + + +class XStudioHostInterface: + """ + Concrete implementation of the host application interface for xStudio. + Handles loading, previewing, and comparing media, as well as playlist management. + To port to OpenRV or another app, create a new host interface mapping to these methods. + """ + def __init__(self, connection, plugin): + """ + Initializes the xStudio host interface. + + Args: + connection (RemoteConnection): The xStudio remote API connection object. + plugin (PluginBase): The parent plugin instance, which holds shared state + or helper functions if needed. + """ + self.connection = connection + self.plugin = plugin + self.playlist_path_cache = {} + self.last_used_playlist_uuid = None + self.original_playlist_uuid = None + self.preview_playlist_uuid = None + self.pending_preview_deletion_uuid = None + + def _resolve_active_playlist(self): + """ + Attempts to find an active (on-screen or selected) playlist that isn't the Preview playlist. + + Returns: + Playlist | None: The active playlist container, or None if no valid playlist is found. + """ + try: + viewed = self.connection.api.session.viewed_container + if hasattr(viewed, 'add_media') and viewed.name != "Preview": + return viewed + except Exception: pass + try: + selection = self.connection.api.session.selected_containers + if selection and hasattr(selection[0], 'add_media') and selection[0].name != "Preview": + return selection[0] + except Exception: pass + return None + + @staticmethod + def _format_sequence_path(path): + """ + Converts a fileseq path string into the specific URI formatting xStudio demands + for loading image sequences (e.g. `/dir/prefix{:04d}.ext=1001-1050`). + + Args: + path (str): The raw file path or fileseq string. + + Returns: + str | None: The formatted sequence path, or None if fileseq is unavailable or it's a single file. + """ + if not fileseq_available: return None + try: + seq = fileseq.FileSequence(path) + if len(seq) <= 1: return None + pad_str = seq.padding() + if pad_str and pad_str.startswith("%"): + import re + m = re.search(r"%(0(\d+))?d", pad_str) + pad_len = int(m.group(2)) if m and m.group(2) else 0 + elif pad_str: + pad_len = pad_str.count('#') * 4 + pad_str.count('@') + else: + pad_len = 0 + brace_padding = f"{{:0{pad_len}d}}" if pad_len > 0 else "{:d}" + return f"{seq.dirname()}{seq.basename()}{brace_padding}{seq.extension()}={seq.frameRange()}" + except Exception: return None + + def _add_media_to_playlist(self, playlist, path): + """ + Adds a file or sequence to the given playlist. Formats the path as a sequence if applicable. + + Args: + playlist (Playlist): The target xStudio playlist object. + path (str): The filesystem path to load. + + Returns: + Media | None: The newly added media object, or None if it fails. + """ + try: + seq_path = self._format_sequence_path(path) + return playlist.add_media(seq_path if seq_path else path) + except Exception as e: + print(f"Add media error: {e}") + return None + + def _find_container_uuid(self, tree, target_value_uuid): + """ + Recursively searches the playlist tree to find the internal tree-node UUID + corresponding to a known actor value UUID. + + Args: + tree (TreeNode): The root node of the playlist tree sequence. + target_value_uuid (Uuid): The value_uuid to search for. + + Returns: + Uuid | None: The tree node UUID, or None if not found. + """ + if hasattr(tree, 'value_uuid') and str(tree.value_uuid) == str(target_value_uuid): + return tree.uuid + if hasattr(tree, 'children'): + for child in tree.children: + res = self._find_container_uuid(child, target_value_uuid) + if res: return res + return None + + def load_media(self, path): + """ + Loads the specified media into xStudio, creating a new playlist if necessary, or attaching it + to the currently active one. Handles sequence detection, local state caching, and playhead setup. + Will not add the file if it detects a duplicate already inside the playlist. + + Args: + path (str): The path to the file or sequence to load. + """ + try: + valid_playlist = None + try: + selection = self.connection.api.session.selected_containers + for item in selection: + if hasattr(item, 'add_media') and item.name != "Preview": + valid_playlist = item + self.last_used_playlist_uuid = item.uuid + break + except Exception: pass + + if not valid_playlist and self.last_used_playlist_uuid: + try: + target_uuid_str = str(self.last_used_playlist_uuid) + for p in self.connection.api.session.playlists: + if str(p.uuid) == target_uuid_str and p.name != "Preview": + valid_playlist = p + break + except Exception: pass + + if not valid_playlist: + try: + viewed = self.connection.api.session.viewed_container + if hasattr(viewed, 'add_media') and viewed.name != "Preview": + valid_playlist = viewed + self.last_used_playlist_uuid = viewed.uuid + except Exception: pass + + if not valid_playlist: + playlists = [p for p in self.connection.api.session.playlists if p.name != "Preview"] + if playlists: + valid_playlist = playlists[0] + else: + self.connection.api.session.create_playlist("Filesystem Import") + valid_playlist = [p for p in self.connection.api.session.playlists if p.name != "Preview"][0] + self.last_used_playlist_uuid = valid_playlist.uuid + + if self.preview_playlist_uuid is not None: + if self.original_playlist_uuid is not None: + orig_uuid_str = str(self.original_playlist_uuid) + for p in self.connection.api.session.playlists: + if str(p.uuid) == orig_uuid_str: + valid_playlist = p + break + self.pending_preview_deletion_uuid = self.preview_playlist_uuid + self.original_playlist_uuid = None + self.preview_playlist_uuid = None + + playlist = valid_playlist + pl_uuid = str(playlist.uuid) + if pl_uuid not in self.playlist_path_cache: + self.playlist_path_cache[pl_uuid] = set() + + existing_media = None + try: + current_media_list = playlist.media + tgt_path = os.path.normpath(os.path.abspath(path)) + for m in current_media_list: + try: + ms = m.media_source() + mr = ms.media_reference + if mr: + u = mr.uri() + mp = u.path() + if mp: + mp_norm = os.path.normpath(os.path.abspath(mp)) + if mp_norm == tgt_path: + existing_media = m + break + except Exception: continue + except Exception as e: print(f"Dup check error: {e}") + + if existing_media: + media = existing_media + elif tgt_path in self.playlist_path_cache[pl_uuid]: + return + else: + seq_path = self._format_sequence_path(path) if fileseq_available else None + if seq_path: + media = playlist.add_media(seq_path) + else: + media = playlist.add_media(path) + self.playlist_path_cache[pl_uuid].add(tgt_path) + + self.connection.api.session.set_on_screen_source(playlist) + try: self.connection.api.session.viewed_container = playlist + except Exception: pass + + if hasattr(playlist, 'playhead_selection'): + playlist.playhead_selection.set_selection([media.uuid]) + + try: playlist.playhead.playing = True + except Exception: pass + + if self.pending_preview_deletion_uuid: + try: + prev_uuid = self.pending_preview_deletion_uuid + self.pending_preview_deletion_uuid = None + tree = self.connection.api.session.playlist_tree + cuuid = self._find_container_uuid(tree, prev_uuid) + if cuuid: + self.connection.api.session.remove_container(cuuid) + else: + for p in self.connection.api.session.playlists: + if str(p.uuid) == str(prev_uuid): + self.connection.api.session.remove_container(p) + break + except Exception as e: _dbg(f"Final cleanup error: {e}") + + except Exception as e: + print(f"Error loading file: {e}") + + def replace_current_media(self, path): + """ + Replaces the currently selected/playing media in the active playlist with the new source. + + Args: + path (str): The new file path to insert into the playlist in place of the old one. + """ + try: + playlist = self._resolve_active_playlist() + if not playlist: return + self.connection.api.session.set_on_screen_source(playlist) + new_media = self._add_media_to_playlist(playlist, path) + if not new_media: return + items_to_remove = [] + if hasattr(playlist, 'playhead_selection'): + current_selection = playlist.playhead_selection.selected_sources + if current_selection: items_to_remove = current_selection + + if hasattr(playlist, 'playhead_selection'): + playlist.playhead_selection.set_selection([new_media.uuid]) + + if items_to_remove: + try: playlist.move_media(new_media, before=items_to_remove[0].uuid) + except Exception: pass + + for m in items_to_remove: + try: playlist.remove_media(m) + except Exception: pass + + if hasattr(playlist, 'playhead'): + playlist.playhead.playing = True + + except Exception as e: print(f"Replace error: {e}") + + def compare_with_current_media(self, path): + """ + Adds the specified media to the current selection, and puts the playhead into A/B compare mode. + + Args: + path (str): The new media file path to compare. + """ + try: + playlist = self._resolve_active_playlist() + if not playlist: return + self.connection.api.session.set_on_screen_source(playlist) + new_media = self._add_media_to_playlist(playlist, path) + if not new_media: return + new_selection = [] + if hasattr(playlist, 'playhead_selection'): + for m in playlist.playhead_selection.selected_sources: + new_selection.append(m.uuid) + new_selection.append(new_media.uuid) + if hasattr(playlist, 'playhead_selection'): + playlist.playhead_selection.set_selection(new_selection) + if hasattr(playlist, 'playhead'): + playlist.playhead.compare_mode = "A/B" + playlist.playhead.playing = True + except Exception as e: print(f"Compare error: {e}") + + def append_media(self, path): + """ + Appends a piece of media to the currently active playlist without altering + the playhead's current playback mode or selection. + + Args: + path (str): The media file path to append. + """ + try: + playlist = self._resolve_active_playlist() + if not playlist: return + self._add_media_to_playlist(playlist, path) + except Exception as e: print(f"Append error: {e}") + + def preview_media(self, path): + """ + Creates or utilizes a transient 'Preview' playlist to temporarily view an item. + It safely captures the existing playlist and playhead frame so that closing the preview + can revert the interface to precisely what was observed before. + + Args: + path (str): The media file path to preview. + """ + try: + viewed = None + try: viewed = self.connection.api.session.viewed_container + except Exception: pass + + if self.preview_playlist_uuid is None: + self.original_playlist_uuid = None + if viewed and hasattr(viewed, 'add_media') and viewed.name != "Preview": + try: self.original_playlist_uuid = viewed.uuid + except Exception: pass + + current_frame = None + if viewed and hasattr(viewed, 'playhead'): + try: current_frame = viewed.playhead.position + except Exception: pass + + preview_playlist = None + try: + for p in self.connection.api.session.playlists: + try: + if p.name == "Preview": + preview_playlist = p + break + except Exception: continue + except Exception: pass + + if not preview_playlist: + try: _, preview_playlist = self.connection.api.session.create_playlist("Preview") + except Exception: pass + + if not preview_playlist: return + + try: self.preview_playlist_uuid = preview_playlist.uuid + except Exception: pass + + try: + media_list = list(preview_playlist.media) + if media_list: preview_playlist.remove_media(media_list) + except Exception: pass + + media = self._add_media_to_playlist(preview_playlist, path) + if not media: return + + try: self.connection.api.session.set_on_screen_source(preview_playlist) + except Exception: pass + + try: self.connection.api.session.viewed_container = preview_playlist + except Exception: pass + + try: + if hasattr(preview_playlist, 'playhead_selection'): + preview_playlist.playhead_selection.set_selection([media.uuid]) + + if hasattr(preview_playlist, 'playhead'): + if current_frame is not None: + try: preview_playlist.playhead.position = current_frame + except Exception: pass + try: preview_playlist.playhead.playing = False + except Exception: pass + except Exception: pass + + except Exception as e: print(f"FilesystemBrowser Preview error: {e}") + + +class FilesystemBrowserPlugin(PluginBase): + def __init__(self, connection): + PluginBase.__init__( + self, + connection, + "Filesystem Browser", + qml_folder="qml/FilesystemBrowser.1" + ) + # Initialize the host application interface (xStudio concrete implementation) + self.host = XStudioHostInterface(self.connection, self) + + # Load Configuration + self.config = self.load_config() + + # self.main_executor = MainThreadExecutor() + + # Attribute to communicate list of files to QML (as JSON string) + self.files_attr = self.add_attribute( + "file_list", + "[]", # Empty JSON list + {"title": "file_list"}, # Explicit title for QML lookup + register_as_preference=False + ) + self.files_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # Attribute for current path + self.current_path_attr = self.add_attribute( + "current_path", + os.getcwd(), + {"title": "current_path"}, + register_as_preference=True + ) + self.current_path_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # Attribute for commands from QML + self.command_attr = self.add_attribute( + "command_channel", + "", + {"title": "command_channel"}, + register_as_preference=False + ) + self.command_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # Action to toggle the panel + self.toggle_action_uuid = "2669e4a3-7186-4556-9818-80949437b018" + + self.toggle_browser_action = self.register_hotkey( + self.toggle_browser, # hotkey_callback + "B", # default_keycode + 0, # default_modifier + "Show Filesystem Browser", + "Toggles the Filesystem Browser panel", + False, # auto_repeat + "FilesystemBrowser", # component + "Window" # context + ) + + # Menu item triggers this action + # Removed manual callback to rely on hotkey_uuid linkage + # which should toggle the panel automatically if registered correctly. + self.insert_menu_item( + "main menu bar", + "Filesystem Browser", + "View|Panels", + 0.0, + hotkey_uuid=self.toggle_browser_action, + callback=self.toggle_browser_from_menu + ) + + # Add menu item to open as floating window + self.insert_menu_item( + "main menu bar", + "Browser Open", + "Plugins", + 0.1, + callback=self.open_floating_browser + ) + + # Register the panel, passing the action + self.register_ui_panel_qml( + "Filesystem Browser", + """ + FilesystemBrowser { + anchors.fill: parent + } + """, + 10.0, # Position in menu + "", # No icon = Standard Panel (Dockable) + -1.0, + self.toggle_browser_action # Pass the action UUID + ) + + # New: Completion attribute + self.completions_attr = self.add_attribute( + "completions_attribute", + "[]", + {"title": "completions_attr"}, + register_as_preference=False + ) + self.completions_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # New: Search state attribute + self.searching_attr = self.add_attribute( + "searching", + False, + {"title": "searching"}, + register_as_preference=False + ) + self.searching_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # New: Progress attribute + self.progress_attr = self.add_attribute( + "scan_progress", + "0", + {"title": "scan_progress"}, + register_as_preference=False + ) + self.progress_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # New: Progress attribute + self.scanned_attr = self.add_attribute( + "scanned_count", + "0", + {"title": "scanned_count"}, + register_as_preference=False + ) + self.scanned_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # New: Scanned directories list + self.scanned_dirs_attr = self.add_attribute( + "scanned_dirs", + "[]", + {"title": "scanned_dirs"}, + register_as_preference=False + ) + self.scanned_dirs_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # New: Directory Query Result (for Tree View) + self.directory_query_result = self.add_attribute( + "directory_query_result", + "{}", + {"title": "directory_query_result"}, + register_as_preference=False + ) + self.directory_query_result.expose_in_ui_attrs_group("Filesystem Browser") + + self.depth_limit_attr = self.add_attribute( + "recursion_limit", + self.config.get("max_recursion_depth", 6), + {"title": "Recursion Limit", "category": "Filesystem Browser"}, + register_as_preference=True + ) + self.depth_limit_attr.expose_in_ui_attrs_group("Filesystem Browser Settings") + + # New: Scan Required flag (for manual scan mode) + self.scan_required_attr = self.add_attribute( + "scan_required", + False, + {"title": "scan_required"}, + register_as_preference=False + ) + self.scan_required_attr.expose_in_ui_attrs_group("Filesystem Browser") + + self.auto_scan_threshold_attr = self.add_attribute( + "auto_scan_threshold", + self.config.get("auto_scan_threshold", 4), + {"title": "auto_scan_threshold", "category": "Filesystem Browser"}, + register_as_preference=True + ) + self.auto_scan_threshold_attr.expose_in_ui_attrs_group("Filesystem Browser Settings") + + # New: Filter attributes + self.filter_time_attr = self.add_attribute( + "filter_time", + "Any", + {"title": "filter_time", "values": ["Any", "Last 1 day", "Last 2 days", "Last 1 week", "Last 1 month"]}, + register_as_preference=True + ) + self.filter_time_attr.expose_in_ui_attrs_group("Filesystem Browser") + + self.filter_version_attr = self.add_attribute( + "filter_version", + "All Versions", + {"title": "filter_version", "values": ["All Versions", "Latest Version", "Latest 2 Versions"]}, + register_as_preference=True + ) + self.filter_version_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # History and Pinned Attributes + self.history_attr = self.add_attribute( + "history_paths", + "[]", + {"title": "history_paths"}, # Must match QML attributeTitle + register_as_preference=True + ) + self.history_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # Default pinned items + default_pins = [] + + # 1. Environment Variable Pre-defines (JSON list of dicts or paths) + env_pins = os.environ.get("XSTUDIO_BROWSER_PINS") + if env_pins: + try: + # Try parsing as JSON first + parsed = json.loads(env_pins) + if isinstance(parsed, list): + for item in parsed: + if isinstance(item, dict) and "path" in item: + default_pins.append(item) + elif isinstance(item, str): + default_pins.append({"name": os.path.basename(item), "path": item}) + except: + # Fallback to standard path separator (colon on Unix, semicolon on Win) + # We also normalize semicolons to os.pathsep to be lenient + normalized = env_pins + if os.pathsep == ":": + normalized = env_pins.replace(";", ":") + + paths = normalized.split(os.pathsep) + for p in paths: + p = p.strip() + if p: + default_pins.append({"name": os.path.basename(p), "path": p}) + + # 2. Standard Defaults + home = os.environ.get("HOME") + if home: + # Avoid duplicates + if not any(p["path"] == home for p in default_pins): + default_pins.append({"name": "Home", "path": home}) + + downloads = os.path.join(home, "Downloads") + if os.path.exists(downloads): + if not any(p["path"] == downloads for p in default_pins): + default_pins.append({"name": "Downloads", "path": downloads}) + + self.pinned_attr = self.add_attribute( + "pinned_paths", + json.dumps(default_pins), + {"title": "pinned_paths"}, # Must match QML attributeTitle + register_as_preference=True + ) + self.pinned_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # ENFORCE: Merge default_pins (env vars + explicit defaults) into the actual attribute value + try: + current_val = self.pinned_attr.value() + + current_pins = [] + if current_val: + try: + current_pins = json.loads(current_val) + except Exception: + current_pins = [] + + # Merge + changed = False + existing_paths = set(p["path"] for p in current_pins) + + for pin in reversed(default_pins): + if pin["path"] not in existing_paths: + current_pins.insert(0, pin) + existing_paths.add(pin["path"]) + changed = True + + if changed or not current_val: + new_val = json.dumps(current_pins) + self.pinned_attr.set_value(new_val) + + except Exception as e: + print(f"FilesystemBrowser: Error merging pins: {e}") + + # Connect listeners + # Note: We need to register callbacks properly. + # attribute_changed method handles all. + + # Configuration preferences with fallbacks from config.json + self.extensions_attr = self.add_attribute( + "Media Extensions", + ", ".join(self.config.get("extensions", [])), + {"title": "Media Extensions", "category": "Filesystem Browser"}, + register_as_preference=True + ) + self.extensions_attr.expose_in_ui_attrs_group("Filesystem Browser Settings") + + self.ignore_dirs_attr = self.add_attribute( + "Ignore Directories", + ", ".join(self.config.get("ignore_dirs", [])), + {"title": "Ignore Directories", "category": "Filesystem Browser"}, + register_as_preference=True + ) + self.ignore_dirs_attr.expose_in_ui_attrs_group("Filesystem Browser Settings") + + self.root_ignore_dirs_attr = self.add_attribute( + "Root Ignore Directories", + ", ".join(self.config.get("root_ignore_dirs", [])), + {"title": "Root Ignore Directories", "category": "Filesystem Browser"}, + register_as_preference=True + ) + self.root_ignore_dirs_attr.expose_in_ui_attrs_group("Filesystem Browser Settings") + self.search_thread = None + self.cancel_search = False + self.results_lock = threading.Lock() # Protects current_scan_results + self.current_scan_results = [] + + # Thumbnail setup — ffmpeg-based, no xStudio actor system needed + self._ffmpeg_bin, self._ffmpeg_dyld = _find_ffmpeg() + if self._ffmpeg_bin: + print(f"FilesystemBrowser: using ffmpeg at {self._ffmpeg_bin}") + else: + print("FilesystemBrowser: WARNING — ffmpeg not found, thumbnails disabled") + self._temp_dir = tempfile.mkdtemp(prefix="xstudio_thumbs_") + self._thumbnail_cache = OrderedDict() # path -> file:///... thumb URI (LRU, capped) + self._thumbnail_cache_max = 500 + atexit.register(self._cleanup) + self._thumb_lock = threading.Lock() + self._thumb_pending = set() # paths currently in queue/processing + self._thumb_queue = queue.Queue() + # 4 worker threads — daemon so they die with the process + for _ in range(4): + t = threading.Thread(target=self._thumb_worker_loop, daemon=True) + t.start() + + # State tracking for Preview Mode + self.original_playlist_uuid = None + self.preview_playlist_uuid = None + + # Dedicated attribute for batch thumbnail requests from QML. + # QML writes a JSON array of paths; Python reads and queues them all at once. + self.thumbnail_request_attr = self.add_attribute( + "thumbnail_request", + "[]", + {"title": "thumbnail_request"}, + register_as_preference=False + ) + self.thumbnail_request_attr.expose_in_ui_attrs_group("Filesystem Browser") + + # Build the QML command dispatch table + self._command_handlers = self._build_command_handlers() + + # Initial search + self.start_search(self.current_path_attr.value()) + + @property + def extensions(self): + val = self.extensions_attr.value() + if not val: return [] + return [item.strip() for item in val.split(',') if item.strip()] + + @property + def ignore_dirs(self): + val = self.ignore_dirs_attr.value() + if not val: return set() + return set(item.strip() for item in val.split(',') if item.strip()) + + @property + def root_ignore_dirs(self): + val = self.root_ignore_dirs_attr.value() + if not val: return set() + return set(item.strip() for item in val.split(',') if item.strip()) + + def toggle_browser_from_menu(self, menu_item=None, user_data=None): + # Wrapper for menu callback + # Since we are now a standard dockable panel, the user should use View -> Panels -> Filesystem Browser + # or rely on the hotkey's default action if it maps to the view. + # We'll just log here. + print("Menu item clicked. The Filesystem Browser is available in the Panels menu.") + self.toggle_browser(None, "Menu Click") + + def open_floating_browser(self): + # Create a floating window containing the FilesystemBrowser component + qml = """ + import QtQuick.Window 2.15 + import QtQuick.Controls 2.15 + + Window { + width: 900 + height: 600 + visible: true + title: "Filesystem Browser" + + FilesystemBrowser { + anchors.fill: parent + } + } + """ + self.create_qml_item(qml) + + def toggle_browser(self, converting, context): + print(f"Toggling Filesystem Browser (Action Triggered). Context: {context}") + # We can also verify visibility here if possible, but the Model handles it. + + + def _open_browser_dialog(self, initial_path): + """Runs on main thread to show dialog.""" + try: + from PySide6.QtWidgets import QFileDialog + dir_path = QFileDialog.getExistingDirectory(None, "Select Directory", initial_path) + if dir_path: + self.current_path_attr.set_value(dir_path) + self.start_search(dir_path) + except ImportError: + print("PySide6 not available. Directory dialog disabled.") + except Exception as e: + print(f"Error opening dialog: {e}") + + + def _build_command_handlers(self): + """Build the QML command dispatch table. Called once from __init__.""" + def _cmd_change_path(data): + new_path = data.get("path") + if os.path.exists(new_path) and os.path.isdir(new_path): + self.current_path_attr.set_value(new_path) + self._add_to_history(new_path) + self.start_search(new_path) + else: + print(f"Invalid path: {new_path}") + + def _cmd_set_attribute(data): + attr_name = data.get("name") + attr_value = data.get("value") + if attr_name == "filter_time": + self.filter_time_attr.set_value(attr_value) + elif attr_name == "filter_version": + self.filter_version_attr.set_value(attr_value) + elif attr_name == "recursion_limit": + self.depth_limit_attr.set_value(attr_value) + + def _cmd_copy_path(data): + path = data.get("path") + if not path: + return + try: + if sys.platform == "darwin": + subprocess.run(["pbcopy"], input=path.encode(), check=True) + elif sys.platform == "win32": + subprocess.run(["clip"], input=path.encode(), check=True) + else: + subprocess.run(["xclip", "-selection", "clipboard"], + input=path.encode(), check=True) + except Exception as e: + _dbg(f"copy_path: Error: {e}") + + def _cmd_reveal_in_finder(data): + path = data.get("path") + if not path: + return + # Resolve sequence to a concrete first frame + if fileseq_available: + try: + seq = fileseq.FileSequence(path) + if seq: + path = str(seq[0]) + except Exception: + pass + try: + if sys.platform == "darwin": + subprocess.run(["open", "-R", path], check=True) + elif sys.platform == "win32": + subprocess.run(["explorer", "/select,", os.path.normpath(path)], check=True) + else: + subprocess.run(["open", os.path.dirname(path)], check=True) + except Exception as e: + _dbg(f"reveal_in_finder: Error: {e}") + + def _cmd_force_scan(data): + path = data.get("path") + if path: + self.current_path_attr.set_value(path) + self._add_to_history(path) + self.start_search(path, force=True, depth=20) + else: + self.start_search(self.current_path_attr.value(), force=True, depth=20) + + return { + "change_path": _cmd_change_path, + "load_file": lambda d: self.load_file(d.get("path")), + "preview_file": lambda d: self.host.preview_media(d.get("path")), + "request_browser": lambda d: self._open_browser_dialog(self.current_path_attr.value()), + "complete_path": lambda d: self.compute_completions(d.get("path", "")), + "replace_current_media": lambda d: self.host.replace_current_media(d.get("path")), + "compare_with_current_media": lambda d: self.host.compare_with_current_media(d.get("path")), + "append_media": lambda d: self.host.append_media(d.get("path")), + "set_attribute": _cmd_set_attribute, + "copy_path": _cmd_copy_path, + "reveal_in_finder": _cmd_reveal_in_finder, + "add_pin": lambda d: self._add_pin(d.get("name"), d.get("path")), + "remove_pin": lambda d: self._remove_pin(d.get("path")), + "force_scan": _cmd_force_scan, + "get_subdirs": lambda d: self._get_subdirs(d.get("path")), + "request_thumbnail": lambda d: self._request_thumbnail(d.get("path")), + } + + def attribute_changed(self, attribute, role): + from xstudio.core import AttributeRole + + if attribute.uuid == self.command_attr.uuid and role == AttributeRole.Value: + try: + val = self.command_attr.value() + except TypeError: + return + if not val: + return + try: + data = json.loads(val) + action = data.get("action") + handler = self._command_handlers.get(action) + if handler: + handler(data) + elif action: + print(f"FilesystemBrowser: Unknown command action: {action!r}") + # Clear command channel + self.command_attr.set_value("") + except Exception as e: + print(f"Command error: {e}") + import traceback + traceback.print_exc() + + elif attribute.uuid in (self.filter_time_attr.uuid, self.filter_version_attr.uuid): + if role == AttributeRole.Value: + self._on_filter_changed(attribute, role) + elif attribute.uuid == self.depth_limit_attr.uuid: + if role == AttributeRole.Value: + # Recursion limit changed, re-scan + current = self.current_path_attr.value() + self.start_search(current) + elif attribute.uuid == self.thumbnail_request_attr.uuid and role == AttributeRole.Value: + # QML has written a JSON array of paths to request thumbnails for. + # Handle here on the plugin's message thread, then clear the attribute. + try: + val = attribute.value() + if val and val not in ("", "[]"): + paths = json.loads(val) + _dbg(f"BATCH: received {len(paths)} paths") + for p in paths: + self._request_thumbnail(p) + self.thumbnail_request_attr.set_value("[]") + except Exception as e: + import traceback + _dbg(f"BATCH ERROR: {e}\n{traceback.format_exc()}") + + def start_search(self, start_path, force=False, depth=None): + """ + Start the file search in a separate thread. + If force=False and depth <= 4, skip auto-scan and ask user to confirm. + """ + if not start_path: + return + + # Check path depth + norm_path = os.path.normpath(start_path) + parts = norm_path.strip(os.sep).split(os.sep) + p_depth = len([p for p in parts if p]) + + threshold = self.config.get("auto_scan_threshold", 4) + + if not force and p_depth <= threshold: + print(f"FilesystemBrowser: Path '{start_path}' (depth {p_depth}) requires manual scan.") + self.scan_required_attr.set_value(True) + self.searching_attr.set_value(False) + self.progress_attr.set_value("0") + + with self.results_lock: + self.current_scan_results = [] + self.scanned_attr.set_value("0") + self.scanned_dirs_attr.set_value("[]") + + self.apply_filters() + + if self.search_thread and self.search_thread.is_alive(): + self.cancel_search = True + if hasattr(self, 'scanner'): + self.scanner.stop() + self.search_thread.join() + return + + self.scan_required_attr.set_value(False) + + if self.search_thread and self.search_thread.is_alive(): + self.cancel_search = True + if hasattr(self, 'scanner'): + self.scanner.stop() + self.scanner.shutdown() + self.search_thread.join() + + self.cancel_search = False + self.searching_attr.set_value(True) + self.search_thread = threading.Thread(target=self._search_worker, args=(start_path, depth)) + self.search_thread.daemon = True + self.search_thread.start() + + def _search_worker(self, start_path, custom_depth=None): + print(f"Starting search in {start_path} (depth={custom_depth if custom_depth is not None else 'default'})") + + from .scanner import FileScanner + + self.cached_filter_time = self.filter_time_attr.value() + self.cached_filter_version = self.filter_version_attr.value() + + max_depth = custom_depth if custom_depth is not None else self.depth_limit_attr.value() + config = { + "extensions": list(self.extensions), + "ignore_dirs": list(self.ignore_dirs), + "max_depth": max_depth + } + + self.scanner = FileScanner(config) + with self.results_lock: + self.current_scan_results = [] + self.pending_scan_results = [] + self.scanned_dirs_cache = [] + self.scanned_dirs_attr.set_value("[]") + self.last_update = 0 + + def progress_callback(results, info): + scanned = info.get("scanned", 0) + phase = info.get("phase", "") + progress = info.get("progress", 0) + new_dirs = info.get("scanned_dirs", []) + + biased_progress = pow(progress / 100.0, 2.0)*100 + self.progress_attr.set_value(str(biased_progress)) + self.scanned_attr.set_value(str(scanned)) + + if new_dirs: + self.scanned_dirs_cache.extend(new_dirs) + import json + self.scanned_dirs_attr.set_value(json.dumps(self.scanned_dirs_cache)) + + if results and phase == "scanning": + self.pending_scan_results.extend(results) + now = time.time() + if now - self.last_update > 5: + self.last_update = now + with self.results_lock: + self.current_scan_results.extend(self.pending_scan_results) + self.apply_filters() + self.pending_scan_results = [] + + if phase == "complete": + self.searching_attr.set_value(False) + + try: + results = self.scanner.scan(start_path, callback=progress_callback) + + if self.cancel_search: + return + + with self.results_lock: + self.current_scan_results = results + self.apply_filters() + + print(f"Search finished, found {len(results)} items") + + except Exception as e: + print(f"Search error: {e}") + import traceback + traceback.print_exc() + finally: + self.searching_attr.set_value(False) + + def compute_completions(self, partial_path): + """Minimal logic to find subdirectories matching partial path.""" + try: + # If empty, do nothing + if not partial_path: + self.completions_attr.set_value("[]") + return + + # Determine directory to scan + # Handle absolute paths vs relative correctly + if partial_path.endswith(os.path.sep): + directory = partial_path + base = "" + else: + directory = os.path.dirname(partial_path) + base = os.path.basename(partial_path) + + # If directory part is empty (e.g. user typed "home") + if not directory: + directory = "." + + if not os.path.exists(directory) or not os.path.isdir(directory): + self.completions_attr.set_value("[]") + return + + candidates = [] + try: + with os.scandir(directory) as it: + for entry in it: + if entry.name in self.ignore_dirs or entry.name.startswith('.'): + continue + + if entry.is_dir(): + # Filter by base case-insensitive + if entry.name.lower().startswith(base.lower()): + candidates.append(entry.path + os.path.sep) + except OSError: + pass + + # Sort and limit + candidates.sort() + self.completions_attr.set_value(json.dumps(candidates[:20])) + + except Exception as e: + print(f"Completion error: {e}") + self.completions_attr.set_value("[]") + + + + def load_config(self): + """Load configuration from config.json in the plugin directory.""" + config_path = os.path.join(os.path.dirname(__file__), "config.json") + default_config = { + "extensions": [".mov", ".mp4", ".mkv", ".exr", ".jpg", ".jpeg", ".png", + ".dpx", ".tiff", ".tif", ".wav", ".mp3"], + "ignore_dirs": [".git", ".quarantine", "eryx_unreal_plugin", ".DS_Store"], + "root_ignore_dirs": [], + "max_recursion_depth": 6, + "auto_scan_threshold": 4 + } + + if os.path.exists(config_path): + try: + with open(config_path, 'r') as f: + loaded_config = json.load(f) + # Merge with defaults + for key, value in loaded_config.items(): + default_config[key] = value + print(f"FilesystemBrowser: Loaded config from {config_path}") + except Exception as e: + print(f"FilesystemBrowser: Error loading config: {e}") + + return default_config + + def _get_subdirs(self, path): + """Fetch subdirectories for the given path and update attribute.""" + result = {"path": path, "dirs": []} + try: + if os.path.exists(path) and os.path.isdir(path): + dirs = [] + with os.scandir(path) as it: + for entry in it: + # Check ignore dirs (names) + if entry.name in self.ignore_dirs or entry.name.startswith('.'): + continue + + # Check root ignore dirs (paths) + if entry.path in self.root_ignore_dirs: + continue + + if entry.is_dir(): + dirs.append({ + "name": entry.name, + "path": entry.path + }) + # Sort alphabetically + dirs.sort(key=lambda x: x["name"].lower()) + result["dirs"] = dirs + except Exception as e: + print(f"Error getting subdirs for {path}: {e}") + + import time + result["timestamp"] = time.time() + + # Ensure we use JSON dumping + import json + self.directory_query_result.set_value(json.dumps(result)) + + def load_file(self, path): + """Handle directory navigation or delegating file loading to host interface.""" + if os.path.isdir(path): + self.current_path_attr.set_value(path) + self._add_to_history(path) + self.start_search(path) + return + self.host.load_media(path) + + + + def apply_filters(self): + """Re-run filtering logic on the current results cache.""" + try: + with self.results_lock: + results = list(self.current_scan_results) + + # Offload heavy filtering if list is huge? + # For now, do it in main thread or worker? + # Safe to do in main thread if count < 100k? + # Better to spawn a thread if we want UI responsiveness. + + # Doing it synchronously for now, but catching errors + self._apply_filters_logic(results) + except Exception as e: + print(f"Error applying filters: {e}") + + def _apply_filters_logic(self, results): + import os + # Use cached values if available (from worker), else fetch live (UI update) + if hasattr(self, 'cached_filter_time'): + filter_time = self.cached_filter_time + else: + filter_time = self.filter_time_attr.value() if hasattr(self, 'filter_time_attr') else "Any" + + if hasattr(self, 'cached_filter_version'): + filter_version = self.cached_filter_version + else: + filter_version = self.filter_version_attr.value() if hasattr(self, 'filter_version_attr') else "All Versions" + + print(f"Applying filters: Time={filter_time}, Version={filter_version}, Count={len(results)}") + + # Separate directories and files + dirs = [] + files = [] + for r in results: + if r.get("is_folder") or r.get("type") == "Folder": + dirs.append(r) + else: + files.append(r) + + # 1. Apply Time Filter (to files only?) + # User wants to see directories "even if there isnt data in them". + # So we probably shouldn't filter directories by time unless requested. + # Let's Apply Time Filter ONLY to files for now. + if filter_time != "Any": + now = time.time() + cutoff = 0 + if filter_time == "Last 1 day": + cutoff = now - 86400 + elif filter_time == "Last 2 days": + cutoff = now - 2 * 86400 + elif filter_time == "Last 1 week": + cutoff = now - 7 * 86400 + elif filter_time == "Last 1 month": + cutoff = now - 30 * 86400 + + if cutoff > 0: + files = [r for r in files if r.get("date", 0) >= cutoff] + + # 2. Apply Version Filter with Grouping (Files only) + grouped_results = {} + for r in files: + grp = r.get("version_group") + if grp: + grouped_results.setdefault(grp, []).append(r) + else: + grouped_results.setdefault(id(r), [r]) + + filtered_files = [] + + for grp, items in grouped_results.items(): + if len(items) <= 1: + filtered_files.extend(items) + continue + + items.sort(key=lambda x: x.get("version", 0), reverse=True) + + if filter_version == "Latest Version": + filtered_files.extend(items[:1]) + elif filter_version == "Latest 2 Versions": + filtered_files.extend(items[:2]) + else: + filtered_files.extend(items) + + + # Combine: Keep all discovered directories to facilitate browsing, + # and combine with filtered files. + final_results = dirs + filtered_files + + # Resort by name for display + final_results.sort(key=lambda x: x["name"]) + + # Serialize + json_str = json.dumps(final_results) + + self.files_attr.set_value(json_str) + + def _on_filter_changed(self, attribute, role): + from xstudio.core import AttributeRole + if role == AttributeRole.Value: + # Re-apply filters on cached results + threading.Thread(target=self.apply_filters).start() + + def _add_to_history(self, path): + try: + current_history = json.loads(self.history_attr.value()) + except: + current_history = [] + + # Remove if exists to bubble to top + try: + current_history.remove(path) + except ValueError: + pass + + current_history.insert(0, path) + # Limit history + if len(current_history) > 20: + current_history = current_history[:20] + + self.history_attr.set_value(json.dumps(current_history)) + + def _add_pin(self, name, path): + try: + pins = json.loads(self.pinned_attr.value()) + except: + pins = [] + + # Check if already pinned + for p in pins: + if p["path"] == path: + return # Already pinned + + pins.append({"name": name, "path": path}) + self.pinned_attr.set_value(json.dumps(pins)) + + def _remove_pin(self, path): + try: + pins = json.loads(self.pinned_attr.value()) + except: + pins = [] + + new_pins = [p for p in pins if p["path"] != path] + if len(new_pins) != len(pins): + self.pinned_attr.set_value(json.dumps(new_pins)) + + def _cleanup(self): + """atexit handler: shut down scanner thread pool and remove temp thumbnail dir.""" + if hasattr(self, 'scanner'): + try: + self.scanner.stop() + self.scanner.shutdown() + except Exception: + pass + try: + shutil.rmtree(self._temp_dir, ignore_errors=True) + except Exception: + pass + + def _request_thumbnail(self, path): + """Queue an async thumbnail fetch if not already cached or pending.""" + if path in self._thumbnail_cache: + # Already done — push the cached URI back to UI immediately + self._update_file_thumbnail(path, self._thumbnail_cache[path]) + return + with self._thumb_lock: + if path not in self._thumb_pending: + self._thumb_pending.add(path) + self._thumb_queue.put(path) + + def _thumb_worker_loop(self): + """Daemon worker pulling thumbnail requests from the queue.""" + while True: + path = self._thumb_queue.get() + try: + self._generate_thumbnail(path) + except Exception as e: + _dbg(f"WORKER_ERR: {e}") + finally: + with self._thumb_lock: + self._thumb_pending.discard(path) + self._thumb_queue.task_done() + + def _resolve_sequence_frame(self, path): + """Given a fileseq path string, return (concrete_file_path, frame_number). + For single files, returns (path, 0).""" + if not fileseq_available: + return path, 0 + try: + seq = fileseq.FileSequence(path) + frames = list(seq.frameSet()) + if len(frames) > 1: + mid = frames[len(frames) // 2] + return seq.frame(mid), mid + elif len(frames) == 1: + return seq.frame(frames[0]), frames[0] + except Exception: + pass + return path, 0 + + def _generate_thumbnail(self, path): + """Generate a thumbnail JPEG using ffmpeg subprocess.""" + if not self._ffmpeg_bin: + _dbg(f"GEN_SKIP (no ffmpeg): {path}") + return + + target_file, _frame = self._resolve_sequence_frame(path) + _dbg(f"GEN_START: {path} -> {target_file}") + + if not os.path.exists(target_file): + _dbg(f"GEN_MISSING: {target_file}") + return + + out_file = os.path.join(self._temp_dir, f"{_uuid.uuid4().hex}.jpg") + + env = os.environ.copy() + if self._ffmpeg_dyld: + existing = env.get("DYLD_LIBRARY_PATH", "") + env["DYLD_LIBRARY_PATH"] = ( + self._ffmpeg_dyld + (":" + existing if existing else "") + ) + + cmd = [ + self._ffmpeg_bin, + "-y", # overwrite output file + "-i", target_file, + "-vf", "scale=150:-1,format=rgb24", + "-frames:v", "1", + "-update", "1", # allow single-image output + out_file, + ] + + _dbg(f"GEN_CMD: {' '.join(cmd)}") + try: + result = subprocess.run( + cmd, env=env, + stdout=subprocess.DEVNULL, + stderr=subprocess.PIPE, + timeout=30 + ) + if result.returncode == 0 and os.path.exists(out_file): + thumb_uri = pathlib.Path(out_file).as_uri() + _dbg(f"GEN_OK: {thumb_uri}") + # LRU eviction: if cache is at capacity, remove the oldest entry + # and delete its temp file to reclaim disk space. + if len(self._thumbnail_cache) >= self._thumbnail_cache_max: + _, evicted_uri = self._thumbnail_cache.popitem(last=False) + try: + evicted_path = pathlib.Path(evicted_uri.replace("file://", "", 1)) + if evicted_path.exists() and evicted_path.parent.samefile(self._temp_dir): + evicted_path.unlink() + except Exception: + pass + self._thumbnail_cache[path] = thumb_uri + self._update_file_thumbnail(path, thumb_uri) + else: + stderr = result.stderr.decode("utf-8", errors="replace")[-500:] + _dbg(f"GEN_FAIL (rc={result.returncode}): {stderr}") + except subprocess.TimeoutExpired: + _dbg(f"GEN_TIMEOUT: {target_file}") + except Exception as exc: + _dbg(f"GEN_EXCEPTION: {exc}") + + def _update_file_thumbnail(self, path, thumb_uri): + """Update thumbnailSource in current_scan_results and push to files_attr + WITHOUT calling apply_filters() to avoid a full QML model rebuild.""" + with self.results_lock: + found = False + for r in self.current_scan_results: + if r.get("path") == path: + if r.get("thumbnailSource") == thumb_uri: + return # Already up to date; don't trigger another rebuild + r["thumbnailSource"] = thumb_uri + found = True + break + if not found: + return + # Serialise only what QML needs — same JSON format as apply_filters + serialised = json.dumps(self.current_scan_results) + + # Push the update; QML will merge thumbnailSource via the Image.source binding + self.files_attr.set_value(serialised) + +def create_plugin_instance(connection): + return FilesystemBrowserPlugin(connection) diff --git a/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/DirectoryTree.qml b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/DirectoryTree.qml new file mode 100644 index 000000000..afb3f05d8 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/DirectoryTree.qml @@ -0,0 +1,584 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import xStudio 1.0 + +Rectangle { + id: treeRoot + color: XsFileSystemStyle.backgroundColor + + + + // Properties to communicate with parent + property var pluginData: null + property var currentPath: "/" + property string baseRootPath: "/" + + signal sendCommand(var cmd) + onSendCommand: (cmd) => console.log("DirectoryTree: Sending command: " + JSON.stringify(cmd)) + + // Style constants to match FilesystemBrowser + property real rowHeight: XsFileSystemStyle.rowHeight + property color textColor: XsFileSystemStyle.textColor + property color hintColor: XsFileSystemStyle.hintColor + property real fontSize: XsFileSystemStyle.fontSize + property color selectionColor: XsFileSystemStyle.selectionColor + property color hoverColor: XsFileSystemStyle.hoverColor + property color backgroundColor: XsFileSystemStyle.backgroundColor + + // Auto-expand logic + property string pendingExpandPath: "" + property bool isSyncing: false + property int autoScanThreshold: 4 + + function getPathDepth(p) { + if (!p || p === "/") return 0; + var parts = p.split("/"); + var count = 0; + for(var i=0; i deepestLen || (np === "/" && deepestLen === 0)) { + deepestLen = np.length; + deepestIndex = i; + } + } + } + + if (deepestIndex !== -1) { + var node = treeModel.get(deepestIndex); + + if (node.path === pendingExpandPath) { + // We reached the target! + treeView.currentIndex = deepestIndex; + pendingExpandPath = ""; + isSyncing = false; + // Ensure visible + treeView.positionViewAtIndex(deepestIndex, ListView.Center); + // Also expand to show children as requested + if (!node.expanded) expandNode(deepestIndex); + } else { + // We need to go deeper. Expand this node if not expanded. + if (!node.expanded) { + expandNode(deepestIndex); + // wait for handleQueryResult to call us back + } else { + // It is expanded, but maybe children are not loaded yet? + // Or maybe we just expanded it and are waiting? + if (node.isLoading) { + // Waiting + } else { + // Children present but we didn't find a better match? + // This implies the next segment of path doesn't exist in the tree. + // Stop here. + pendingExpandPath = ""; + isSyncing = false; + } + } + } + } else { + // Should not happen if Root is present + isSyncing = false; + } + } + + // Attribute for directory query results + XsAttributeValue { + id: dir_query_attr + attributeTitle: "directory_query_result" + model: pluginData + role: "value" + + onValueChanged: { + try { + var val = value; + if (val && val !== "{}") { + var result = JSON.parse(val); + handleQueryResult(result); + } + } catch(e) { + console.log("DirectoryTree: Query result parse error: " + e); + } + } + } + + // Tree Model + // We'll use a ListModel and manually manage hierarchical indentation + ListModel { + id: treeModel + } + + onBaseRootPathChanged: { + treeModel.clear(); + var rootName = baseRootPath === "/" ? "Root" : (baseRootPath.split("/").pop() || baseRootPath); + treeModel.append({ + "name": rootName, + "path": baseRootPath, + "level": 0, + "expanded": false, + "hasChildren": true, + "isLoading": false + }); + expandNode(0); + + if (currentPath && currentPath.indexOf(baseRootPath) === 0 && currentPath !== baseRootPath) { + pendingExpandPath = currentPath; + isSyncing = true; + syncToPath(); + } + } + + Component.onCompleted: { + // Init with root + var rootName = baseRootPath === "/" ? "Root" : (baseRootPath.split("/").pop() || baseRootPath); + treeModel.append({ + "name": rootName, + "path": baseRootPath, + "level": 0, + "expanded": false, + "hasChildren": true, // Assume root has children + "isLoading": false + }); + // Immediately expand root + expandNode(0); + + if (currentPath && currentPath.indexOf(baseRootPath) === 0 && currentPath !== baseRootPath) { + pendingExpandPath = currentPath; + isSyncing = true; + syncToPath(); + } + } + + function expandNode(index) { + var node = treeModel.get(index); + + // If already expanded and not loading, we might still need to load if it has no children but should + // However, for now let's just allow re-requesting if isLoading is false or if explicitly called when collapsed + if (node.expanded && !node.isLoading) { + // Check if children already exist + var nextIndex = index + 1; + if (nextIndex < treeModel.count) { + var next = treeModel.get(nextIndex); + if (next.level > node.level) { + return; + } + } + // No children? Trigger load anyway + } else if (node.expanded) { + return; + } + + treeModel.setProperty(index, "expanded", true); + + if (node.isLoading) { + return; + } + + treeModel.setProperty(index, "isLoading", true); + + // Request subdirs + sendCommand({"action": "get_subdirs", "path": node.path}); + } + + function collapseNode(index) { + var node = treeModel.get(index); + + treeModel.setProperty(index, "expanded", false); + treeModel.setProperty(index, "isLoading", false); // Important: stop loading if collapsed + + // Remove children from model + // We need to remove all items following this node that have a level > node.level + // AND stop when we hit a node with level <= node.level + var currentLevel = node.level; + var i = index + 1; + var count = 0; + + while (i < treeModel.count) { + var child = treeModel.get(i); + if (child.level > currentLevel) { + count++; + i++; + } else { + break; + } + } + + if (count > 0) { + treeModel.remove(index + 1, count); + } + } + + function handleQueryResult(result) { + // Find which node requested this? + // We scan the model to find the node with matching path and isLoading=true + // Or just matching path and expanded=true but maybe no children yet? + + var path = result.path; + var dirs = result.dirs; + + var foundIndex = -1; + for(var i=0; i parentLevel) { + collapseNode(foundIndex); + treeModel.setProperty(foundIndex, "expanded", true); + } + } + + // Insert children + for(var j=0; j { + if (mouse.button === Qt.LeftButton) { + sendCommand({"action": "change_path", "path": model.path}); + } else if (mouse.button === Qt.RightButton) { + treeContextMenu.popup(); + } + } + } + + Menu { + id: treeContextMenu + background: Rectangle { + implicitWidth: 150 + implicitHeight: 75 + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + radius: 3 + } + + MenuItem { + id: setRootItem + text: "Set as Root" + onTriggered: { + treeRoot.baseRootPath = model.path; + } + + contentItem: Text { + text: setRootItem.text + color: "#e0e0e0" + font.pixelSize: 12 + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + leftPadding: 10 + } + + background: Rectangle { + implicitWidth: 150 + implicitHeight: 25 + color: setRootItem.highlighted ? "#555555" : "transparent" + } + } + + MenuItem { + id: revealItem + text: "Show in Finder" + onTriggered: { + // Using the same action name as the file context menu + treeRoot.sendCommand({"action": "reveal_in_finder", "path": model.path}) + } + + contentItem: Text { + text: revealItem.text + color: "#e0e0e0" + font.pixelSize: 12 + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + leftPadding: 10 + } + + background: Rectangle { + implicitWidth: 150 + implicitHeight: 25 + color: revealItem.highlighted ? "#555555" : "transparent" + } + } + } + + RowLayout { + anchors.fill: parent + spacing: 0 + + // Indentation + Item { + Layout.preferredWidth: model.level * 20 + 5 + Layout.fillHeight: true + } + + // Expander Arrow + Item { + Layout.preferredWidth: 20 + Layout.fillHeight: true + + Text { + anchors.centerIn: parent + text: model.hasChildren ? (model.expanded ? "▼" : "▶") : "" + color: treeRoot.hintColor + font.pixelSize: 10 + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + if (model.expanded) { + collapseNode(index); + } else { + expandNode(index); + } + } + } + } + + // Folder Icon + Item { + Layout.preferredWidth: 20 + Layout.fillHeight: true + Text { + anchors.centerIn: parent + text: "📁" + font.pixelSize: treeRoot.fontSize + } + } + + // Name + Text { + text: model.name + color: treeRoot.textColor + font.pixelSize: treeRoot.fontSize + Layout.fillWidth: true + Layout.fillHeight: true + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + leftPadding: 5 + } + + // Scan Button Container (Prevents layout jitter by taking space only if scan is possible) + Item { + Layout.preferredWidth: 56 + Layout.fillHeight: true + visible: treeRoot.getPathDepth(model.path) <= treeRoot.autoScanThreshold && !model.isLoading + + Rectangle { + anchors.centerIn: parent + visible: msgMouse.containsMouse || scanMouse.containsMouse + width: 46 + height: 18 + color: scanMouse.containsMouse ? XsFileSystemStyle.pressedColor : XsFileSystemStyle.panelBgColor + radius: 4 + border.color: XsFileSystemStyle.borderColor + border.width: 1 + + Text { + anchors.centerIn: parent + text: "SCAN" + color: XsFileSystemStyle.textColor + font.pixelSize: 8 + font.bold: true + } + + MouseArea { + id: scanMouse + anchors.fill: parent + hoverEnabled: true + onClicked: { + // Set path AND trigger scan in one atomic action + sendCommand({"action": "force_scan", "path": model.path}) + } + } + + ToolTip.visible: scanMouse.containsMouse + ToolTip.text: "Force media scan in this folder" + ToolTip.delay: 500 + } + } + + // Loading Indicator + Text { + text: "..." + color: treeRoot.hintColor + visible: model.isLoading + Layout.rightMargin: 5 + } + } + + + } + + ScrollBar.vertical: ScrollBar { + active: true + policy: ScrollBar.AsNeeded + width: 10 + background: Rectangle { color: XsFileSystemStyle.backgroundColor } + contentItem: Rectangle { + implicitWidth: 6 + implicitHeight: 100 + radius: 3 + color: treeView.active ? XsFileSystemStyle.hintColor : XsFileSystemStyle.secondaryTextColor + } + } + } + } +} diff --git a/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/FilesystemBrowser.qml b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/FilesystemBrowser.qml new file mode 100644 index 000000000..5358a7fa5 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/FilesystemBrowser.qml @@ -0,0 +1,2295 @@ +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import Qt.labs.qmlmodels 1.0 +import QtQuick.Shapes 1.15 // Added for vector icon + +import xStudio 1.0 +import xstudio.qml.models 1.0 +import xStudio 1.0 +import xstudio.qml.models 1.0 + +Rectangle { + id: root + color: XsFileSystemStyle.backgroundColor + anchors.fill: parent // Ensure it fills the panel + + + + // Access the attributes exposed by the plugin + property string currentFilterTime: "Any" + property string currentFilterVersion: "All Versions" + + XsModuleData { + id: pluginData + modelDataName: "Filesystem Browser" + } + + // Reusable Styled MenuItem component for consistent dark theme + component StyledItem : MenuItem { + id: inner + contentItem: Text { + text: inner.text + color: "#e0e0e0" + font.pixelSize: 12 + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + leftPadding: 10 + } + + background: Rectangle { + implicitWidth: 150 + implicitHeight: 25 + color: inner.highlighted ? "#555555" : "transparent" + } + } + + // Reusable Context Menu for files in both Table and Icon views + component FileContextMenu : Menu { + property string itemPath: "" + + background: Rectangle { + implicitWidth: 150 + implicitHeight: 100 // 4 items (25 each) + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + radius: 3 + } + + StyledItem { + text: "Replace" + onTriggered: sendCommand({"action": "replace_current_media", "path": itemPath}) + } + StyledItem { + text: "Compare with" + onTriggered: sendCommand({"action": "compare_with_current_media", "path": itemPath}) + } + StyledItem { + text: "Append to Playlist" + onTriggered: sendCommand({"action": "append_media", "path": itemPath}) + } + StyledItem { + text: "Copy Path" + onTriggered: sendCommand({"action": "copy_path", "path": itemPath}) + } + StyledItem { + text: "Show in Finder" + onTriggered: sendCommand({"action": "reveal_in_finder", "path": itemPath}) + } + } + + // State for Preview Mode + property bool isPreviewMode: false + property string pendingPreviewPath: "" + + Timer { + id: previewTimer + interval: 200 // Wait for double click + repeat: false + onTriggered: { + if (pendingPreviewPath !== "") { + isPreviewMode = true + sendCommand({"action": "preview_file", "path": pendingPreviewPath}) + pendingPreviewPath = "" + } + } + } + + // Additional Attributes for History/Pins + XsAttributeValue { + id: history_attr + attributeTitle: "history_paths" + model: pluginData + role: "value" + + function updateList() { + var rawVal = value + try { + if (typeof(rawVal) === "string" && rawVal !== "") { + if (rawVal === "[]") { + historyList = [] + } else { + var parsed = JSON.parse(rawVal) + historyList = parsed + } + } else { + historyList = [] + } + } catch(e) { + console.log("history_attr: Parse Error: " + e) + historyList = [] + } + } + + onValueChanged: updateList() + Component.onCompleted: updateList() + } + + XsAttributeValue { + id: pinned_attr + attributeTitle: "pinned_paths" + model: pluginData + role: "value" + + function updateList() { + var rawVal = value + try { + if (typeof(rawVal) === "string" && rawVal !== "") { + if (rawVal === "[]") { + pinnedList = [] + } else { + var parsed = JSON.parse(rawVal) + pinnedList = parsed + } + } else { + pinnedList = [] + } + } catch(e) { + console.log("pinned_attr: Parse Error: " + e) + pinnedList = [] + } + } + + onValueChanged: updateList() + Component.onCompleted: updateList() + } + + property var historyList: [] + property var pinnedList: [] + property var combinedList: [] + + function updateCombinedList() { + var combined = [] + var seen = new Set() // Set of paths + + // 1. Add Pinned Items + if (pinnedList) { + for (var i = 0; i < pinnedList.length; i++) { + var p = pinnedList[i] + combined.push({ + "name": p.name, + "path": p.path, + "isPinned": true + }) + // Add to seen set (mock Set using object for ES5/QML compat if needed, but modern QML has Set) + // actually JS in QML usually has Set. If not, use object keys. + seen.add(p.path) + } + } + + // 2. Add History Items + if (historyList) { + for (var j = 0; j < historyList.length; j++) { + var h = historyList[j] + if (!seen.has(h)) { + // Determine name (basename) + var name = h + if (h && h.indexOf("/") !== -1) { + var parts = h.split("/") + // Handle trailing slash + var last = parts[parts.length-1] + if (!last && parts.length > 1) last = parts[parts.length-2] + if (last) name = last + } + + combined.push({ + "name": name, + "path": h, + "isPinned": false + }) + seen.add(h) + } + } + } + + combinedList = combined + } + + // Trigger update when source lists change + onHistoryListChanged: updateCombinedList() + onPinnedListChanged: updateCombinedList() + + property bool isCurrentPinned: { + var curr = current_path_attr.value + for(var i=0; i 0 && pathField.activeFocus) { + completionPopup.open() + } else { + completionPopup.close() + } + } catch(e) { + completionList = [] + } + } + } + } + + XsAttributeValue { + id: scan_required_attr + attributeTitle: "scan_required" + model: pluginData + role: "value" + } + + // Dedicated attribute for sending batch thumbnail requests to Python. + // We write a JSON array of paths; Python queues them all into the ffmpeg worker pool. + XsAttributeValue { + id: thumbnail_request_attr + attributeTitle: "thumbnail_request" + model: pluginData + role: "value" + } + + XsAttributeValue { + id: auto_scan_threshold_attr + attributeTitle: "auto_scan_threshold" + model: pluginData + role: "value" + } + + XsAttributeValue { + id: searching_attr + attributeTitle: "searching" + model: pluginData + } + + XsAttributeValue { + id: scanned_dirs_attr + attributeTitle: "scanned_dirs" + model: pluginData + role: "value" + onValueChanged: { + try { + var val = value + if (val && val !== "[]") { + scannedDirsList = JSON.parse(val) + } else { + scannedDirsList = [] + } + } catch(e) { } + } + } + + XsAttributeValue { + id: depth_limit_attr + attributeTitle: "recursion_limit" + model: pluginData + role: "value" + } + + property var scannedDirsList: [] + + function sendCommand(cmd) { + command_attr.value = JSON.stringify(cmd) + } + + // Local property to hold the parsed JSON file list + property var fileList: [] + onFileListChanged: buildTree() + property var completionList: [] + + // Sorting State + property string sortColumn: "name" + property int sortOrder: 1 // 1 for asc, -1 for desc + + // View Mode: 0=List, 1=Tree, 2=Grouped + property int viewMode: 2 + onViewModeChanged: buildTree() + + + // Column Widths (Default values) + property real minWidthName: 250 + property real colWidthName: 250 // kept for legacy reference or init + property real colWidthOwner: 80 + property real colWidthVersion: 60 + property real colWidthDate: 140 + property real colWidthSize: 80 + property real colWidthFrames: 120 + + // Width Calculations + readonly property real fixedColumnsWidth: colWidthVersion + colWidthOwner + colWidthDate + colWidthSize + colWidthFrames + 20 // +20 spacer + property real totalContentWidth: Math.max(fileListView.width, minWidthName + fixedColumnsWidth + 10) // +10 margin/padding + + + // tree logic + property var treeRoots: [] + property var visibleTreeList: [] + property var collapsedPaths: ({}) + // Flat list of *file* items only — used for thumbnail request calculations. + property var thumbnailFileList: [] + // Complete mixed flat model (all groups + files). Not assigned to Repeater directly. + property var fullFlatModel: [] + // Paginated slice of fullFlatModel actually shown in the Repeater. + property var flatThumbnailModel: [] + // How many items from fullFlatModel are currently rendered. + property int thumbRenderCount: 0 + readonly property int thumbPageSize: 150 // initial page + readonly property int thumbPageStep: 100 // items added per scroll-load + onThumbnailFileListChanged: { + if (root.viewMode === 3) + Qt.callLater(requestVisibleThumbnails) + } + // Re-request thumbnails when the rendered page extends + onFlatThumbnailModelChanged: { + if (root.viewMode === 3) + Qt.callLater(requestVisibleThumbnails) + } + + // Only request thumbnails for items currently visible in the Flow. + // Estimates Y positions mathematically from scroll position, cell size, and Flow width. + function requestVisibleThumbnails() { + if (root.viewMode !== 3 || flatThumbnailModel.length === 0) return + + var scrollY = thumbFlickable.contentY + var viewH = thumbFlickable.height + var cellW = 160 + var headerH = 24 + var cellH = 160 + var cols = Math.max(1, Math.floor(Math.max(1, thumbFlickable.width) / cellW)) + + // One cell row above/below as prefetch buffer + var topY = Math.max(0, scrollY - cellH) + var bottomY = scrollY + viewH + cellH + + var pending = [] + var y = 0 + var col = 0 + + for (var i = 0; i < flatThumbnailModel.length; i++) { + var item = flatThumbnailModel[i] + if (item.type === "header") { + if (col > 0) { y += cellH; col = 0 } + y += headerH + } else { + if (col >= cols) { col = 0; y += cellH } + if (y + cellH >= topY && y <= bottomY) { + if (!item.thumbnailSource) pending.push(item.path) + } + col++ + } + } + + if (pending.length > 0) { + console.log("QML: requesting " + pending.length + " visible thumbnails") + thumbnail_request_attr.value = JSON.stringify(pending) + } + } + + function isVisible(data) { + if (!data) return true; + + // Text Filter + var filterText = filterField.text.trim(); + if (filterText !== "") { + if (data.name.toLowerCase().indexOf(filterText.toLowerCase()) === -1) return false; + } + + // Time Filter + var t_val = currentFilterTime; + if (t_val !== "Any" && data.date) { + var now = Date.now() / 1000.0; + var diff = now - data.date; + var day = 86400; + var timeMatch = true; + if (t_val === "Last 1 day") timeMatch = diff <= day; + else if (t_val === "Last 2 days") timeMatch = diff <= 2*day; + else if (t_val === "Last 1 week") timeMatch = diff <= 7*day; + else if (t_val === "Last 1 month") timeMatch = diff <= 30*day; + + if (!timeMatch) return false; + } + + // Version Filter + var v_val = currentFilterVersion; + if (v_val === "Latest Version") { + if (data.is_latest_version !== true) return false; + } else if (v_val === "Latest 2 Versions") { + if (data.version_rank !== undefined && data.version_rank > 1) return false; + } + + return true; + } + + function updateTreeVisibility(nodes) { + var hasVisible = false; + for(var i=0; i 0) { + var rootAbs = current_path_attr.value || "" + + // Fast O(N·depth) group compression using cumulative descendant counts. + // For each file dir, walk UP until we find an ancestor with 2+ total + // descendant files. That ancestor becomes the group header. + + // 1. Accumulate file counts up the tree + var descCount = {} + for (var i = 0; i < thumbList.length; i++) { + var cursor = thumbList[i].folderGroup + while (cursor.length > rootAbs.length) { + descCount[cursor] = (descCount[cursor] || 0) + 1 + var sl = cursor.lastIndexOf("/") + cursor = sl > 0 ? cursor.substring(0, sl) : rootAbs + } + descCount[rootAbs] = (descCount[rootAbs] || 0) + 1 + } + + // 2. For each file, walk up from leaf to find lowest ancestor with >= 2 files + // (cache results to avoid redundant walks) + var groupCache = {} + for (var i = 0; i < thumbList.length; i++) { + var leaf = thumbList[i].folderGroup + if (groupCache[leaf] !== undefined) { + thumbList[i].folderGroup = groupCache[leaf] + continue + } + var d = leaf + while (d.length > rootAbs.length && (descCount[d] || 0) < 2) { + var sl = d.lastIndexOf("/") + d = sl > 0 ? d.substring(0, sl) : rootAbs + } + var grouped = (descCount[d] || 0) >= 2 ? d : rootAbs + groupCache[leaf] = grouped + thumbList[i].folderGroup = grouped + } + } + + // Sort by group then name + thumbList.sort(function(a, b) { + if (a.folderGroup < b.folderGroup) return -1 + if (a.folderGroup > b.folderGroup) return 1 + return a.name < b.name ? -1 : 1 + }) + thumbnailFileList = thumbList + + // Build complete flat mixed model + var flat = [] + var prevGrp = null + for (var j = 0; j < thumbList.length; j++) { + var t = thumbList[j] + if (t.folderGroup !== prevGrp) { + flat.push({ type: "header", path: t.folderGroup }) + prevGrp = t.folderGroup + } + flat.push({ type: "file", name: t.name, path: t.path, + frames: t.frames, thumbnailSource: t.thumbnailSource || "", data: t.data }) + } + + // Paginate: only render the first page to avoid freezing on large dirs + fullFlatModel = flat + thumbRenderCount = Math.min(thumbPageSize, flat.length) + flatThumbnailModel = flat.slice(0, thumbRenderCount) + return + } + + // TREE / GROUPED VIEW + var lookups = {} + + function getFolderNode(path, name, parent) { + if (lookups[path]) return lookups[path]; + var node = { + "name": name, + "path": path, + "isFolder": true, + "children": [], + "data": null, + "expanded": (collapsedPaths[path] === undefined), + "visible": true + } + lookups[path] = node + if (parent) parent.children.push(node); + else roots.push(node); + return node + } + + var rootAbs = current_path_attr.value || "" + if (rootAbs !== "" && rootAbs.charAt(rootAbs.length-1) !== '/') rootAbs += '/' + + for(var i=0; i 0) compressNodes(node.children); + + while (node.children.length === 1) { + var child = node.children[0]; + node.name = node.name + "/" + child.name; + node.path = child.path; + node.data = child.data; + node.isFolder = child.isFolder; + node.children = child.children; + + if (node.isFolder) { + node.expanded = (collapsedPaths[node.path] === undefined); + } else { + node.expanded = false; + } + } + } + } + } + + // Only compress if in Grouped mode (2) + if (viewMode === 2) { + compressNodes(roots) + } + + treeRoots = roots + refreshFiltering() // Calculate visibility and flatten + sortTree() + } + + function sortTree() { + var col = sortColumn + var ord = sortOrder + + function recursiveSort(nodes) { + nodes.sort(function(a, b) { + if (a.isFolder !== b.isFolder) return (a.isFolder ? -1 : 1); + + if (a.isFolder) return a.name.localeCompare(b.name); + + var valA = a.data ? a.data[col] : "" + var valB = b.data ? b.data[col] : "" + + if (col === "size_str") { + var nA = parseFloat(valA) || 0 + var nB = parseFloat(valB) || 0 + return (nA - nB) * ord + } + if (col === "date" || col === "version" || col === "frames") { + return ((a.data ? (a.data[col]||0) : 0) - (b.data ? (b.data[col]||0) : 0)) * ord + } + + var sA = String(valA).toLowerCase() + var sB = String(valB).toLowerCase() + if (sA < sB) return -1 * ord + if (sA > sB) return 1 * ord + return 0 + }) + + for(var i=0; i 0) recursiveSort(nodes[i].children) + } + } + recursiveSort(treeRoots) + flattenTree() + } + + function flattenTree() { + var visible = [] + function traverse(nodes, depth) { + for(var i=0; i root.sendCommand(cmd) + + property int autoScanThreshold: auto_scan_threshold_attr.value || 4 + } + } + } + + // Main Content Side + ColumnLayout { + SplitView.fillWidth: true + anchors.margins: 10 + spacing: 5 + + // Path Input Row + RowLayout { + Layout.fillWidth: true + Layout.preferredHeight: rowHeight + spacing: 5 + + Text { + text: "Path:" + color: textColor + verticalAlignment: Text.AlignVCenter + } + + TextField { + id: pathField + Layout.fillWidth: true + Layout.preferredHeight: rowHeight + text: current_path_attr.value || "/" + color: textColor + font.pixelSize: fontSize + selectionColor: XsFileSystemStyle.selectionColor + selectedTextColor: XsFileSystemStyle.backgroundColor + onTextChanged: { + // This ensures that even if user is typing, a programmatic update + // to current_path_attr.value (e.g. from SCAN button) can force a refresh if needed. + // However, standard QML binding `text: ...` usually breaks if user edits. + // We'll add a listener to the attribute to force it back if it changes externally. + } + + Connections { + target: current_path_attr + function onValueChanged() { + pathField.text = current_path_attr.value || "/" + } + } + + background: Rectangle { + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + border.width: 1 + } + focus: true + selectByMouse: true + + TapHandler { + acceptedButtons: Qt.RightButton + onTapped: pathContextMenu.popup() + } + + Menu { + id: pathContextMenu + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 75 // 3 items + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + radius: 3 + } + + delegate: StyledItem {} // Using the shared component from the top! + + StyledItem { + text: "Copy" + onTriggered: pathField.copy() + } + StyledItem { + text: "Paste" + onTriggered: pathField.paste() + } + StyledItem { + text: "Clear" + onTriggered: pathField.clear() + } + } + + onAccepted: { + sendCommand({"action": "change_path", "path": text}) + } + + onTextEdited: { + sendCommand({"action": "complete_path", "path": text}) + } + + // Keys handling for completion (omitted for brevity, assume similar to before) + // Keys handling for completion + Keys.priority: Keys.BeforeItem + Keys.onPressed: (event) => { + // TAB + if (event.key === Qt.Key_Tab) { + event.accepted = true; + + var hasCompleted = false; + + // 1. Try Single Match or Common Prefix Completion first + if (completionList.length > 0) { + var prefix = getCommonPrefix(completionList); + // If we have a single match, prefix is the match itself. + + // If the calculated prefix is longer than what we currently have, utilize it. + // This covers both "Single Match" and "Partial Shell Completion" + if (prefix.length > text.length) { + text = prefix; + hasCompleted = true; + sendCommand({"action": "complete_path", "path": text}); + } + } + + // 2. If we didn't extend the text (ambiguous state), then Cycle through the list + if (!hasCompleted && completionPopup.opened && completionListView.count > 0) { + if (event.modifiers & Qt.ShiftModifier) { + completionListView.currentIndex = (completionListView.currentIndex - 1 + completionListView.count) % completionListView.count; + } else { + completionListView.currentIndex = (completionListView.currentIndex + 1) % completionListView.count; + } + } + } + // UP / DOWN + else if (event.key === Qt.Key_Up) { + if (completionPopup.opened && completionList.length > 0) { + event.accepted = true; + completionListView.decrementCurrentIndex(); + } + } + else if (event.key === Qt.Key_Down) { + if (completionPopup.opened && completionList.length > 0) { + event.accepted = true; + completionListView.incrementCurrentIndex(); + } + } + // RIGHT + else if (event.key === Qt.Key_Right) { + if (completionPopup.opened && completionListView.currentItem) { + // Drill Down + event.accepted = true; + text = completionList[completionListView.currentIndex]; + // Reset selection + completionListView.currentIndex = 0; + } + } + // ENTER / RETURN + else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + event.accepted = true; + // Always submit the current text, regardless of completion popup + sendCommand({"action": "change_path", "path": text}); + completionPopup.close(); + } + // ESC + else if (event.key === Qt.Key_Escape) { + event.accepted = true; + completionPopup.close(); + } + // CTRL+BACKSPACE + else if (event.key === Qt.Key_Backspace) { + if (event.modifiers & Qt.ControlModifier || event.modifiers & Qt.AltModifier) { + event.accepted = true; + // Directory Delete + var txt = text; + if (txt.endsWith("/")) txt = txt.slice(0, -1); + var lastSlash = txt.lastIndexOf("/"); + if (lastSlash !== -1) { + text = txt.substring(0, lastSlash + 1); + } else { + text = ""; + } + } + } + } + + // Keep completion popup + Popup { + id: completionPopup + width: parent.width + height: 200 + y: parent.height + 2 // Offset slightly + background: Rectangle { color: XsFileSystemStyle.panelBgColor; border.color: XsFileSystemStyle.borderColor } + contentItem: ListView { + id: completionListView + model: completionList + clip: true + highlight: Rectangle { color: XsFileSystemStyle.hoverColor } + highlightMoveDuration: 0 + delegate: Item { + width: parent.width + height: 25 + Rectangle { anchors.fill: parent; color: "transparent" } + Text { + text: modelData + color: "#ffffff" + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + leftPadding: 5 + font.pixelSize: fontSize + } + MouseArea { + anchors.fill: parent + hoverEnabled: true + onClicked: { + pathField.text = modelData + completionPopup.close() + pathField.forceActiveFocus() + sendCommand({"action": "complete_path", "path": pathField.text}) + } + } + } + } + } + } + + Button { + id: refreshBtn + Layout.preferredHeight: rowHeight + Layout.preferredWidth: rowHeight + text: "↻" + font.pixelSize: 16 + flat: true + onClicked: sendCommand({"action": "force_scan"}) + ToolTip.visible: hovered + ToolTip.text: "Refresh directory scan" + + background: Rectangle { + color: parent.down ? XsFileSystemStyle.pressedColor : (parent.hovered ? XsFileSystemStyle.hoverColor : "transparent") + } + contentItem: Text { + text: parent.text + color: "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + Button { + id: historyBtn + Layout.preferredHeight: rowHeight + Layout.preferredWidth: rowHeight + + // Using a down arrow character for simplicity if icon not available, + // but user asked for "Down Triangle". + text: "▼" + font.pixelSize: 10 + + contentItem: Text { + text: parent.text + font: parent.font + color: "#e0e0e0" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + + background: Rectangle { + color: parent.down || pathPopup.opened ? XsFileSystemStyle.pressedColor : (parent.hovered ? XsFileSystemStyle.hoverColor : "transparent") + border.width: 0 + } + + property var lastCloseTime: 0 + + onClicked: { + var timeSinceClose = Date.now() - lastCloseTime + if (timeSinceClose > 100) { + pathPopup.open() + } + } + + Popup { + id: pathPopup + y: parent.height + x: parent.width - width // Right align with button + width: 500 + height: 300 + padding: 0 + + onClosed: { + historyBtn.lastCloseTime = Date.now() + } + + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + + background: Rectangle { + color: XsFileSystemStyle.headerBgColor + border.color: XsFileSystemStyle.borderColor + } + + ColumnLayout { + anchors.fill: parent + anchors.margins: 1 + spacing: 0 + + // Header + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 25 + color: XsFileSystemStyle.panelBgColor + Label { + text: "QUICK ACCESS" + color: "#ffffff" + font.pixelSize: fontSize + font.bold: true + anchors.centerIn: parent + } + } + + ListView { + id: combinedView + Layout.fillWidth: true + Layout.fillHeight: true + clip: true + model: combinedList + + delegate: Rectangle { + width: ListView.view.width + height: 25 + color: mouseArea.containsMouse ? XsFileSystemStyle.hoverColor : "transparent" + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + sendCommand({"action": "change_path", "path": modelData.path}) + pathPopup.close() + } + } + + RowLayout { + anchors.fill: parent + spacing: 5 + + // Pin Toggle Button + Button { + Layout.preferredWidth: 25 + Layout.preferredHeight: 25 + + background: Rectangle { + color: "transparent" + } + + contentItem: Shape { + anchors.centerIn: parent + width: 14 + height: 14 + + // Scale the 24x24 SVG path to our 14x14 box + scale: 14/24.0 + transformOrigin: Item.Center + + ShapePath { + strokeWidth: 0 + strokeColor: "transparent" + fillColor: modelData.isPinned ? "#ffffff" : "#444444" + + // M16 12V4h1V2H7v2h1v8l-2 5v2h6v3.5l1 1 1-1V19h6v-2l-2-5z (Standard Pin) + // Coordinate system is roughly 24x24 + PathSvg { + path: "M16 12V4h1V2H7v2h1v8l-2 5v2h6v3.5l1 1 1-1V19h6v-2l-2-5z" + } + } + } + + onClicked: { + if (modelData.isPinned) { + sendCommand({"action": "remove_pin", "path": modelData.path}) + } else { + sendCommand({"action": "add_pin", "name": modelData.name, "path": modelData.path}) + } + } + } + + // Path Name + Text { + text: modelData.name + color: "#ffffff" + font.pixelSize: fontSize + Layout.fillWidth: true + elide: Text.ElideMiddle + verticalAlignment: Text.AlignVCenter + } + + // Path Hint (Right aligned, faded) + Text { + text: modelData.path + color: "#ffffff" + font.pixelSize: fontSize + Layout.preferredWidth: parent.width * 0.4 + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + visible: parent.width > 300 + } + + Item { Layout.preferredWidth: 5 } + } + } + ScrollBar.vertical: ScrollBar {} + } + } + } + } + } + + + + // Filter Row + RowLayout { + Layout.fillWidth: true + Layout.preferredHeight: rowHeight + spacing: 5 + + ComboBox { + id: filterTimeCombo + ToolTip.visible: hovered + ToolTip.text: "Filter files by modification time" + + contentItem: Text { + text: filterTimeCombo.displayText + font.pixelSize: XsFileSystemStyle.fontSize + color: XsFileSystemStyle.textColor + verticalAlignment: Text.AlignVCenter + leftPadding: 10 + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: rowHeight + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + radius: 2 + } + model: ["Any", "Last 1 day", "Last 2 days", "Last 1 week", "Last 1 month"] + Layout.preferredWidth: 120 + Layout.preferredHeight: rowHeight + currentIndex: model.indexOf(currentFilterTime) + onActivated: { + console.log("Time Filter Changed to: " + currentText) + // Send command to update backend + sendCommand({"action": "set_attribute", "name": "filter_time", "value": currentText}) + // Optimistically update local state (backend update will confirm it via onValueChanged) + currentFilterTime = currentText + fileListView.forceLayout() + } + delegate: ItemDelegate { + width: ListView.view.width + contentItem: Text { + text: modelData + color: XsFileSystemStyle.textColor + font.pixelSize: XsFileSystemStyle.fontSize + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + background: Rectangle { + color: parent.highlighted ? XsFileSystemStyle.hoverColor : XsFileSystemStyle.backgroundColor + } + highlighted: filterTimeCombo.highlightedIndex === index + } + + popup: Popup { + y: parent.height - 1 + width: parent.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: filterTimeCombo.popup.visible ? filterTimeCombo.delegateModel : null + currentIndex: filterTimeCombo.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + border.color: XsFileSystemStyle.borderColor + color: XsFileSystemStyle.backgroundColor + } + } + } + + ComboBox { + id: filterVersionCombo + ToolTip.visible: hovered + ToolTip.text: "Filter files by version (e.g. v001, v002)" + + contentItem: Text { + text: filterVersionCombo.displayText + font.pixelSize: XsFileSystemStyle.fontSize + color: XsFileSystemStyle.textColor + verticalAlignment: Text.AlignVCenter + leftPadding: 10 + } + + background: Rectangle { + implicitWidth: 140 + implicitHeight: rowHeight + color: XsFileSystemStyle.panelBgColor + border.color: XsFileSystemStyle.borderColor + radius: 2 + } + model: ["All Versions", "Latest Version", "Latest 2 Versions"] + Layout.preferredWidth: 140 + Layout.preferredHeight: rowHeight + currentIndex: model.indexOf(currentFilterVersion) + onActivated: { + sendCommand({"action": "set_attribute", "name": "filter_version", "value": currentText}) + currentFilterVersion = currentText + fileListView.forceLayout() + } + delegate: ItemDelegate { + width: ListView.view.width + contentItem: Text { + text: modelData + color: XsFileSystemStyle.textColor + font.pixelSize: XsFileSystemStyle.fontSize + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + background: Rectangle { + color: parent.highlighted ? XsFileSystemStyle.hoverColor : XsFileSystemStyle.backgroundColor + } + highlighted: filterVersionCombo.highlightedIndex === index + } + + popup: Popup { + y: parent.height - 1 + width: parent.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: filterVersionCombo.popup.visible ? filterVersionCombo.delegateModel : null + currentIndex: filterVersionCombo.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + border.color: XsFileSystemStyle.borderColor + color: XsFileSystemStyle.backgroundColor + } + } + } + + + + // Text Filter + TextField { + id: filterField + Layout.fillWidth: true + Layout.preferredHeight: rowHeight + placeholderText: "Filter String..." + placeholderTextColor: XsFileSystemStyle.hintColor + color: XsFileSystemStyle.textColor + font.pixelSize: XsFileSystemStyle.fontSize + leftPadding: 5 + background: Rectangle { color: XsFileSystemStyle.panelBgColor; border.color: XsFileSystemStyle.borderColor } + onTextEdited: refreshFiltering() + } + } + + + + // Table Header + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: rowHeight + color: XsFileSystemStyle.headerBgColor + + Item { + anchors.fill: parent + clip: true + RowLayout { + x: -fileListView.contentX + width: Math.max(parent.width, totalContentWidth) + height: parent.height + spacing: 0 + + // Helper to create columns + component HeaderColumn: Rectangle { + property string title + property string colId + property alias colWidth: rect.width + property bool resizable: true + id: rect + Layout.fillHeight: true + color: "transparent" + Layout.preferredWidth: width + Text { + text: title + (sortColumn === colId ? (sortOrder === 1 ? " ▲" : " ▼") : "") + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + leftPadding: 5 + color: root.XsFileSystemStyle.textColor + font.pixelSize: root.XsFileSystemStyle.fontSize + font.weight: Font.DemiBold + elide: Text.ElideRight + } + MouseArea { + anchors.fill: parent + onClicked: sortFiles(colId) + cursorShape: Qt.PointingHandCursor + } + Rectangle { + visible: resizable + width: 5; height: parent.height + anchors.right: parent.right + color: "transparent" + MouseArea { + anchors.fill: parent; cursorShape: Qt.SplitHCursor + drag.target: rect; drag.axis: Drag.XAxis + property real startX + onPressed: startX = mouseX + onPositionChanged: if(pressed) { var d=mouseX-startX; if(rect.width+d>30) rect.width+=d } + } + } + } + + HeaderColumn { title: "Name"; colId: "name"; Layout.fillWidth: true; Layout.minimumWidth: minWidthName; resizable: false } + HeaderColumn { title: "Version"; colId: "version"; width: colWidthVersion; onWidthChanged: colWidthVersion=width } + HeaderColumn { title: "Frames"; colId: "frames"; width: colWidthFrames; onWidthChanged: colWidthFrames=width } + HeaderColumn { title: "Owner"; colId: "owner"; width: colWidthOwner; onWidthChanged: colWidthOwner=width } + HeaderColumn { title: "Date"; colId: "date"; width: colWidthDate; onWidthChanged: colWidthDate=width } + HeaderColumn { title: "Size"; colId: "size_str"; width: colWidthSize; onWidthChanged: colWidthSize=width } + Item { width: 20 } // Spacer at end + } + } + } + + // File List + Item { + Layout.fillWidth: true + Layout.fillHeight: true + + Rectangle { anchors.fill: parent; color: XsFileSystemStyle.backgroundColor } + + ListView { + id: fileListView + anchors.fill: parent + anchors.rightMargin: 12 + visible: root.viewMode !== 3 + focus: visible + onVisibleChanged: { if (visible) forceActiveFocus() } + + Keys.onLeftPressed: (event) => { + if (currentIndex > 0) currentIndex-- + event.accepted = true + } + Keys.onRightPressed: (event) => { + if (currentIndex < count - 1) currentIndex++ + event.accepted = true + } + Keys.onReturnPressed: (event) => _handleListReturn(event) + Keys.onEnterPressed: (event) => _handleListReturn(event) + + function _handleListReturn(event) { + if (currentIndex >= 0 && currentIndex < count) { + var md = visibleTreeList[currentIndex] + if (md) { + previewTimer.stop() + if (md.isFolder) { + sendCommand({"action": "change_path", "path": md.path}) + } else { + isPreviewMode = false + sendCommand({"action": "load_file", "path": md.path}) + } + } + } + event.accepted = true + } + + onCurrentIndexChanged: { + if (activeFocus && currentItem) { + if (!currentItem.isItemFolder) { + root.pendingPreviewPath = currentItem.itemPath + previewTimer.restart() + } + } + } + + // Nothing found message + Text { + anchors.centerIn: parent + text: "Nothing found" + color: XsFileSystemStyle.hintColor + font.pixelSize: XsFileSystemStyle.fontSize + 6 + visible: fileListView.count === 0 && !searching_attr.value && !scan_required_attr.value + } + clip: true + model: visibleTreeList + + contentWidth: totalContentWidth + flickableDirection: Flickable.HorizontalAndVerticalFlick + boundsBehavior: Flickable.StopAtBounds + + // Manual Scan Overlay + Rectangle { + anchors.centerIn: parent + width: 200 + height: 100 + color: "#333333" + visible: scan_required_attr.value === true + z: 100 // Ensure it's on top + + ColumnLayout { + anchors.centerIn: parent + spacing: 10 + + Text { + text: "Manual Scan Required" + color: "#aaaaaa" + font.pixelSize: 14 + Layout.alignment: Qt.AlignHCenter + } + + Button { + text: "Scan Directory" + Layout.alignment: Qt.AlignHCenter + onClicked: sendCommand({"action": "force_scan"}) + + background: Rectangle { + color: parent.down ? "#444444" : "#555555" + radius: 3 + } + contentItem: Text { + text: parent.text + color: "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 12 + } + } + } + } + + delegate: Rectangle { + id: delegate + width: totalContentWidth + height: rowHeight + + property bool isSelected: ListView.isCurrentItem + property bool isHovered: false + property string itemPath: modelData.path + property bool isItemFolder: modelData.isFolder + + Rectangle { + anchors.fill: parent + color: isSelected ? XsFileSystemStyle.selectionColor : (isHovered ? XsFileSystemStyle.hoverColor : (index % 2 == 0 ? XsFileSystemStyle.backgroundColor : XsFileSystemStyle.alternateBgColor)) + } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onEntered: isHovered = true + onExited: isHovered = false + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: (mouse) => { + fileListView.currentIndex = index + fileListView.forceActiveFocus() + if (mouse.button === Qt.RightButton) { + contextMenu.popup() + } else if (mouse.button === Qt.LeftButton) { + if (!modelData.isFolder) { + root.pendingPreviewPath = modelData.path + previewTimer.restart() + } + } + } + onDoubleClicked: (mouse) => { + if (mouse.button === Qt.LeftButton) { + previewTimer.stop() + fileListView.currentIndex = index + if (modelData.isFolder) { + sendCommand({"action": "change_path", "path": modelData.path}) + } else { + isPreviewMode = false + sendCommand({"action": "load_file", "path": modelData.path}) + } + } + } + } + + RowLayout { + anchors.fill: parent + spacing: 0 + + // Cells + component Cell: Text { + property real w + property int elideMode: Text.ElideRight + Layout.preferredWidth: w + Layout.fillHeight: true + verticalAlignment: Text.AlignVCenter + elide: elideMode + leftPadding: 5 + color: isSelected ? root.XsFileSystemStyle.textColor : root.XsFileSystemStyle.secondaryTextColor + font.pixelSize: fontSize + } + + // Indentation + Item { + Layout.preferredWidth: (modelData.depth||0) * 20 + Layout.fillHeight: true + } + + // Expander + Item { + Layout.preferredWidth: 20 + Layout.fillHeight: true + Text { + anchors.centerIn: parent + text: (root.viewMode !== 0 && root.viewMode !== 3 && modelData.isFolder) ? (modelData.expanded ? "▼" : "▶") : "" + color: XsFileSystemStyle.hintColor + font.pixelSize: 10 + } + MouseArea { + anchors.fill: parent + onClicked: toggleExpand(index) + } + } + + Cell { text: modelData.name || ""; Layout.fillWidth: true; Layout.minimumWidth: minWidthName; elideMode: Text.ElideMiddle } + Cell { text: (modelData.data && modelData.data.version) ? "v"+modelData.data.version : ""; w: colWidthVersion; color: isSelected ? root.XsFileSystemStyle.textColor : root.XsFileSystemStyle.secondaryTextColor } + Cell { text: (modelData.data && modelData.data.frames) || ""; w: colWidthFrames; color: isSelected ? root.XsFileSystemStyle.textColor : root.XsFileSystemStyle.secondaryTextColor } + Cell { text: (modelData.data && modelData.data.owner) || ""; w: colWidthOwner; color: isSelected ? root.XsFileSystemStyle.textColor : root.XsFileSystemStyle.secondaryTextColor } + Cell { text: modelData.data ? formatDate(modelData.data.date) : ""; w: colWidthDate; color: isSelected ? root.XsFileSystemStyle.textColor : root.XsFileSystemStyle.secondaryTextColor } + Cell { text: (modelData.data && modelData.data.size_str) || ""; w: colWidthSize; horizontalAlignment: Text.AlignRight; rightPadding: 5 } + Item { width: 20 } // Spacer at end + } + + FileContextMenu { + id: contextMenu + itemPath: modelData.path + } + } + } + + // Thumbnail view: Flickable + Flow for reliable scrolling with folder headers + Flickable { + id: thumbFlickable + anchors.fill: parent + visible: root.viewMode === 3 + clip: true + contentWidth: width + contentHeight: thumbFlow.implicitHeight + flickableDirection: Flickable.VerticalFlick + + focus: visible + onVisibleChanged: { if (visible) forceActiveFocus() } + + property int thumbCurrentIndex: -1 + + Keys.onLeftPressed: (event) => { + var newIdx = thumbCurrentIndex + do { + if (newIdx > 0) newIdx-- + else break + } while (flatThumbnailModel[newIdx] && flatThumbnailModel[newIdx].type === "header") + if (newIdx !== thumbCurrentIndex) { + thumbCurrentIndex = newIdx + _handleThumbKeyPreview() + } + event.accepted = true + } + Keys.onRightPressed: (event) => { + var newIdx = thumbCurrentIndex + var maxIdx = flatThumbnailModel.length - 1 + do { + if (newIdx < maxIdx) newIdx++ + else break + } while (flatThumbnailModel[newIdx] && flatThumbnailModel[newIdx].type === "header") + if (newIdx !== thumbCurrentIndex) { + thumbCurrentIndex = newIdx + _handleThumbKeyPreview() + } + event.accepted = true + } + Keys.onUpPressed: (event) => { + var cols = Math.max(1, Math.floor(thumbFlow.width / 160)) + var newIdx = thumbCurrentIndex - cols + if (newIdx >= 0) { + while (newIdx > 0 && flatThumbnailModel[newIdx] && flatThumbnailModel[newIdx].type === "header") newIdx-- + thumbCurrentIndex = newIdx + _handleThumbKeyPreview() + } + event.accepted = true + } + Keys.onDownPressed: (event) => { + var cols = Math.max(1, Math.floor(thumbFlow.width / 160)) + var maxIdx = flatThumbnailModel.length - 1 + var newIdx = thumbCurrentIndex + cols + if (newIdx <= maxIdx) { + while (newIdx < maxIdx && flatThumbnailModel[newIdx] && flatThumbnailModel[newIdx].type === "header") newIdx++ + thumbCurrentIndex = newIdx + _handleThumbKeyPreview() + } + event.accepted = true + } + Keys.onReturnPressed: (event) => _handleThumbReturn(event) + Keys.onEnterPressed: (event) => _handleThumbReturn(event) + + function _handleThumbReturn(event) { + if (thumbCurrentIndex >= 0 && thumbCurrentIndex < flatThumbnailModel.length) { + var md = flatThumbnailModel[thumbCurrentIndex] + if (md && md.type === "file") { + previewTimer.stop() + isPreviewMode = false + sendCommand({"action": "load_file", "path": md.path}) + } + } + event.accepted = true + } + + function _handleThumbKeyPreview() { + if (thumbCurrentIndex >= 0 && thumbCurrentIndex < flatThumbnailModel.length) { + var md = flatThumbnailModel[thumbCurrentIndex] + if (md && md.type === "file") { + root.pendingPreviewPath = md.path + previewTimer.restart() + } + } + } + + onContentYChanged: { + // Extend the rendered page when the user scrolls near the bottom + var remaining = contentHeight - contentY - height + if (remaining < 600 && thumbRenderCount < fullFlatModel.length) { + thumbRenderCount = Math.min(thumbRenderCount + thumbPageStep, fullFlatModel.length) + flatThumbnailModel = fullFlatModel.slice(0, thumbRenderCount) + } + Qt.callLater(requestVisibleThumbnails) + } + + ScrollBar.vertical: ScrollBar { + policy: ScrollBar.AsNeeded + } + + Flow { + id: thumbFlow + width: thumbFlickable.contentWidth + spacing: 0 + + Repeater { + model: flatThumbnailModel + + delegate: Item { + id: flatDelegate + width: modelData.type === "header" ? thumbFlow.width : 160 + height: modelData.type === "header" ? 24 : 160 + + // ── Folder path header (spans full row) ──────────── + Rectangle { + anchors.fill: parent + visible: modelData.type === "header" + color: "#1a1a1a" + Rectangle { width: 3; height: parent.height; color: "#4a9eff" } + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left; anchors.leftMargin: 10 + text: modelData.type === "header" ? modelData.path : "" + color: "#7aacce"; font.pixelSize: 11; font.bold: true + elide: Text.ElideLeft + width: parent.width - 16 + } + } + + // ── Thumbnail cell ────────────────────────────────── + property bool isSelected: (index === thumbFlickable.thumbCurrentIndex) + + Rectangle { + anchors.fill: parent; anchors.margins: 5 + visible: modelData.type === "file" + color: (isSelected) ? "#555555" : (cellMouse.containsMouse ? "#333333" : "#2a2a2a") + radius: 4 + border.color: (isSelected || cellMouse.containsMouse) ? "#777777" : "transparent" + border.width: isSelected ? 2 : (cellMouse.containsMouse ? 1 : 0) + } + + ColumnLayout { + anchors.fill: parent; anchors.margins: 10 + spacing: 4 + visible: modelData.type === "file" + + Item { + Layout.fillWidth: true; Layout.fillHeight: true + BusyIndicator { + anchors.centerIn: parent; width: 30; height: 30 + running: !modelData.thumbnailSource && modelData.type === "file" + visible: running + } + Image { + anchors.fill: parent + source: modelData.thumbnailSource || "" + fillMode: Image.PreserveAspectFit + asynchronous: true + visible: !!modelData.thumbnailSource + } + } + + Item { + Layout.fillWidth: true; height: 32; clip: true + property string rawName: modelData.name || "" + property string ext: { + var d = rawName.lastIndexOf(".") + return d >= 0 ? rawName.slice(d + 1) : "" + } + property string stem: { + var d = rawName.lastIndexOf(".") + return d >= 0 ? rawName.slice(0, d) : rawName + } + property string baseName: stem.replace(/[#@%]+$/, "").replace(/\.$/, "") + property string frameRange: modelData.frames || "" + + Text { + anchors.top: parent.top + anchors.left: parent.left; anchors.right: parent.right + text: parent.baseName; color: "#e0e0e0"; font.pixelSize: 11 + horizontalAlignment: Text.AlignHCenter; elide: Text.ElideMiddle + } + Text { + anchors.bottom: parent.bottom; anchors.left: parent.left + text: parent.ext; color: "#888888"; font.pixelSize: 10 + visible: parent.ext !== "" + } + Text { + anchors.bottom: parent.bottom; anchors.right: parent.right + text: parent.frameRange; color: "#888888"; font.pixelSize: 10 + visible: parent.frameRange !== "" + } + } + } + + MouseArea { + id: cellMouse + anchors.fill: parent; hoverEnabled: true + visible: modelData.type === "file" + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: (mouse) => { + if (mouse.button === Qt.LeftButton) { + thumbFlickable.forceActiveFocus() + thumbFlickable.thumbCurrentIndex = index + root.pendingPreviewPath = modelData.path + previewTimer.restart() + } else if (mouse.button === Qt.RightButton) { + thumbContextMenu.popup() + } + } + onDoubleClicked: (mouse) => { + if (mouse.button === Qt.LeftButton) { + previewTimer.stop() + isPreviewMode = false + sendCommand({"action": "load_file", "path": modelData.path}) + } + } + + FileContextMenu { + id: thumbContextMenu + itemPath: modelData.path + } + + ToolTip { + delay: 500 + visible: cellMouse.containsMouse && modelData.type === "file" + + contentItem: Text { + text: { + if (modelData.type !== "file") return "" + // parent directory path only + var txt = modelData.path + var sl = txt.lastIndexOf("/") + if (sl >= 0) txt = txt.substring(0, sl) + + txt += "\n" + (modelData.name || "") + if (modelData.frames) txt += "\nFrames: " + modelData.frames + if (modelData.data && modelData.data.date) txt += "\nModified: " + formatDate(modelData.data.date) + if (modelData.data && modelData.data.size_str) txt += "\nSize: " + modelData.data.size_str + return txt + } + color: "#e0e0e0" + font.pixelSize: 11 + } + + background: Rectangle { + color: XsFileSystemStyle.panelBgColor + radius: 3 + border.color: XsFileSystemStyle.borderColor + } + } + } + } // delegate + } // Repeater + } // Flow + } // Flickable + + // Nothing found message + Text { + anchors.centerIn: parent + text: "Nothing found" + color: "#666666" + font.pixelSize: 18 + visible: root.viewMode === 3 && flatThumbnailModel.length === 0 && !searching_attr.value && !scan_required_attr.value + } + + // Manual Scan Overlay + Rectangle { + anchors.centerIn: parent + width: 200 + height: 100 + color: "#333333" + visible: root.viewMode === 3 && scan_required_attr.value === true + z: 100 // Ensure it's on top + + ColumnLayout { + anchors.centerIn: parent + spacing: 10 + + Text { + text: "Manual Scan Required" + color: "#aaaaaa" + font.pixelSize: 14 + Layout.alignment: Qt.AlignHCenter + } + + Button { + text: "Scan Directory" + Layout.alignment: Qt.AlignHCenter + onClicked: sendCommand({"action": "force_scan"}) + + background: Rectangle { + color: parent.down ? "#444444" : "#555555" + radius: 3 + } + contentItem: Text { + text: parent.text + color: "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 12 + } + } + } + } + + ScrollBar { + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + active: true + // The ScrollView (thumbnail mode) has its own built-in scrollbar + visible: root.viewMode !== 3 + policy: ScrollBar.AsNeeded + size: fileListView.visibleArea.heightRatio + position: fileListView.visibleArea.yPosition + onPositionChanged: if(pressed) { + fileListView.contentY = position * fileListView.contentHeight + } + } + } + + // Scanned Dirs Log (Visible during scan) + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: searching_attr.value ? 100 : 0 + color: "#1a1a1a" + visible: searching_attr.value === true + clip: true + + ListView { + anchors.fill: parent + model: scannedDirsList + clip: true + delegate: Text { + text: modelData + color: "#888888" + font.pixelSize: 10 + width: ListView.view.width + elide: Text.ElideMiddle + } + + // Auto-scroll to bottom + onCountChanged: { + positionViewAtEnd() + } + } + } + + // Bottom Footer: Progress + View Modes + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 24 + color: "transparent" + + RowLayout { + anchors.fill: parent + spacing: 10 + + // Progress Bar (Left - fills remaining space) + ProgressBar { + id: scanProgress + Layout.fillWidth: true + Layout.preferredHeight: 6 + Layout.alignment: Qt.AlignVCenter + + // Only visible when scanning + visible: searching_attr.value === true + + from: 0 + to: 100 + value: progress_attr.value + indeterminate: true + + background: Rectangle { + implicitWidth: 200 + implicitHeight: 6 + color: "#444444" + radius: 3 + } + contentItem: Item { + implicitWidth: 200 + implicitHeight: 4 + Rectangle { + width: scanProgress.visualPosition * parent.width + height: parent.height + radius: 2 + color: "#17a81a" + } + } + } + + // If not scanning, we need a spacer to push buttons to right + Item { + Layout.fillWidth: true + visible: !scanProgress.visible + } + + // Preview Indicator + Rectangle { + Layout.preferredWidth: 60 + Layout.preferredHeight: 18 + Layout.alignment: Qt.AlignVCenter + color: "transparent" + + Text { + anchors.centerIn: parent + text: "Preview" + color: isPreviewMode ? "#66ff66" : "#444444" + font.pixelSize: 10 + font.bold: isPreviewMode + } + } + + // Divider (Vertical line) + Rectangle { + Layout.preferredWidth: 1 + Layout.preferredHeight: 14 + color: "#444444" + Layout.alignment: Qt.AlignVCenter + } + + + // View Mode Selector (Right) + RowLayout { + spacing: 0 + Layout.alignment: Qt.AlignVCenter + + Repeater { + model: ["List", "Tree", "Grouped", "Thumbnails"] + delegate: Rectangle { + width: 60 + height: 18 + color: (viewMode === index) ? "#444444" : "transparent" + border.color: XsFileSystemStyle.borderColor + border.width: 1 + + // Connecting borders + anchors.leftMargin: index > 0 ? -1 : 0 + + Text { + anchors.centerIn: parent + text: modelData + color: (viewMode === index) ? "#ffffff" : "#888888" + font.pixelSize: 10 + } + + MouseArea { + anchors.fill: parent + onClicked: viewMode = index + hoverEnabled: true + onEntered: parent.color = (viewMode === index) ? "#555555" : "#333333" + onExited: parent.color = (viewMode === index) ? "#444444" : "transparent" + } + } + } + } + + Item { Layout.preferredWidth: 5 } // Right margin + } + } + } +} +} diff --git a/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/XsFileSystemStyle.qml b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/XsFileSystemStyle.qml new file mode 100644 index 000000000..20e88532e --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/XsFileSystemStyle.qml @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma Singleton +import QtQuick 2.15 +import xStudio 1.0 + +QtObject { + + // Backgrounds + property color backgroundColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgColor !== undefined) ? XsStyleSheet.panelBgColor : "#333333" + property color panelBgColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgColor !== undefined) ? XsStyleSheet.panelBgColor : "#333333" + property color headerBgColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelTitleBarColor !== undefined) ? XsStyleSheet.panelTitleBarColor : "#474747" + property color alternateBgColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgColor !== undefined) ? Qt.darker(XsStyleSheet.panelBgColor, 1.1) : "#2d2d2d" + + // Text Colors + property color textColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.primaryTextColor !== undefined) ? XsStyleSheet.primaryTextColor : "#F1F1F1" + property color secondaryTextColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.secondaryTextColor !== undefined) ? XsStyleSheet.secondaryTextColor : "#C1C1C1" + property color hintColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.hintColor !== undefined) ? XsStyleSheet.hintColor : "#959595" + property color accentColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.accentColor !== undefined) ? XsStyleSheet.accentColor : "#D17000" + + // Interaction Colors + property color selectionColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgFlatColor !== undefined) ? Qt.lighter(XsStyleSheet.panelBgFlatColor, 1.35) : "#7a7a7a" + property color hoverColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgColor !== undefined) ? Qt.lighter(XsStyleSheet.panelBgColor, 1.15) : "#3D3D3D" + property color pressedColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.panelBgColor !== undefined) ? Qt.darker(XsStyleSheet.panelBgColor, 1.1) : "#2A2A2A" + + // Borders / Dividers + property color borderColor: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.menuBorderColor : "#858585" + property color dividerColor: (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.menuDividerColor !== undefined) ? XsStyleSheet.menuDividerColor : (typeof XsStyleSheet !== 'undefined' && XsStyleSheet.menuBorderColor !== undefined) ? XsStyleSheet.menuBorderColor : "#858585" + + // Fonts + property string fontFamily: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.fontFamily : "Inter" + property real fontSize: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.fontSize : 12 + property string fixedWidthFontFamily: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.fixedWidthFontFamily : "Monospace" + + // Dimensions + property real rowHeight: 28 + property real headerHeight: 30 + property real padding: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.panelPadding : 4 + property real widgetHeight: (typeof XsStyleSheet !== 'undefined') ? XsStyleSheet.widgetStdHeight : 24 +} diff --git a/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/icons/folder_closed.svg b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/icons/folder_closed.svg new file mode 100644 index 000000000..281be32d9 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/icons/folder_closed.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/qmldir b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/qmldir new file mode 100644 index 000000000..2bc1bc631 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowser.1/qmldir @@ -0,0 +1,3 @@ +module FilesystemBrowser +FilesystemBrowser 1.0 FilesystemBrowser.qml +singleton XsFileSystemStyle 1.0 XsFileSystemStyle.qml diff --git a/src/plugin/python_plugins/filesystem_browser/scanner.py b/src/plugin/python_plugins/filesystem_browser/scanner.py new file mode 100644 index 000000000..5fb2bb4a9 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/scanner.py @@ -0,0 +1,416 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Sam Richards + +import os +import re +import threading +import queue +import time +import pwd +import json +from concurrent.futures import ThreadPoolExecutor + +try: + import fileseq +except ImportError: + fileseq = None + +class FileScanner: + def __init__(self, config=None): + self.config = config or {} + self.extensions = set(self.config.get("extensions", [".mov", ".exr", ".png", ".mp4", ".jpg", ".jpeg", ".dpx", ".tiff", ".tif"])) + self.ignore_dirs = set(self.config.get("ignore_dirs", [".git", ".svn", "__pycache__"])) + self.non_sequence_extensions = set(self.config.get("non_sequence_extensions", [".mov", ".mp4"])) + self.version_regex = re.compile(self.config.get("version_regex", r"_v(\d+)")) + self.max_workers = self.config.get("thread_count", 4) + self.max_depth = self.config.get("max_depth", 6) + + self.cancel_event = threading.Event() + self.executor = ThreadPoolExecutor(max_workers=self.max_workers) + + + + def get_owner(self, uid): + try: + return pwd.getpwuid(uid).pw_name + except KeyError: + return str(uid) + + def format_size_str(self, size_bytes): + if size_bytes == 0: + return "0 B" + + size_name = ("B", "KB", "MB", "GB", "TB", "PB") + i = 0 + p = float(size_bytes) + + while i < len(size_name) - 1 and p >= 1024: + p /= 1024.0 + i += 1 + + return f"{p:.2f} {size_name[i]}" + + def scan(self, start_path, callback=None): + """ + Scans from start_path using BFS and weighted progress. + callback(results, progress_info) is called periodically. + """ + self.cancel_event.clear() + + from collections import deque + from concurrent.futures import wait, FIRST_COMPLETED + + # Queue of (path, weight, depth) + queue = deque([(start_path, 1.0, 0)]) + + # Futures set + futures = set() + + # Results accumulator + all_items = [] + + # Progress tracking + total_progress = 0.0 + scanned_count = 0 + last_update = time.time() + + # Scanned paths tracking + recent_scanned_dirs = [] + + # Helper to schedule + def schedule_next(): + while queue and len(futures) < self.max_workers: + path, weight, depth = queue.popleft() + # Submit task + futures.add(self.executor.submit(self._scan_and_process_worker, path, start_path, weight, depth)) + + schedule_next() + + while (futures or queue) and not self.cancel_event.is_set(): + # Wait for some work to complete + done, _ = wait(futures, timeout=0.05, return_when=FIRST_COMPLETED) + + for f in done: + futures.remove(f) + try: + subdirs, items, weight, depth, scanned_path = f.result() + + # Accumulate results + if items: + all_items.extend(items) + scanned_count += len(items) + + recent_scanned_dirs.append(scanned_path) + + if callback and items: + # Send partial results + # Note: We send empty list for items here if we want to batch them? + # Original code sent items immediately. + callback(items, {"scanned": scanned_count, "progress": total_progress * 100, "phase": "scanning", "scanned_dirs": []}) + + # Distribute weight or complete it + if subdirs and depth < self.max_depth: + if len(subdirs) > 0: + child_weight = weight / len(subdirs) + for d in subdirs: + queue.append((d, child_weight, depth + 1)) + else: + # Leaf node (in terms of dirs or recursion limit), this weight is done + total_progress += weight + + except Exception as e: + print(f"Scan error: {e}") + + # Schedule more + schedule_next() + + # Periodic Progress update + if time.time() - last_update > 0.2: + if callback: + callback([], { + "scanned": scanned_count, + "progress": min(100, int(total_progress * 100)), + "phase": "scanning", + "scanned_dirs": list(recent_scanned_dirs) + }) + recent_scanned_dirs = [] + last_update = time.time() + + if self.cancel_event.is_set(): + for f in futures: + f.cancel() + return all_items # Return what we have + + # Final update + if callback: + callback([], {"scanned": scanned_count, "progress": 100, "phase": "complete", "scanned_dirs": list(recent_scanned_dirs)}) + + return all_items + + def _scan_and_process_worker(self, path, root_path, weight, depth): + """ + Scans a directory, processes files therein, returns (subdirs, items, weight, depth, path). + """ + subdirs = [] + raw_files = [] + + if self.cancel_event.is_set(): + return [], [], weight, depth, path + + try: + with os.scandir(path) as entries: + for entry in entries: + if self.cancel_event.is_set(): + break + + if entry.is_dir(follow_symlinks=False): + if entry.name not in self.ignore_dirs and not entry.name.startswith('.'): + subdirs.append(entry.path) + # Also add directory as an item + try: + raw_files.append((entry.path, entry.name, entry.stat(), True)) # True for is_dir + except OSError: + pass + elif entry.is_file(): + ext = os.path.splitext(entry.name)[1].lower() + if ext in self.extensions: + try: + raw_files.append((entry.path, entry.name, entry.stat(), False)) # False for is_dir + except OSError: + pass + except OSError: + pass + + # Process files immediately + items = self._process_files(raw_files, root_path) + return subdirs, items, weight, depth, path + + def _process_files(self, raw_files, start_path): + """ + raw_files: list of (full_path, basename, stat_obj, is_dir) + """ + path_map = {f[0]: (f[1], f[2]) for f in raw_files} # path -> (name, stat) + + final_items = [] + sequence_candidate_paths = [] + + # Split into sequence candidates and singles + for p, name, st, is_dir in raw_files: + if is_dir: + final_items.append(self._make_item(p, name, st, start_path, is_directory=True)) + continue + + ext = os.path.splitext(name)[1].lower() + if ext in self.non_sequence_extensions: + # Treat strictly as single file + final_items.append(self._make_item(p, name, st, start_path)) + else: + sequence_candidate_paths.append(p) + + # Use fileseq to find sequences among candidates + # Import moved to top level or check self.HAS_FILESEQ? + # The file has 'try: import fileseq ...' at top level + + sequences = [] + if fileseq and sequence_candidate_paths: + try: + sequences = fileseq.findSequencesInList(sequence_candidate_paths) + except Exception as e: + sequences = [] # Fallback? + + if not fileseq and sequence_candidate_paths: + # Fallback: Treat all as singles + for p in sequence_candidate_paths: + info = path_map.get(p) + if info: + final_items.append(self._make_item(p, info[0], info[1], start_path)) + + for seq in sequences: + # Check if we should explode this sequence (if it's actually versioned files matching config) + explode = False + + # If length is 1, it's virtually a single file, but fileseq wraps it. + # If length > 1, check if it matches version regex but shouldn't? + # Existing logic: + if len(seq) > 1: + try: + # If the basename doesn't match version regex, but one file does?? + # This logic seems to prevent detecting a sequence if the naming is ambiguous? + # Let's keep existing logic but careful. + # Actually, if len > 1, it IS a sequence usually. + pass + except Exception as e: + pass + + if len(seq) == 1: + # Treat as single file + str_p = str(seq[0]) + info = path_map.get(str_p) + if info: + final_items.append(self._make_item(str_p, info[0], info[1], start_path)) + continue + + # It's a sequence + max_mtime = 0 + total_size = 0 + valid_seq = True + + # Calculate stats + for p in seq: + info = path_map.get(str(p)) + if info: + st = info[1] + if st.st_mtime > max_mtime: + max_mtime = st.st_mtime + total_size += st.st_size + else: + # Should not happen as we built candidates from map + pass + + # Retrieve owner from first + first_path = str(seq[0]) + first_info = path_map.get(first_path) + owner = self.get_owner(first_info[1].st_uid) if first_info else "?" + + # Format name + try: + pad = seq.padding() + if pad: + pad_len = pad.count('#') * 4 + pad.count('@') + pad = "@" * pad_len + else: + pad = "@@@@" # Default? + except: + pad = "@@@@" + + name = f"{seq.basename()}{pad}{seq.extension()}" + + # Create item + # Use abspath for seq path? + # fileseq string representation might be relative if input was relative? + # input was 'p' from raw_files which is full path. + + # fileseq.FileSequence string conversion gives the sequence string (path-#.ext). + # We want that as 'path'? + # xstudio expects 'path' to be loadable. + + item = { + "name": name, + "path": str(seq), # Sequence string path + "relpath": os.path.relpath(first_path, start_path), # Relative path of ONE file? Or sequence? + # relpath is used for tree building. + # If we use first_path, detailed logic might split it. + # But we want the sequence to appear in the folder. + # So we should use relation of the FOLDER containing the sequence. + # relpath logic in QML splits by /. + # If path is /foo/bar/seq.####.exr. relpath = bar/seq.####.exr. + # parts = [bar, seq...]. + # This works. + "type": "Sequence", + "frames": str(seq.frameRange()), + "size": total_size, + "size_str": self.format_size_str(total_size), + "date": max_mtime, + "owner": owner, + "extension": seq.extension(), + "is_sequence": True, + "is_folder": False + } + # Fix relpath to be based on the abstract sequence path if possible? + # actually `str(seq)` gives the sequence path. + # `os.path.relpath(str(seq), start_path)` should work. + item["relpath"] = os.path.relpath(str(seq), start_path) + + final_items.append(item) + + return self._group_versions(final_items) + + def _make_item(self, path, name, st, start_path, is_directory=False): + return { + "name": name, + "path": path, + "relpath": os.path.relpath(path, start_path), + "type": "Folder" if is_directory else "File", + "frames": "" if is_directory else "1", + "size": 0 if is_directory else st.st_size, + "size_str": "" if is_directory else self.format_size_str(st.st_size), + "date": st.st_mtime, + "owner": self.get_owner(st.st_uid), + "extension": "" if is_directory else os.path.splitext(name)[1], + "is_sequence": False, + "is_folder": is_directory + } + + def _group_versions(self, items): + # items is a list of dicts. + # We want to identify items that are versions of the same thing. + # Regex: _v(\d+) + + # Key: (prefix, suffix) -> [item1, item2, ...] + groups = {} + ungrouped = [] + + for item in items: + name = item["name"] + # Apply regex + match = self.version_regex.search(name) + if match: + # Found a version + v_str = match.group(1) + v_num = int(v_str) + + # remove the version string from name to get the key + # e.g. shot_v01.exr -> shot_.exr (or similar) + # We replace the FULL match _v01 with a placeholder or empty + + # We need to handle where it is. + # If we have shot_v1.exr and shot_v2.exr -> Key: shot_.exr + span = match.span() + prefix = name[:span[0]] + suffix = name[span[1]:] + key = (prefix, suffix) + + if key not in groups: + groups[key] = [] + + # Attach version info to item + item["version"] = v_num + groups[key].append(item) + else: + ungrouped.append(item) + + # Now process groups + # If config says to group, we return a hybrid list + # We assume we just annotate them for now, or do we structure them? + # The user said: "group files of a similar basename... by removing version string" + # "Filter only the highest version" + + # If we just adding metadata, we can just return the flat list but with "version_group_id" or something. + # But for the UI to show "Latest Version", it needs to know which ones are older. + + # Let's add "latest_in_group" flag to items? + # And "group_key". + + final_output = list(ungrouped) + + for key, group_items in groups.items(): + # Sort by version + group_items.sort(key=lambda x: x["version"], reverse=True) + + # Highest version + for i, item in enumerate(group_items): + item["is_latest_version"] = (i == 0) + item["version_rank"] = i # 0-indexed rank (0 is latest) + item["version_group"] = str(key) + final_output.append(item) + + # Sort by name + final_output.sort(key=lambda x: x["name"]) + return final_output + + def stop(self): + self.cancel_event.set() + + def shutdown(self): + """Release the ThreadPoolExecutor. Call after stop() when the scanner is no longer needed.""" + self.executor.shutdown(wait=False) diff --git a/src/plugin/python_plugins/filesystem_browser/scanner_benchmark.py b/src/plugin/python_plugins/filesystem_browser/scanner_benchmark.py new file mode 100644 index 000000000..c4b3936f0 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/scanner_benchmark.py @@ -0,0 +1,29 @@ +# This is a test of the scanner. Its not part of the plugin, but +# its used to test the performance of the scanner against real world data. +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Sam Richards + +import os +import shutil +import tempfile +import unittest +import json +from scanner import FileScanner +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("path", help="Path to scan") +parser.add_argument("--threads", type=int, default=4, help="Number of threads to use") +args = parser.parse_args() + +if not os.path.exists(args.path): + print(f"Path {args.path} does not exist") + exit(1) + +scanner = FileScanner(config={"thread_count": args.threads}) + +def callback(results, progress_info): + print(progress_info, len(results)) + +scanner.scan(args.path, callback=callback) + diff --git a/src/plugin/python_plugins/filesystem_browser/test_scanner.py b/src/plugin/python_plugins/filesystem_browser/test_scanner.py new file mode 100644 index 000000000..83ec80143 --- /dev/null +++ b/src/plugin/python_plugins/filesystem_browser/test_scanner.py @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Sam Richards + +import os +import shutil +import tempfile +import unittest +import json +from scanner import FileScanner + +class TestFileScanner(unittest.TestCase): + def setUp(self): + self.test_dir = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.test_dir) + + def create_file(self, filename, content="test"): + path = os.path.join(self.test_dir, filename) + with open(path, "w") as f: + f.write(content) + return path + + def test_basic_scan(self): + self.create_file("test.mov") + self.create_file("test.png") + self.create_file("ignore.txt") # not in extensions + + scanner = FileScanner() + results = scanner.scan(self.test_dir) + + names = [r["name"] for r in results] + self.assertIn("test.mov", names) + self.assertIn("test.png", names) + self.assertNotIn("ignore.txt", names) + + def test_version_grouping(self): + # Create versions + self.create_file("shot_v01.mov") + self.create_file("shot_v02.mov") # Newer + self.create_file("other_v01.mov") + + scanner = FileScanner() + results = scanner.scan(self.test_dir) + + names = [r["name"] for r in results] + + # Check flags + shot_v02 = next((r for r in results if r["name"] == "shot_v02.mov"), None) + shot_v01 = next((r for r in results if r["name"] == "shot_v01.mov"), None) + + if not shot_v02: + self.fail(f"shot_v02.mov not found in {names}") + + self.assertTrue(shot_v02.get("is_latest_version")) + self.assertFalse(shot_v01.get("is_latest_version")) + + self.assertEqual(shot_v02.get("version"), 2) + self.assertEqual(shot_v01.get("version"), 1) + self.assertEqual(shot_v02.get("version_group"), shot_v01.get("version_group")) + + def test_ignore_dirs(self): + os.makedirs(os.path.join(self.test_dir, ".git")) + self.create_file(".git/config") + + scanner = FileScanner() + results = scanner.scan(self.test_dir) + self.assertEqual(len(results), 0) + + def test_callback(self): + self.create_file("test.mov") + os.makedirs(os.path.join(self.test_dir, "subdir")) + self.create_file("subdir/test2.mov") + + scanner = FileScanner() + + callback_data = [] + def cb(items, progress): + callback_data.append((items, progress)) + + results = scanner.scan(self.test_dir, callback=cb) + + self.assertTrue(len(callback_data) > 0) + # Check if we got progress updates + progress_values = [d[1]["progress"] for d in callback_data] + self.assertIn(100, progress_values) + self.assertEqual(len(results), 2) + + def test_exclusion(self): + # Create files that LOOK like a sequence but have excluded extension + self.create_file("clip.1001.mov") + self.create_file("clip.1002.mov") + + # And some that SHOULD be a sequence + self.create_file("render.1001.exr") + self.create_file("render.1002.exr") + + # Configure scanner to exclude .mov (default) + scanner = FileScanner() # Defaults include .mov in non_sequence_extensions + results = scanner.scan(self.test_dir) + + names = [r["name"] for r in results] + + # .mov should be individual + self.assertIn("clip.1001.mov", names) + self.assertIn("clip.1002.mov", names) + + # .exr should be a sequence + # The name might be "render.####.exr" or similar depending on how fileseq formats it + # Let's check for the sequence type or name pattern + seq_items = [r for r in results if r["type"] == "Sequence"] + self.assertTrue(any("render" in r["name"] for r in seq_items)) + + mov_items = [r for r in results if "clip" in r["name"]] + for item in mov_items: + self.assertEqual(item["type"], "File") From a84298ee5b3b34170a75a5be564634808e0001b0 Mon Sep 17 00:00:00 2001 From: Olaf Date: Thu, 21 May 2026 17:54:10 +0100 Subject: [PATCH 06/11] Build system improvements: OTIO vcpkg overlay migration, general fixes, cross-platform docs (#246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Build system improvements: OTIO vcpkg migration, Windows fixes, cross-platform docs Core build system ----------------- - Migrate OpenTimelineIO from git submodule to vcpkg overlay port (cmake/vcpkg_overlay_ports/opentimelineio/). Removes extern/otio, .gitmodules, cmake/otio_patch.diff, and the OTIO_SUBMODULE option. - OTIO portfile: on Windows, move .dll files from lib/ to bin/ (vcpkg convention for applocal.ps1 discovery) and rewrite generated Targets-*.cmake files so IMPORTED_LOCATION resolves correctly. - Pin python3 to 3.11.11 in vcpkg.json. - Lower CMake minimum from 3.28 to 3.26 for broader distro compatibility. - Work around Qt 6.5/6.8 FindWrapOpenGL.cmake AGL bug on macOS by pre-creating WrapOpenGL::WrapOpenGL so Qt's find-module early-returns. Fixed upstream in Qt 6.9+; workaround can be removed once minimum supported Qt >= 6.9. CMakePresets ------------ - Remove hardcoded Qt6_DIR from the default preset. Users now supply it via the Qt6_DIR environment variable, a CMakeUserPresets.json, or a one-off -D flag (documented in each build guide). - Add VCPKG_OVERLAY_PORTS path so the new OTIO overlay is picked up. - Add Ninja generator presets for macOS (arm / intel) and Linux — Release, RelWithDebInfo and Debug variants. Aligns with existing Windows Ninja presets. - Un-hide WinDebug preset. - Add VCPKG_OVERLAY_TRIPLETS to the Linux base preset. Windows build fixes ------------------- - Fix scripts/qt_install to use install(SCRIPT) + configure_file instead of install(CODE), so ${CMAKE_INSTALL_PREFIX} resolves at install time. Previously the configure-time prefix was baked in, which broke the CPack package target because CPack uses a different (staging) prefix. - Remove the redundant early windeployqt call in src/launch/xstudio/src. The late call in scripts/qt_install now covers everything and runs after all other install rules have populated the install tree. - In cmake/macros.cmake (default_options_qt), add RUNTIME_OUTPUT_DIRECTORY alongside LIBRARY_OUTPUT_DIRECTORY so *_qml.dll files land in build/bin on Windows (Windows uses RUNTIME for .dll, not LIBRARY). - Fix Windows python install path mismatch in python/CMakeLists.txt: the build produces lib/python3.11/site-packages (Unix layout, because vcpkg's Python uses that layout on Windows), not Lib/site-packages. Dev workflow ------------ - Generate build/run_xstudio.bat — a dev launcher that puts Qt's bin directory on PATH and forwards arguments to xstudio.exe, so xstudio can be run straight from the build tree without a windeployqt pass. Documentation ------------- - downloading_qt.md: add aqtinstall instructions (command-line, no Qt account required) as a recommended alternative to the GUI installer. Covers Linux, macOS and Windows. - index.rst: add "Choosing a guide" section explaining the split between vcpkg-based guides (recommended) and distro-native guides (advanced). - linux_generic.md: restructured around the new Qt6_DIR / user-preset workflow, removed submodule instructions, added optional Ninja section. - macos.md: minor updates to reflect current dependency list and Qt workaround now handled in CMakeLists.txt. - windows.md: full rewrite — unified "Set up the build environment" section using Enter-VsDevShell with -SkipAutomaticLocation, separate build sections for Visual Studio and Ninja generators, corrected Qt path example (C:/Qt not C:/Qt6), user-preset examples for both generators, note on run_xstudio.bat dev launcher. Signed-off-by: Olaf Razzoli * docs: simplify build guides and pin vcpkg - Require Ninja as the CMake generator on all platforms; remove the "Faster builds with Ninja (optional)" sections and the Visual Studio generator option on Windows. - Pin vcpkg to commit c2aeddd80357b17592e59ad965d2adf65a19b22f in all three guides for reproducible dependency builds. - Document CMakeUserPresets.json as the single way to point CMake at the local Qt 6.5.3 install; drop the Qt6_DIR env-var and one-off -DQt6_DIR command-line paths. - Note that --target package on Windows is slow and recommend a plain cmake --build build for dev iteration. - Remove docs/reference/build_guides/developer_tips.md and the link to it from windows.md. Signed-off-by: Olaf Razzoli --------- Signed-off-by: Olaf Razzoli --- .gitignore | 4 +- .gitmodules | 3 - CMakeLists.txt | 26 ++++-- CMakePresets.json | 92 ++++++++++++++++++- cmake/macros.cmake | 1 + cmake/otio_patch.diff | 14 --- .../0001-disable-src-deps-subdir.patch | 12 +++ .../opentimelineio/portfile.cmake | 81 ++++++++++++++++ .../opentimelineio/vcpkg.json | 18 ++++ docs/reference/build_guides/developer_tips.md | 21 ----- docs/reference/build_guides/downloading_qt.md | 29 +++++- docs/reference/build_guides/index.rst | 9 +- docs/reference/build_guides/linux_generic.md | 53 +++++++---- docs/reference/build_guides/macos.md | 51 +++++----- docs/reference/build_guides/windows.md | 65 +++++++------ extern/otio/CMakeLists.txt | 27 ------ extern/otio/OpenTimelineIO | 1 - python/CMakeLists.txt | 2 +- scripts/qt_install/CMakeLists.txt | 10 +- scripts/qt_install/qt_install.cmake.in | 3 + src/launch/xstudio/src/CMakeLists.txt | 14 ++- src/launch/xstudio/src/run_xstudio.bat.in | 7 ++ src/launch/xstudio/src/windeploy.cmake.in | 3 - vcpkg.json | 9 ++ 24 files changed, 384 insertions(+), 171 deletions(-) delete mode 100644 .gitmodules delete mode 100644 cmake/otio_patch.diff create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json delete mode 100644 docs/reference/build_guides/developer_tips.md delete mode 100644 extern/otio/CMakeLists.txt delete mode 160000 extern/otio/OpenTimelineIO create mode 100644 scripts/qt_install/qt_install.cmake.in create mode 100644 src/launch/xstudio/src/run_xstudio.bat.in delete mode 100644 src/launch/xstudio/src/windeploy.cmake.in diff --git a/.gitignore b/.gitignore index 08f9bce53..f906b7286 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,7 @@ python/src/xstudio/version.py /build/ xstudio_install/ **/qml/*_qml_export.h -<<<<<<< HEAD CMakeUserPresets.json -======= __build __build_debug ->>>>>>> c808bb352 (WIP) +aqtinstall.log diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 387c71ac9..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "extern/otio/OpenTimelineIO"] - path = extern/otio/OpenTimelineIO - url = https://github.com/AcademySoftwareFoundation/OpenTimelineIO diff --git a/CMakeLists.txt b/CMakeLists.txt index 7531eff9a..c4b0530cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ -cmake_minimum_required(VERSION 3.28 FATAL_ERROR) -cmake_policy(VERSION 3.28) +cmake_minimum_required(VERSION 3.26 FATAL_ERROR) +cmake_policy(VERSION 3.26) +#cmake_minimum_required(VERSION 3.28 FATAL_ERROR) +#cmake_policy(VERSION 3.28) set(XSTUDIO_GLOBAL_VERSION "1.2.0" CACHE STRING "Version string") set(XSTUDIO_GLOBAL_NAME xStudio) @@ -8,6 +10,17 @@ set(XSTUDIO_GLOBAL_NAME xStudio) project(${XSTUDIO_GLOBAL_NAME} VERSION ${XSTUDIO_GLOBAL_VERSION} LANGUAGES CXX) +# Work around Qt bug: FindWrapOpenGL.cmake links -framework AGL, which was +# removed from the macOS SDK in 10.14. Fixed upstream in Qt 6.9+ but not +# backported to 6.5/6.8 LTS (see https://codereview.qt-project.org/c/qt/qtbase/+/652022). +# Pre-create the target so Qt's FindWrapOpenGL early-returns and never hits the +# broken AGL block. Can be removed once the minimum supported Qt is >= 6.9. +if(APPLE AND NOT TARGET WrapOpenGL::WrapOpenGL) + find_package(OpenGL REQUIRED) + add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED) + target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL) +endif() + option(BUILD_TESTING "Build tests" OFF) option(INSTALL_PYTHON_MODULE "Install python module" ON) option(INSTALL_XSTUDIO "Install xstudio" ON) @@ -16,7 +29,6 @@ option(ENABLE_CLANG_TIDY "Enable clang-tidy, ninja clang-tidy." OFF) option(ENABLE_CLANG_FORMAT "Enable clang format, ninja clangformat." OFF) option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE) option(OPTIMIZE_FOR_NATIVE "Build with -march=native" OFF) -option(OTIO_SUBMODULE "Automatically build OpenTimelineIO as a submodule" OFF) option(USE_VCPKG "Use Vcpkg for package management" OFF) option(BUILD_PYSIDE_WIDGETS "Build xstudio player as PySide widget" OFF) option(OPENIMAGEIO_PLUGIN "Include the OpenImageIO PLugin" ON) @@ -188,10 +200,6 @@ endif() if (USE_VCPKG) - # When building with VCPKG, we will use OTIO submodule - set(OTIO_SUBMODULE true) - add_subdirectory("extern/otio") - set(VCPKG_INTEGRATION ON) # Install pip and sphinx @@ -218,14 +226,12 @@ if (USE_VCPKG) else() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") - if(${OTIO_SUBMODULE}) - add_subdirectory("extern/otio") - endif() find_package(PkgConfig REQUIRED) endif() # Add the necessary libraries from Vcpkg if Vcpkg integration is enabled +find_package(OpenTimelineIO CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED) include(CTest) diff --git a/CMakePresets.json b/CMakePresets.json index b57636bb1..c16a5f9e3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,13 +7,13 @@ "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake", - "Qt6_DIR": "/Users/tedwaine/Qt6/6.5.3/macos/lib/cmake/Qt6", "CMAKE_INSTALL_PREFIX": "xstudio_install", "X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON", "BUILD_DOCS": "OFF", "USE_VCPKG": "ON", "STUDIO_PLUGINS": "", - "BMD_DECKLINK_PLUGIN": "OFF" + "BMD_DECKLINK_PLUGIN": "OFF", + "VCPKG_OVERLAY_PORTS": "${sourceDir}/cmake/vcpkg_overlay_ports" } }, { @@ -44,7 +44,6 @@ }, { "name": "WinDebug", - "hidden": true, "inherits": ["windows-base"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", @@ -151,10 +150,67 @@ "USE_SANITIZER": "address" } }, - { + { + "name": "macos-ninja-base-arm", + "inherits": "macos-base-arm", + "generator": "Ninja" + }, + { + "name": "macos-ninja-base-intel", + "inherits": "macos-base-intel", + "generator": "Ninja" + }, + { + "name": "MacOSNinjaRelease", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "MacOSNinjaRelWithDebInfo", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSNinjaDebug", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSIntelNinjaRelease", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "MacOSIntelNinjaRelWithDebInfo", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSIntelNinjaDebug", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } + }, + { "name": "linux-base", "inherits": "default", "cacheVariables": { + "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/vcpkg_triplets", "VCPKG_TARGET_TRIPLET": "x64-xstudio-linux" } }, @@ -180,6 +236,34 @@ "CMAKE_BUILD_TYPE": "Debug", "USE_SANITIZER": "address" } + }, + { + "name": "linux-ninja-base", + "inherits": "linux-base", + "generator": "Ninja" + }, + { + "name": "LinuxNinjaRelease", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "LinuxNinjaRelWithDebInfo", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "LinuxNinjaDebug", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } } ] } diff --git a/cmake/macros.cmake b/cmake/macros.cmake index 767a988a4..e3cd1bafa 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -308,6 +308,7 @@ macro(default_options_qt name) set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" ) install(TARGETS ${name} EXPORT xstudio LIBRARY DESTINATION share/xstudio/lib) diff --git a/cmake/otio_patch.diff b/cmake/otio_patch.diff deleted file mode 100644 index 176f41105..000000000 --- a/cmake/otio_patch.diff +++ /dev/null @@ -1,14 +0,0 @@ -Submodule extern/otio/OpenTimelineIO contains modified content -diff --git a/extern/otio/OpenTimelineIO/CMakeLists.txt b/extern/otio/OpenTimelineIO/CMakeLists.txt -index 825ad9d..7598b5e 100644 ---- a/extern/otio/OpenTimelineIO/CMakeLists.txt -+++ b/extern/otio/OpenTimelineIO/CMakeLists.txt -@@ -245,7 +245,7 @@ else() - endif() - - # set up the internally hosted dependencies --add_subdirectory(src/deps) -+# add_subdirectory(src/deps) - - set (OTIO_IMATH_TARGETS - # For OpenEXR/Imath 3.x: diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch new file mode 100644 index 000000000..4a8d49954 --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,7 +245,7 @@ + endif() + + # set up the internally hosted dependencies +-add_subdirectory(src/deps) ++# add_subdirectory(src/deps) + + set (OTIO_IMATH_TARGETS + # For OpenEXR/Imath 3.x: diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake b/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake new file mode 100644 index 000000000..fd9fa9389 --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake @@ -0,0 +1,81 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/OpenTimelineIO + REF v${VERSION} + SHA512 305d63730446c3b4c368cadd9d7a66de96dafee2168d589ae88a0320319f40cde4a739c9939eb088b635185cb1aabd051360ed432fde3ce11ef145e18c25dd21 + HEAD_REF main + PATCHES + 0001-disable-src-deps-subdir.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH RAPIDJSON_SOURCE_PATH + REPO Tencent/rapidjson + REF 06d58b9e848c650114556a23294d0b6440078c61 + SHA512 f0a7df46234e5b3244a801ddf1daefd26aac7ae5b2c470b8c3898f65c65591f6c9cabac0421800588826da9d3bcccba1f98e1c0c8c15184b3843cf6f3ffbdcad + HEAD_REF master +) + +file(COPY "${RAPIDJSON_SOURCE_PATH}/include" + DESTINATION "${SOURCE_PATH}/src/deps/rapidjson") + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OTIO_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DOTIO_SHARED_LIBS=${OTIO_SHARED} + -DOTIO_PYTHON_INSTALL=OFF + -DOTIO_DEPENDENCIES_INSTALL=OFF + -DOTIO_FIND_IMATH=ON + -DOTIO_CXX_INSTALL=ON + -DOTIO_AUTOMATIC_SUBMODULES=OFF + -DOTIO_INSTALL_COMMANDLINE_TOOLS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME opentimelineio + CONFIG_PATH share/opentimelineio +) +vcpkg_cmake_config_fixup( + PACKAGE_NAME opentime + CONFIG_PATH share/opentime +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# OTIO's upstream CMake installs shared libraries (.dll) into lib/ on Windows, +# but vcpkg's convention (and applocal.ps1's search path) expects DLLs in bin/. +# Move them so they get picked up by dependency deployment, and fix up the +# generated CMake targets files so IMPORTED_LOCATION still resolves. +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(GLOB _otio_release_dlls "${CURRENT_PACKAGES_DIR}/lib/*.dll") + foreach(_dll ${_otio_release_dlls}) + get_filename_component(_name "${_dll}" NAME) + file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/bin/${_name}") + endforeach() + file(GLOB _otio_debug_dlls "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + foreach(_dll ${_otio_debug_dlls}) + get_filename_component(_name "${_dll}" NAME) + file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/debug/bin/${_name}") + endforeach() + + # Rewrite the generated Targets-*.cmake files to reference the new DLL + # locations. Only the .dll paths are changed; .lib (import library) paths + # stay in lib/ where they belong. + file(GLOB _otio_targets_files + "${CURRENT_PACKAGES_DIR}/share/opentime/OpenTimeTargets-*.cmake" + "${CURRENT_PACKAGES_DIR}/share/opentimelineio/OpenTimelineIOTargets-*.cmake" + ) + foreach(_file ${_otio_targets_files}) + file(READ "${_file}" _content) + string(REGEX REPLACE "/lib/([^/\"]*\\.dll)" "/bin/\\1" _content "${_content}") + file(WRITE "${_file}" "${_content}") + endforeach() +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json b/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json new file mode 100644 index 000000000..82d6bd0df --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "opentimelineio", + "version": "0.17.0", + "description": "A file format and API for describing editorial timelines", + "homepage": "https://opentimeline.io", + "license": "Apache-2.0", + "dependencies": [ + "imath", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/docs/reference/build_guides/developer_tips.md b/docs/reference/build_guides/developer_tips.md deleted file mode 100644 index e37bbdc9e..000000000 --- a/docs/reference/build_guides/developer_tips.md +++ /dev/null @@ -1,21 +0,0 @@ -# Tips for Developers - -### A Faster Development Cycle on Windows - -If you are developing xSTUDIO on Windows the build times for both **package** and **install** targets are very long even if you need to test a single line code change. A solution to this problem is to do a full package build first and then copy the contents of the **bin** folder in the target package output folder into the regular **build/bin** folder in the build output folder. This will allow you to run xstudio directly from the **./build/bin** folder after subsequent builds without specifying package or install as the build target. Likewise if your build environment is MS Visual Studio you can set your debug target to **build/bin/xstudio.exe** for a much faster code-change / build / test cycles. The steps to do this in a PowerShell will look something like this: - -*Clear the bin and share build output folders (you only need to do this once):* - - rm -r -fo ./bin/build - rm -r -fo ./bin/share/xstudio - -*Copy the corresponding folders from the package output back into the build folder (again, you only need to do this once):* - - cp -r .\build\_CPack_Packages\win64\NSIS\xSTUDIO-1.2.0-win64\bin .\build\ - cp -r .\build\_CPack_Packages\win64\NSIS\xSTUDIO-1.2.0-win64\share\xstudio .\build\share\ - -*Now you can build and execute xstudio quickly without doing a full package/install build:* - - cmake --build build - ./bin/xstudio.exe - diff --git a/docs/reference/build_guides/downloading_qt.md b/docs/reference/build_guides/downloading_qt.md index f5832be31..002526bb8 100644 --- a/docs/reference/build_guides/downloading_qt.md +++ b/docs/reference/build_guides/downloading_qt.md @@ -2,7 +2,32 @@ xSTUDIO's UI is built with the Qt cross-platform GUI development libraries. The Qt SDK is a major dependency that is required to build xSTUDIO but fortunately it is freely available for public use under the GPL license. -### Running the Qt installer +There are two ways to install it: the official Qt installer (GUI, requires a Qt account), or `aqtinstall` (command-line, scriptable, no account). Either produces the same result and both are documented below — pick whichever you prefer. + +### Option A: Using `aqtinstall` (command-line, recommended) + +[`aqtinstall`](https://github.com/miurahr/aqtinstall) is a small open-source Python tool that downloads the same official Qt prebuilt binaries as the GUI installer, directly from Qt's CDN. It requires no Qt account, is fully scriptable, and installs exactly the version and modules you ask for. + +First, make sure you have Python 3 and `pip` available, then install `aqtinstall`: + + pip install aqtinstall + +Then download Qt 6.5.3 for your platform. Choose the command that matches your OS: + + # Linux (gcc x86_64) + aqt install-qt linux desktop 6.5.3 gcc_64 -O ~/Qt -m qtimageformats + + # macOS (universal: ARM + Intel) + aqt install-qt mac desktop 6.5.3 clang_64 -O ~/Qt -m qtimageformats + + # Windows (MSVC 2019 64-bit, in PowerShell) + aqt install-qt windows desktop 6.5.3 win64_msvc2019_64 -O C:\Qt -m qtimageformats + +The `-m qtimageformats` flag installs the extra 'Qt Image Formats' module that xSTUDIO requires. The `-O` flag specifies the output directory — feel free to change it, but make a note of the path as you will need it later when setting `Qt6_DIR` in your build environment. + +After the command finishe, you will have a Qt installation layout identical to what the GUI installer produces, e.g. `~/Qt/6.5.3/gcc_64/` on Linux, `~/Qt/6.5.3/macos/` on macOS, or `C:\Qt\6.5.3\msvc2019_64\` on Windows. + +### Option B: Running the Qt installer (GUI) First you need to download the [Qt Installer](https://www.qt.io/download-qt-installer). @@ -10,7 +35,7 @@ Run the installer app. Before you can proceed you must register with Qt if you a ![Qt Installer](qt_inst1.jpg) -### Select Qt 6.5.3 components +#### Select Qt 6.5.3 components (Option B only) Now you must select the correct version of Qt to download. The required version is **6.5.3**. Epand the 'Qt' item in the list, then expand the Qt 6.5.3 below that. You only need to check the following option within the list under 6.5.3, depending on your platform: diff --git a/docs/reference/build_guides/index.rst b/docs/reference/build_guides/index.rst index 0d28b364c..7e37eec2c 100644 --- a/docs/reference/build_guides/index.rst +++ b/docs/reference/build_guides/index.rst @@ -18,9 +18,16 @@ Individual Users If you have any **questions** reach out on the ASWF Slack in the `#ori-xstudio-discussion `_ . +Choosing a guide +^^^^^^^^^^^^^^^^ + +The **macOS**, **Windows** and **Linux Generic** guides all use the same approach: xSTUDIO's dependencies are built and managed automatically by `vcpkg `_, so the only things you need to install by hand are a compiler toolchain, CMake, git and the Qt SDK. These are the **recommended** paths — they work on any reasonably recent distro and require the least manual setup. + +The **Rocky Linux 9.1**, **Ubuntu 22.04** and **CentOS 7** guides take a different, more advanced approach: instead of using vcpkg, they resolve xSTUDIO's dependencies from each distro's native package manager (and build a handful of libraries from source when no suitable package exists). This gives a tighter integration with the host system but is significantly more work and more fragile — package names and versions drift over time, and any mismatch against the VFX Reference Platform requires manual intervention. These guides are intended for users who specifically want a native-package build, or whose target distro matches one of the three and who are comfortable troubleshooting package issues. If you just want xSTUDIO to build on a Linux machine, prefer **Linux Generic**. + .. toctree:: :maxdepth: 1 - + macos windows linux_generic diff --git a/docs/reference/build_guides/linux_generic.md b/docs/reference/build_guides/linux_generic.md index 0287f7e89..f34fa0688 100644 --- a/docs/reference/build_guides/linux_generic.md +++ b/docs/reference/build_guides/linux_generic.md @@ -4,7 +4,13 @@ xSTUDIO can be built in just a few steps on many Linux distros by employing Micr ### Base dependencies -We assume that you have some knowledge of development on Linux platforms and have git, gcc & cmake installed on your system. +We assume that you have some knowledge of development on Linux platforms and have git, gcc and cmake installed on your system. You also need Ninja, which xSTUDIO uses as its CMake generator on all platforms. Install it via your distro's package manager: + + # Rocky / RHEL / Fedora + sudo dnf install ninja-build + + # Ubuntu / Debian + sudo apt install ninja-build ### Download and install Qt 6.5.3 SDK @@ -12,11 +18,11 @@ Follow [these instructions](downloading_qt.md) - ensuring that you download the ### Download the VCPKG repo -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in the Powershell: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.sh - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -26,34 +32,45 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree - - git submodule init - git submodule update - git apply cmake/otio_patch.diff +### Tell CMake where Qt is installed -### Modify the CMakePresets.json file +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder: -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, if user Mary Jane downloaded Qt into her home folder the entry should look like this: + { + "version": 3, + "configurePresets": [ + { + "name": "LinuxNinjaReleaseLocal", + "inherits": "LinuxNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6" + } + } + ] + } - "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6", +See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. ### Build xSTUDIO First, we configure for building. Note that this cmake command ***may take several hours to complete*** the first time it is run, though subsequently it will take a few seconds. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. - - cmake -B build --preset LinuxRelease -When this has finished, you can build xSTUDIO with this command (in this case, the --parallel flag is set for a machine with 16 cores as an example). + cmake -B build --preset LinuxNinjaReleaseLocal - cmake --build build --parallel 16 +When this has finished, you can build xSTUDIO with: + + cmake --build build + +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. ### Running xSTUDIO in a dev environment -If the compilation is successfull you will find the xstudio app in ./build/bin/xstudio.bin. To enable the python API, you will need to modify your PYTHONPATH evnironment variable like this, or something similar: +If the compilation is successful you will find the xstudio app in `./build/bin/xstudio.bin`. To enable the Python API, add the built site-packages directory to your `PYTHONPATH`: + + export PYTHONPATH=$PYTHONPATH:$(pwd)/build/bin/python/lib/python3.11/site-packages - export PYTHONPATH=$PYTHONPATH:./build/bin/python/lib/python3.10/site-packages +Run this from the xstudio repository root. The `python3.11` segment tracks whichever Python version vcpkg built — if you change the `python3` pin in `vcpkg.json`, update this path to match. ### Installing xSTUDIO -Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running 'make install' from the 'build' folder. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location +Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running `cmake --install build` from the repository root. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location diff --git a/docs/reference/build_guides/macos.md b/docs/reference/build_guides/macos.md index 68750717d..17d1eb3f3 100644 --- a/docs/reference/build_guides/macos.md +++ b/docs/reference/build_guides/macos.md @@ -12,9 +12,10 @@ Some of xSTUDIO's dependencies require 'homebrew', the MacOS open source softwar /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -We require 5 packages to be installed to proceed. Run these commands in a terminal: +We require these packages to be installed to proceed. xSTUDIO uses Ninja as its CMake generator on all platforms, so install it here as well. Run these commands in a terminal: brew install cmake + brew install ninja brew install pkg-config brew install nasm brew install autoconf @@ -24,18 +25,13 @@ We require 5 packages to be installed to proceed. Run these commands in a termin Follow [these instructions](downloading_qt.md) -> **NOTE:** Since Xcode version 26.X our specified version of Qt (6.5.3) is not strictly compatible with MacOS and you may see an error when you run the first 'cmake' command below. There are two options to resolve this. You can download Qt version 6.8.3 and use this instead of 6.5.3. Alternatively, open the file 'FindWrapOpenGL.cmake' within the Qt installation (at 6.5.3/macos/lib/cmake) and comment out lines 48 and 49 so that they look like this: - - #target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_fw_path}) - #target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_agl_fw_path}) - ### Download the VCPKG repo -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in a terminal: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.sh - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -45,32 +41,35 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree and apply a small patch +### Tell CMake where Qt is installed - git submodule init - git submodule update - git apply cmake/otio_patch.diff +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder: -### Modify the CMakePresets.json file + { + "version": 3, + "configurePresets": [ + { + "name": "MacOSNinjaReleaseLocal", + "inherits": "MacOSNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6" + } + } + ] + } -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on MacOS where user Mary Jane downloaded Qt into her home folder the entry should look like this: - - "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6", +For an Intel Mac, inherit from `MacOSIntelNinjaRelease` instead. See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. ### Build xSTUDIO -Run the appropriate command for your platform (whether you have an older Intel or a newer Apple Silicon machine) to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. - -**Apple Silicon (ARM) Machines:** - - cmake -B build --preset MacOSRelease +Run the configure command. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -**Intel Machines:** + cmake -B build --preset MacOSNinjaReleaseLocal - cmake -B build --preset MacOSIntelRelease +When this has finished, you can build xSTUDIO with: -When this has finished, you can build xSTUDIO with this command. + cmake --build build --target install - cmake --build build --parallel 16 --target install +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. -If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application. \ No newline at end of file +If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application. diff --git a/docs/reference/build_guides/windows.md b/docs/reference/build_guides/windows.md index f091804d4..e1a9cf197 100644 --- a/docs/reference/build_guides/windows.md +++ b/docs/reference/build_guides/windows.md @@ -12,6 +12,7 @@ Get it here: [Git Download](https://git-scm.com/download/win) Get it here: [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) Ensure CMake tools for Windows is included on install. [CMake projects in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170#installation) +The "CMake tools" component bundles `cmake` and `ninja` (xSTUDIO's CMake generator) along with the MSVC compiler, so no separate install is needed. Restart your machine after Visual Studio finishes installing. ### Download and install Qt 6.5.3 SDK @@ -29,11 +30,11 @@ Start a Windows Powershell to continue these instructions, where you must run a mkdir dev cd dev -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in the Powershell: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.bat - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -43,50 +44,54 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree and apply a small patch: +### Tell CMake where Qt is installed - git submodule init - git submodule update - git apply cmake/otio_patch.diff +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into the root of her C: drive: -### Modify the CMakePresets.json file + { + "version": 3, + "configurePresets": [ + { + "name": "WinNinjaReleaseLocal", + "inherits": "WinNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" + } + } + ] + } -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on Windows where user Mary Jane downloaded Qt into the root of her C: drive the entry should look like this: +See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. - "Qt6_DIR": ""C:/Qt6/6.5.3/msvc2019_64/lib/cmake/Qt6", +### Set up the build environment -### Build xSTUDIO - -Run the first cmake command to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. - -First, you may need to find the path to the 'cmake.exe' tool that is part of the VisualStudio install. Substitute as appropriate into the following commands as appropriate. - - 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe' -B build --preset WinRelease - -When this has finished, you can build xSTUDIO with this command. Note the value after --parallel: change this number to match the number of cores your machine has for best build times. +The `cmake` and `ninja` tools, along with the MSVC compiler, are bundled with Visual Studio 2022's "CMake tools" component but are not on your `PATH` by default. Make them available in your PowerShell session by entering the Visual Studio Developer Shell: - 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe' --build build --parallel 16 --target PACKAGE --config Release + Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" + Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch amd64 -SkipAutomaticLocation -If the build is successful, you should have an exectuable in the 'build' folder called something like 'xSTUDIO-1.2.0-win64.exe'. This can be executed to start the xSTUDIO installer. +After running those two commands, `cmake` and `ninja` will resolve directly from the command line for the rest of the session, and the build commands below work as shown. -### Alternative: Build with Ninja (faster builds) +### Build xSTUDIO -Ninja is significantly faster than MSBuild as it parallelises at the file level. Both Ninja and cmake are included with Visual Studio's CMake tools, so no separate install is needed. +Note that the first cmake command below ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -First, set up the Visual Studio build environment in your Powershell session. This puts the MSVC compiler, cmake and ninja on your PATH: +Configure: - Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" - Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch amd64 + cmake -B build --preset WinNinjaReleaseLocal -Run the cmake command to configure for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. +Build: - cmake -B build --preset WinNinjaRelease + cmake --build build --target package -When this has finished, you can build xSTUDIO with this command. Ninja handles parallelism automatically so there is no need for the `--parallel` flag. +> **Note:** `--target package` produces the NSIS installer and is significantly slower than a plain build. When iterating during development, drop the `--target package` flag and just run `cmake --build build`. - cmake --build build --target PACKAGE +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. If the build is successful, you should have an executable in the 'build' folder called something like 'xSTUDIO-1.2.0-win64.exe'. This can be executed to start the xSTUDIO installer. -For additional tips for **developers** follow [this link](developer_tips.md) +### Running xSTUDIO from the build tree (dev workflow) + +For a quick dev run without going through the installer, the build generates a launcher at `build/run_xstudio.bat`. Arguments are forwarded to xstudio: + .\build\run_xstudio.bat path\to\session.xst diff --git a/extern/otio/CMakeLists.txt b/extern/otio/CMakeLists.txt deleted file mode 100644 index 0118ecc22..000000000 --- a/extern/otio/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -set(OTIO_PYTHON_INSTALL ON) -set(OTIO_DEPENDENCIES_INSTALL OFF) -set(OTIO_INSTALL_PYTHON_MODULES ON) -set(OTIO_INSTALL_COMMANDLINE_TOOLS OFF) -set(OTIO_FIND_IMATH ON) -set(OTIO_PYTHON_INSTALL_DIR python) - -if (APPLE) - #install directly into VCPKG pythin installation. This gets copied into xSTUDIO.app installation - set(CMAKE_INSTALL_PREFIX "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${PYTHONVP}/site-packages") -else() - set(CMAKE_INSTALL_PREFIX "bin/python") -endif() - -# Build options -if (WIN32) - set(OTIO_SHARED_LIBS OFF) -else() - set(OTIO_SHARED_LIBS ON) -endif() - -set(OTIO_AUTOMATIC_SUBMODULES ON) - -find_package(Python COMPONENTS Interpreter Development) -find_package(pybind11 CONFIG) - -add_subdirectory("OpenTimelineIO") \ No newline at end of file diff --git a/extern/otio/OpenTimelineIO b/extern/otio/OpenTimelineIO deleted file mode 160000 index 4440afaa2..000000000 --- a/extern/otio/OpenTimelineIO +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4440afaa27b16f81cdf81215ce4d0b08e1424148 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 703487c5b..c358a307b 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -51,7 +51,7 @@ if(NOT APPLE) if(INSTALL_PYTHON_MODULE) if (WIN32) - install(DIRECTORY ${OUTPUT}/Lib/site-packages/xstudio + install(DIRECTORY ${OUTPUT}/lib/${PYTHONVP}/site-packages/xstudio DESTINATION bin/python3/Lib/site-packages) else() install(DIRECTORY ${OUTPUT}/lib/${PYTHONVP}/site-packages/xstudio diff --git a/scripts/qt_install/CMakeLists.txt b/scripts/qt_install/CMakeLists.txt index d97074dd6..7c59a03c3 100644 --- a/scripts/qt_install/CMakeLists.txt +++ b/scripts/qt_install/CMakeLists.txt @@ -1,2 +1,8 @@ -#After everything else is installed, windeployqt will scan the contents and package up Qt dependencies. -install(CODE "execute_process(COMMAND ${Qt6_DIR}/../../../bin/windeployqt.exe ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir ${CMAKE_SOURCE_DIR}/ui)" ) \ No newline at end of file +# After everything else is installed, windeployqt will scan the contents and package up Qt dependencies. + +get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) +get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) +find_program(windeployqt_exe windeployqt HINTS "${_qt_bin_dir}") + +configure_file(qt_install.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake @ONLY) +install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake) diff --git a/scripts/qt_install/qt_install.cmake.in b/scripts/qt_install/qt_install.cmake.in new file mode 100644 index 000000000..53aa5e9f8 --- /dev/null +++ b/scripts/qt_install/qt_install.cmake.in @@ -0,0 +1,3 @@ +message("Running windeployqt... with args: ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui") +execute_process(COMMAND "@windeployqt_exe@" "${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe" --qmldir "@CMAKE_SOURCE_DIR@/ui" + WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}") diff --git a/src/launch/xstudio/src/CMakeLists.txt b/src/launch/xstudio/src/CMakeLists.txt index f2166ca74..aa460f563 100644 --- a/src/launch/xstudio/src/CMakeLists.txt +++ b/src/launch/xstudio/src/CMakeLists.txt @@ -108,11 +108,15 @@ if(WIN32) file(GLOB FFMPEG_COMPONENTS ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/ffmpeg/*) install(FILES ${FFMPEG_COMPONENTS} DESTINATION bin) - get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) - get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) - find_program(windeployqt_exe windeployqt HINTS "${_qt_bin_dir}") - configure_file(windeploy.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/windeploy.cmake @ONLY) - install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/windeploy.cmake) + # Note: windeployqt for Windows is run from scripts/qt_install so it executes + # after all other install rules have populated the install tree. + + # Generate a dev-only launcher that puts Qt's bin dir on PATH, so xstudio + # can be run from the build tree without a windeployqt pass. + get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) + get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) + file(TO_NATIVE_PATH "${_qt_bin_dir}" _qt_bin_dir) + configure_file(run_xstudio.bat.in ${CMAKE_BINARY_DIR}/run_xstudio.bat @ONLY) elseif(APPLE) diff --git a/src/launch/xstudio/src/run_xstudio.bat.in b/src/launch/xstudio/src/run_xstudio.bat.in new file mode 100644 index 000000000..c701e3e6f --- /dev/null +++ b/src/launch/xstudio/src/run_xstudio.bat.in @@ -0,0 +1,7 @@ +@echo off +REM Dev-only launcher for xstudio.exe from the build tree. +REM Adds Qt's bin directory to PATH so Qt DLLs resolve without needing +REM an install or windeployqt run. Generated by CMake; do not edit. + +set "PATH=@_qt_bin_dir@;%~dp0bin;%PATH%" +"%~dp0bin\xstudio.exe" %* diff --git a/src/launch/xstudio/src/windeploy.cmake.in b/src/launch/xstudio/src/windeploy.cmake.in deleted file mode 100644 index 96ec0940d..000000000 --- a/src/launch/xstudio/src/windeploy.cmake.in +++ /dev/null @@ -1,3 +0,0 @@ -message("Running windeployqt... with args: ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui") -execute_process(COMMAND "@windeployqt_exe@" ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui - WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}") \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 568453ff8..91a44e8d4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -18,6 +18,7 @@ "openimageio", "openexr", "imath", + "opentimelineio", { "name": "ffmpeg", "features": [ @@ -76,6 +77,14 @@ { "name": "boost-modular-build-helper", "version": "1.84.0#3" + }, + { + "name": "opentimelineio", + "version": "0.17.0" + }, + { + "name": "python3", + "version": "3.11.11" } ] } From 8e36d126ac63fb19c6de3f9911a4f603cbc715f4 Mon Sep 17 00:00:00 2001 From: tedwaine <59868698+tedwaine@users.noreply.github.com> Date: Tue, 26 May 2026 16:01:21 +0100 Subject: [PATCH 07/11] Sync to DNEG internal repo (#256) * Merge updates from DNEG internal repo Signed-off-by: Ted Waine * Re-sync to DNEG internal repo Signed-off-by: Ted Waine * Win build compatibility tweaks Signed-off-by: Ted Waine * Update docs and release notes Signed-off-by: Ted Waine --------- Signed-off-by: Ted Waine --- .clang-tidy | 6 +- .gitignore | 3 + CMakeLists.txt | 20 +- CONTRIBUTING.md | 6 +- README.md | 4 +- cmake/macros.cmake | 25 +- .../0001-disable-src-deps-subdir.patch | 4 +- docs/Doxyfile | 2305 ------------ docs/_static/file-browser-01.webm | Bin 0 -> 8980530 bytes docs/conf.py | 337 -- docs/conf.py.in | 2 +- .../getting_started/getting_started.rst | 17 + .../images/file-system-browser-1.png | Bin 0 -> 497479 bytes .../images/file-system-browser-group.png | Bin 0 -> 164992 bytes .../images/file-system-browser-list.png | Bin 0 -> 165884 bytes .../images/file-system-browser-thumbs.png | Bin 0 -> 461606 bytes .../images/file-system-browser-tree.png | Bin 0 -> 162552 bytes docs/user_docs/images/shortcuts-01.png | Bin 61035 -> 90276 bytes docs/user_docs/images/shortcuts-02.png | Bin 0 -> 29464 bytes .../interface/file_system_browser.rst | 114 + docs/user_docs/interface/interface.rst | 1 + docs/user_docs/release_notes/index.rst | 22 +- docs/user_docs/workflow/hotkeys.rst | 18 +- docs/user_docs/workflow/notes.rst | 4 + extern/cpp-colors/.travis.yml | 77 - extern/cpp-colors/CMakeLists.txt | 62 - extern/cpp-colors/LICENSE | 22 - extern/cpp-colors/README.md | 75 - extern/cpp-colors/clean-all.cmake | 17 - extern/cpp-colors/examples/CMakeLists.txt | 1 - .../cpp-colors/examples/color-conversion.cpp | 27 - extern/cpp-colors/include/cpp-colors/color.h | 433 --- .../include/cpp-colors/color_error.h | 21 - .../cpp-colors/include/cpp-colors/color_io.h | 605 ---- .../include/cpp-colors/color_named.h | 81 - .../include/cpp-colors/color_utils.h | 27 - extern/cpp-colors/include/cpp-colors/colors.h | 18 - .../include/cpp-colors/impl/colors_impl.h | 13 - .../include/cpp-colors/impl/constants_impl.h | 13 - .../cpp-colors/impl/dotnet/dotnet_colors.h | 585 --- .../cpp-colors/impl/dotnet/dotnet_constants.h | 153 - .../cpp-colors/impl/dotnet/dotnet_named.h | 1484 -------- .../include/cpp-colors/impl/named_impl.h | 18 - .../include/cpp-colors/impl/named_utils.h | 10 - .../include/cpp-colors/impl/wpf/wpf_colors.h | 81 - .../cpp-colors/impl/wpf/wpf_constants.h | 27 - .../include/cpp-colors/impl/wpf/wpf_named.h | 224 -- .../include/cpp-colors/impl/x11/x11_colors.h | 580 --- .../cpp-colors/impl/x11/x11_constants.h | 152 - .../include/cpp-colors/impl/x11/x11_named.h | 1477 -------- .../include/cpp-colors/pixel_format.h | 365 -- .../include/cpp-colors/pixel_utils.h | 540 --- extern/cpp-colors/test/CMakeLists.txt | 19 - extern/cpp-colors/test/run_tests.cpp | 7 - extern/cpp-colors/test/suites/test_color.cpp | 355 -- .../include/pybind11_json/pybind11_json.hpp | 97 +- extern/quickfuture/src/qffuture.cpp | 26 +- extern/quickfuture/src/qfvariantwrapper.h | 13 +- include/xstudio/atoms.hpp | 12 +- include/xstudio/audio/audio_output.hpp | 4 +- include/xstudio/audio/audio_output_actor.hpp | 20 +- include/xstudio/audio/enums.hpp | 30 +- .../audio/linux_audio_output_device.hpp | 64 +- .../audio/macos_audio_output_device.hpp | 64 +- .../audio/windows_audio_output_device.hpp | 70 +- include/xstudio/bookmark/bookmark.hpp | 700 ++-- include/xstudio/bookmark/bookmark_actor.hpp | 56 +- include/xstudio/bookmark/bookmarks_actor.hpp | 58 +- include/xstudio/broadcast/broadcast_actor.hpp | 56 +- include/xstudio/caf_utility/caf_setup.hpp | 14 +- .../colour_pipeline/colour_cache_actor.hpp | 30 +- .../xstudio/colour_pipeline/colour_lut.hpp | 298 +- .../colour_pipeline/colour_operation.hpp | 129 +- .../colour_pipeline/colour_pipeline.hpp | 4 +- .../colour_pipeline/colour_pipeline_actor.hpp | 56 +- .../colour_pipeline/colour_texture.hpp | 31 +- .../xstudio/conform/conform_manager_actor.hpp | 5 +- include/xstudio/conform/conformer.hpp | 546 ++- .../xstudio/contact_sheet/contact_sheet.hpp | 86 +- .../contact_sheet/contact_sheet_actor.hpp | 32 +- include/xstudio/data_source/data_source.hpp | 242 +- .../embedded_python/embedded_python.hpp | 82 +- .../embedded_python/embedded_python_actor.hpp | 82 +- include/xstudio/global/enums.hpp | 32 +- include/xstudio/global/global_actor.hpp | 147 +- include/xstudio/global_store/global_store.hpp | 359 +- .../global_store/global_store_actor.hpp | 64 +- include/xstudio/history/history.hpp | 154 +- include/xstudio/history/history_actor.hpp | 622 ++-- .../http_client/caf_http_client_error.hpp | 72 +- include/xstudio/http_client/http_client.hpp | 16 +- .../xstudio/http_client/http_client_actor.hpp | 96 +- .../xstudio/json_store/json_store_actor.hpp | 54 +- .../xstudio/json_store/json_store_handler.hpp | 2 +- .../xstudio/json_store/json_store_helper.hpp | 84 +- include/xstudio/media/caf_media_error.hpp | 104 +- include/xstudio/media/enums.hpp | 36 +- include/xstudio/media/media.hpp | 1093 +++--- include/xstudio/media/media_actor.hpp | 424 ++- .../media/media_metadata_manager_actor.hpp | 32 +- .../xstudio/media_cache/media_cache_actor.hpp | 110 +- include/xstudio/media_hook/media_hook.hpp | 415 ++- .../xstudio/media_hook/media_hook_actor.hpp | 78 +- include/xstudio/media_metadata/enums.hpp | 78 +- .../xstudio/media_metadata/media_metadata.hpp | 232 +- .../media_metadata/media_metadata_actor.hpp | 68 +- include/xstudio/media_reader/audio_buffer.hpp | 306 +- include/xstudio/media_reader/buffer.hpp | 190 +- .../cacheing_media_reader_actor.hpp | 87 +- include/xstudio/media_reader/enums.hpp | 80 +- .../media_reader/frame_request_queue.hpp | 188 +- include/xstudio/media_reader/image_buffer.hpp | 628 ++-- .../xstudio/media_reader/image_buffer_set.hpp | 356 +- ...edia_detail_and_thumbnail_reader_actor.hpp | 120 +- include/xstudio/media_reader/media_reader.hpp | 39 +- .../media_reader/media_reader_actor.hpp | 179 +- include/xstudio/media_reader/pixel_info.hpp | 231 +- include/xstudio/module/attribute.hpp | 379 +- .../xstudio/module/attribute_role_data.hpp | 501 ++- include/xstudio/module/module.hpp | 836 ++--- include/xstudio/module/typed_attributes.hpp | 234 +- include/xstudio/playhead/enums.hpp | 58 +- include/xstudio/playhead/playhead.hpp | 414 ++- include/xstudio/playhead/playhead_actor.hpp | 342 +- .../playhead/playhead_global_events_actor.hpp | 78 +- .../xstudio/playhead/playhead_selection.hpp | 88 +- .../playhead/playhead_selection_actor.hpp | 70 +- include/xstudio/playhead/string_out_actor.hpp | 58 +- include/xstudio/playhead/sub_playhead.hpp | 322 +- include/xstudio/playlist/playlist.hpp | 132 +- include/xstudio/playlist/playlist_actor.hpp | 4 +- include/xstudio/plugin_manager/hud_plugin.hpp | 177 +- .../xstudio/plugin_manager/plugin_base.hpp | 602 ++-- .../xstudio/plugin_manager/plugin_factory.hpp | 288 +- .../xstudio/plugin_manager/plugin_manager.hpp | 194 +- .../plugin_manager/plugin_manager_actor.hpp | 44 +- .../xstudio/plugin_manager/plugin_utility.hpp | 159 +- include/xstudio/scanner/scanner_actor.hpp | 4 +- include/xstudio/session/enums.hpp | 21 +- include/xstudio/session/session.hpp | 190 +- include/xstudio/session/session_actor.hpp | 250 +- .../caf_shotgun_client_error.hpp | 114 +- include/xstudio/shotgun_client/enums.hpp | 62 +- .../xstudio/shotgun_client/shotgun_client.hpp | 3180 ++++++++--------- .../shotgun_client/shotgun_client_actor.hpp | 373 +- include/xstudio/studio/studio.hpp | 20 +- include/xstudio/studio/studio_actor.hpp | 62 +- include/xstudio/subset/subset.hpp | 88 +- include/xstudio/subset/subset_actor.hpp | 126 +- include/xstudio/thumbnail/enums.hpp | 6 +- include/xstudio/thumbnail/thumbnail.hpp | 264 +- .../thumbnail/thumbnail_cache_actor.hpp | 44 +- .../thumbnail/thumbnail_disk_cache_actor.hpp | 96 +- .../thumbnail/thumbnail_manager_actor.hpp | 2 +- include/xstudio/timeline/clip.hpp | 92 +- include/xstudio/timeline/clip_actor.hpp | 84 +- include/xstudio/timeline/enums.hpp | 22 +- include/xstudio/timeline/gap.hpp | 52 +- include/xstudio/timeline/gap_actor.hpp | 66 +- include/xstudio/timeline/item.hpp | 1026 +++--- include/xstudio/timeline/marker.hpp | 144 +- include/xstudio/timeline/stack.hpp | 64 +- include/xstudio/timeline/stack_actor.hpp | 111 +- include/xstudio/timeline/timeline.hpp | 214 +- include/xstudio/timeline/timeline_actor.hpp | 193 +- include/xstudio/timeline/track.hpp | 60 +- include/xstudio/timeline/track_actor.hpp | 245 +- include/xstudio/ui/canvas/canvas.hpp | 552 ++- .../xstudio/ui/canvas/canvas_undo_redo.hpp | 50 +- include/xstudio/ui/canvas/caption.hpp | 273 +- include/xstudio/ui/canvas/shapes.hpp | 104 +- include/xstudio/ui/canvas/stroke.hpp | 181 +- include/xstudio/ui/font.hpp | 568 ++- .../ui/frontend_model/frontend_model_data.hpp | 51 +- include/xstudio/ui/helpers.hpp | 98 +- include/xstudio/ui/keyboard.hpp | 467 +-- .../ui/model_data/model_data_actor.hpp | 340 +- include/xstudio/ui/mouse.hpp | 682 ++-- include/xstudio/ui/opengl/gl_debug_utils.hpp | 32 +- .../ui/opengl/no_image_shader_program.hpp | 16 +- .../ui/opengl/opengl_canvas_renderer.hpp | 129 +- .../ui/opengl/opengl_caption_renderer.hpp | 88 +- .../ui/opengl/opengl_colour_lut_texture.hpp | 64 +- .../opengl/opengl_multi_buffered_texture.hpp | 122 +- .../ui/opengl/opengl_offscreen_renderer.hpp | 72 +- .../opengl/opengl_rgba8bit_image_texture.hpp | 46 +- .../ui/opengl/opengl_shape_renderer.hpp | 64 +- .../ui/opengl/opengl_ssbo_image_texture.hpp | 38 +- .../ui/opengl/opengl_stroke_renderer.hpp | 162 +- .../ui/opengl/opengl_text_rendering.hpp | 142 +- .../xstudio/ui/opengl/opengl_texture_base.hpp | 78 +- .../ui/opengl/opengl_viewport_renderer.hpp | 264 +- .../xstudio/ui/opengl/shader_program_base.hpp | 119 +- include/xstudio/ui/qml/.clang-tidy | 1 - include/xstudio/ui/qml/actor_object.hpp | 19 +- include/xstudio/ui/qml/bookmark_model_ui.hpp | 14 +- include/xstudio/ui/qml/caf_response_ui.hpp | 2 +- include/xstudio/ui/qml/conform_ui.hpp | 158 +- include/xstudio/ui/qml/embedded_python_ui.hpp | 355 +- include/xstudio/ui/qml/helper_ui.hpp | 2163 ++++++----- include/xstudio/ui/qml/hotkey_ui.hpp | 508 +-- include/xstudio/ui/qml/json_store_ui.hpp | 67 +- include/xstudio/ui/qml/json_tree_model_ui.hpp | 18 +- include/xstudio/ui/qml/log_ui.hpp | 188 +- include/xstudio/ui/qml/model_data_ui.hpp | 46 +- include/xstudio/ui/qml/qml_viewport.hpp | 293 +- .../xstudio/ui/qml/qml_viewport_renderer.hpp | 261 +- include/xstudio/ui/qml/session_model_ui.hpp | 30 +- .../xstudio/ui/qml/shotgun_provider_ui.hpp | 4 +- include/xstudio/ui/qml/studio_ui.hpp | 122 +- .../xstudio/ui/qml/thumbnail_provider_ui.hpp | 6 +- include/xstudio/ui/qt/application_ui.hpp | 16 +- include/xstudio/ui/qt/json_store_ui.hpp | 84 +- include/xstudio/ui/qt/offscreen_viewport.hpp | 323 +- include/xstudio/ui/qt/player_ui.hpp | 32 +- include/xstudio/ui/qt/studio_ui.hpp | 24 +- include/xstudio/ui/qt/viewport_opengl_ui.hpp | 60 +- include/xstudio/ui/qt/viewport_widget.hpp | 80 +- include/xstudio/ui/viewport/enums.hpp | 16 +- .../xstudio/ui/viewport/keypress_monitor.hpp | 59 +- include/xstudio/ui/viewport/mask.hpp | 118 + include/xstudio/ui/viewport/shader.hpp | 32 +- .../ui/viewport/video_output_plugin.hpp | 400 +-- include/xstudio/ui/viewport/viewport.hpp | 902 +++-- .../viewport/viewport_frame_queue_actor.hpp | 177 +- .../viewport/viewport_gpu_post_processor.hpp | 190 +- .../ui/viewport/viewport_layout_plugin.hpp | 334 +- .../ui/viewport/viewport_renderer_base.hpp | 207 +- include/xstudio/utility/blind_data.hpp | 67 +- include/xstudio/utility/caf_helpers.hpp | 141 +- include/xstudio/utility/chrono.hpp | 68 +- include/xstudio/utility/colours.hpp | 155 + include/xstudio/utility/container.hpp | 1250 ++++--- include/xstudio/utility/csv.hpp | 62 +- include/xstudio/utility/enums.hpp | 24 +- include/xstudio/utility/file_system_item.hpp | 6 +- include/xstudio/utility/frame_list.hpp | 200 +- include/xstudio/utility/frame_range.hpp | 150 +- include/xstudio/utility/frame_rate.hpp | 297 +- .../utility/frame_rate_and_duration.hpp | 182 +- include/xstudio/utility/helpers.hpp | 1116 +++--- include/xstudio/utility/json_store.hpp | 260 +- include/xstudio/utility/json_store_sync.hpp | 17 +- include/xstudio/utility/lock_file.hpp | 235 +- include/xstudio/utility/logging.hpp | 33 +- include/xstudio/utility/managed_dir.hpp | 8 +- include/xstudio/utility/media_reference.hpp | 220 +- include/xstudio/utility/mru_cache.hpp | 361 +- .../xstudio/utility/notification_handler.hpp | 16 +- include/xstudio/utility/path_remapper.hpp | 39 + .../xstudio/utility/remote_session_file.hpp | 153 +- include/xstudio/utility/sequence.hpp | 116 +- include/xstudio/utility/string_helpers.hpp | 656 ++-- include/xstudio/utility/time_cache.hpp | 1065 +++--- include/xstudio/utility/timecode.hpp | 192 +- include/xstudio/utility/tree.hpp | 398 +-- include/xstudio/utility/types.hpp | 60 +- include/xstudio/utility/undo_redo.hpp | 312 +- include/xstudio/utility/uuid.hpp | 475 ++- python/CMakeLists.txt | 27 +- python/setup.py.in | 1 - python/src/xstudio/api/module.py | 9 +- python/src/xstudio/api/session/media/media.py | 2 +- .../xstudio/api/session/playlist/playlist.py | 10 + python/src/xstudio/api/session/session.py | 25 + python/src/xstudio/plugin/__init__.py | 1 + python/src/xstudio/plugin/hud_plugin.py | 318 +- python/src/xstudio/plugin/mask_plugin.py | 80 + python/src/xstudio/testbed/client.py | 0 python/src/xstudio/testbed/server.py | 0 python/src/xstudio/testbed/session.py | 0 python/src/xstudiopy | 0 scripts/linting/run_clang_format | 0 share/docs/.buildinfo | 2 +- share/docs/.doctrees/environment.pickle | Bin 11839839 -> 11990015 bytes .../.doctrees/reference/api/enums.doctree | Bin 187761 -> 187342 bytes .../.doctrees/reference/api/plugin.doctree | Bin 807546 -> 822605 bytes .../.doctrees/reference/api/utility.doctree | Bin 3513668 -> 3535253 bytes .../build_guides/developer_tips.doctree | Bin 7888 -> 0 bytes .../build_guides/downloading_qt.doctree | Bin 10415 -> 16600 bytes .../reference/build_guides/index.doctree | Bin 8012 -> 12191 bytes .../build_guides/linux_generic.doctree | Bin 14718 -> 18005 bytes .../reference/build_guides/macos.doctree | Bin 16576 -> 15874 bytes .../reference/build_guides/windows.doctree | Bin 22281 -> 23200 bytes .../reference/python_api/api.doctree | Bin 795090 -> 813736 bytes .../reference/python_api/core.doctree | Bin 305826 -> 313046 bytes .../getting_started/getting_started.doctree | Bin 26987 -> 31026 bytes .../interface/file_system_browser.doctree | Bin 0 -> 24830 bytes .../user_docs/interface/interface.doctree | Bin 3511 -> 3558 bytes .../user_docs/workflow/hotkeys.doctree | Bin 5449 -> 7912 bytes .../user_docs/workflow/notes.doctree | Bin 25517 -> 30326 bytes .../CMakePresets.json | 269 ++ share/docs/_images/file-system-browser-1.png | Bin 0 -> 497479 bytes .../_images/file-system-browser-group.png | Bin 0 -> 164992 bytes .../docs/_images/file-system-browser-list.png | Bin 0 -> 165884 bytes .../_images/file-system-browser-thumbs.png | Bin 0 -> 461606 bytes .../docs/_images/file-system-browser-tree.png | Bin 0 -> 162552 bytes share/docs/_images/shortcuts-01.png | Bin 61035 -> 90276 bytes share/docs/_images/shortcuts-02.png | Bin 0 -> 29464 bytes share/docs/_modules/index.html | 6 +- share/docs/_modules/xstudio/api.html | 6 +- share/docs/_modules/xstudio/api/app.html | 6 +- .../xstudio/api/auxiliary/helpers.html | 6 +- .../xstudio/api/intrinsic/global_store.html | 6 +- .../xstudio/api/intrinsic/media_cache.html | 6 +- share/docs/_modules/xstudio/api/module.html | 16 +- .../xstudio/api/session/container.html | 6 +- .../xstudio/api/session/media/media.html | 8 +- .../api/session/media/media_source.html | 6 +- .../api/session/media/media_stream.html | 6 +- .../api/session/playhead/playhead.html | 6 +- .../session/playhead/playhead_selection.html | 6 +- .../api/session/playlist/contact_sheet.html | 6 +- .../api/session/playlist/playlist.html | 19 +- .../xstudio/api/session/playlist/subset.html | 6 +- .../api/session/playlist/timeline.html | 6 +- .../_modules/xstudio/api/session/session.html | 35 +- share/docs/_modules/xstudio/api/studio.html | 6 +- share/docs/_modules/xstudio/connection.html | 6 +- .../_modules/xstudio/core/interactive.html | 6 +- .../_modules/xstudio/demo/capitalise.html | 6 +- .../_modules/xstudio/demo/flag_disco.html | 6 +- .../_modules/xstudio/demo/make_playlists.html | 6 +- .../_modules/xstudio/demo/sort_session.html | 6 +- .../_modules/xstudio/plugin/hud_plugin.html | 331 +- .../_modules/xstudio/plugin/plugin_base.html | 6 +- .../plugin/viewport_layout_plugin.html | 6 +- .../build_guides/developer_tips.md.txt | 21 - .../build_guides/downloading_qt.md.txt | 29 +- .../reference/build_guides/index.rst.txt | 9 +- .../build_guides/linux_generic.md.txt | 53 +- .../reference/build_guides/macos.md.txt | 51 +- .../reference/build_guides/windows.md.txt | 65 +- .../getting_started/getting_started.rst.txt | 17 + .../interface/file_system_browser.rst.txt | 114 + .../user_docs/interface/interface.rst.txt | 1 + .../user_docs/release_notes/index.rst.txt | 22 +- .../user_docs/workflow/hotkeys.rst.txt | 18 +- .../_sources/user_docs/workflow/notes.rst.txt | 4 + share/docs/_static/documentation_options.js | 2 +- share/docs/_static/file-browser-01.webm | Bin 0 -> 8980530 bytes share/docs/genindex.html | 64 +- share/docs/index.html | 6 +- share/docs/objects.inv | Bin 49309 -> 50310 bytes share/docs/py-modindex.html | 6 +- share/docs/reference/api/enums.html | 31 +- share/docs/reference/api/index.html | 9 +- share/docs/reference/api/plugin.html | 33 +- share/docs/reference/api/utility.html | 491 ++- .../docs/reference/build_guides/centos_7.html | 9 +- .../reference/build_guides/dependencies.html | 9 +- .../build_guides/developer_tips.html | 131 - .../build_guides/downloading_qt.html | 38 +- share/docs/reference/build_guides/index.html | 14 +- .../reference/build_guides/linux_generic.html | 62 +- share/docs/reference/build_guides/macos.html | 63 +- .../build_guides/rocky_linux_9_1.html | 9 +- .../reference/build_guides/ubuntu_22_04.html | 9 +- .../docs/reference/build_guides/windows.html | 81 +- share/docs/reference/index.html | 7 +- share/docs/reference/python_api/api.html | 145 +- .../docs/reference/python_api/connection.html | 6 +- share/docs/reference/python_api/core.html | 22 +- share/docs/reference/python_api/demo.html | 6 +- share/docs/reference/python_api/index.html | 6 +- share/docs/reference/python_api/root.html | 8 +- share/docs/search.html | 6 +- share/docs/searchindex.js | 2 +- .../user_docs/appendix/colour_management.html | 6 +- share/docs/user_docs/appendix/index.html | 6 +- .../docs/user_docs/appendix/media_items.html | 6 +- .../user_docs/appendix/preference_files.html | 6 +- .../user_docs/appendix/python_plugins.html | 6 +- .../user_docs/appendix/python_scripting.html | 6 +- .../user_docs/appendix/python_snippets.html | 6 +- .../getting_started/getting_started.html | 21 +- share/docs/user_docs/index.html | 10 +- .../interface/file_system_browser.html | 237 ++ share/docs/user_docs/interface/interface.html | 12 +- share/docs/user_docs/interface/layouts.html | 7 +- .../docs/user_docs/interface/media_list.html | 11 +- share/docs/user_docs/interface/playlists.html | 7 +- share/docs/user_docs/interface/timeline.html | 7 +- share/docs/user_docs/interface/transport.html | 7 +- share/docs/user_docs/interface/viewport.html | 11 +- share/docs/user_docs/overview.html | 6 +- share/docs/user_docs/release_notes/index.html | 32 +- .../user_docs/workflow/compare_modes.html | 6 +- share/docs/user_docs/workflow/grading.html | 6 +- share/docs/user_docs/workflow/hotkeys.html | 25 +- share/docs/user_docs/workflow/notes.html | 8 +- share/docs/user_docs/workflow/playback.html | 6 +- share/docs/user_docs/workflow/quick_view.html | 6 +- share/docs/user_docs/workflow/sdi_output.html | 6 +- .../docs/user_docs/workflow/video_output.html | 6 +- share/docs/user_docs/workflow/workflow.html | 6 +- share/preference/core_media_reader.json | 12 + share/preference/core_session.json | 6 +- .../plugin_media_metadata_ffprobe.json | 2 + .../plugin_media_metadata_openimageio.json | 68 +- .../plugin_media_reader_ffmpeg.json | 2 + .../plugin_media_reader_openimageio.json | 54 +- share/preference/ui_keyboard.json | 13 + share/preference/ui_qml.json | 524 ++- src/audio/src/audio_output.cpp | 13 +- src/audio/src/audio_output_actor.cpp | 2 +- src/audio/src/macos_audio_output_device.cpp | 118 +- src/audio/src/windows_audio_output_device.cpp | 6 +- src/audio/test/audio_test.cpp | 4 +- src/colour_pipeline/src/colour_operation.cpp | 2 + .../src/colour_pipeline_actor.cpp | 2 +- src/conform/src/conform_manager_actor.cpp | 20 +- src/conform/src/conformer.cpp | 10 +- src/contact_sheet/test/CMakeLists.txt | 1 + .../source_grading_demo/src/qml/.clang-tidy | 1 - src/embedded_python/src/embedded_python.cpp | 6 +- .../src/embedded_python_actor.cpp | 117 +- src/embedded_python/test/CMakeLists.txt | 3 + .../test/embedded_python_actor_test.cpp | 4 +- src/global/src/global_actor.cpp | 8 +- src/global/src/xstudio_actor_system.cpp | 8 +- src/global/test/global_actor_remote_test.cpp | 2 +- src/global_store/src/global_store_actor.cpp | 2 +- src/http_client/src/http_client_actor.cpp | 45 +- src/json_store/src/json_store_actor.cpp | 6 +- src/json_store/test/json_store_actor_test.cpp | 38 +- src/launch/xstudio/src/.clang-tidy | 1 - src/launch/xstudio/src/xstudio.cpp | 7 +- src/media/src/media_actor.cpp | 6 +- .../src/media_metadata_manager_actor.cpp | 2 +- src/media/src/media_source.cpp | 10 + src/media/src/media_source_actor.cpp | 112 +- src/media/test/media_actor_test.cpp | 42 +- src/media_cache/src/media_cache_actor.cpp | 6 +- src/media_hook/src/media_hook_actor.cpp | 2 + src/media_metadata/test/CMakeLists.txt | 1 + .../test/media_metadata_actor_test.cpp | 114 +- .../src/cacheing_media_reader_actor.cpp | 40 +- src/media_reader/src/frame_request_queue.cpp | 5 +- ...edia_detail_and_thumbnail_reader_actor.cpp | 7 +- src/media_reader/src/media_reader.cpp | 35 +- src/media_reader/src/media_reader_actor.cpp | 36 +- .../test/media_reader_actor_test.cpp | 2 +- src/module/src/attribute.cpp | 3 +- src/module/src/module.cpp | 28 +- src/playhead/src/playhead.cpp | 6 +- src/playhead/src/playhead_actor.cpp | 90 +- .../src/playhead_global_events_actor.cpp | 22 +- src/playhead/src/string_out_actor.cpp | 29 +- src/playhead/src/sub_playhead.cpp | 126 +- src/playhead/test/CMakeLists.txt | 1 + src/playhead/test/playhead_actor_test.cpp | 44 +- src/playlist/src/playlist_actor.cpp | 9 +- src/playlist/test/playlist_actor_test.cpp | 38 +- src/plugin/colour_op/grading/src/grading.cpp | 142 +- src/plugin/colour_op/grading/src/grading.h | 9 +- .../colour_op/grading/src/grading_common.cpp | 3 +- .../colour_op/grading/src/grading_common.h | 6 +- .../colour_op/grading/src/grading_data.h | 10 +- .../grading/src/grading_data_serialiser.hpp | 36 +- .../grading/src/grading_mask_gl_renderer.cpp | 4 +- .../grading/src/grading_mask_gl_renderer.h | 8 +- .../grading/src/grading_mask_render_data.h | 6 +- .../colour_op/grading/src/qml/.clang-tidy | 1 - .../src/qml/Grading.2/GradingOverlay.qml | 20 +- .../colour_pipeline/ocio/src/ocio_engine.hpp | 2 +- .../colour_pipeline/ocio/src/ocio_plugin.cpp | 25 +- .../colour_pipeline/ocio/src/ocio_plugin.hpp | 6 +- .../src/ocio_python_plugin/ocio_py_plugin.py | 15 +- .../colour_pipeline/ocio/src/ocio_shader.cpp | 2 +- .../ocio/src/ocio_shared_settings.cpp | 2 +- .../ocio/src/ocio_shared_settings.hpp | 124 +- .../src/conform_shotbrowser.cpp | 48 +- .../src/demo_media_reader.hpp | 52 +- .../src/demo_plugin.cpp | 2 +- .../src/demo_plugin.hpp | 100 +- .../src/demo_plugin_database_ui_model.cpp | 2 +- .../src/demo_plugin_database_ui_model.hpp | 371 +- .../src/demo_plugin_ui.hpp | 159 +- .../dneg/ivy/python/CMakeLists.txt | 3 +- .../preference/plugin_data_source_ivy.json | 4 +- .../dneg/ivy/src/data_source_ivy.cpp | 59 +- .../dneg/ivy/src/data_source_ivy.hpp | 16 +- .../dneg/shotbrowser/python/CMakeLists.txt | 3 +- .../plugin_data_source_shotbrowser.json | 28 + .../dneg/shotbrowser/src/action.cpp | 4 +- .../dneg/shotbrowser/src/definitions.hpp | 25 +- .../dneg/shotbrowser/src/get_actions.cpp | 146 +- .../dneg/shotbrowser/src/model_ui.cpp | 18 +- .../dneg/shotbrowser/src/model_ui.hpp | 705 ++-- .../dneg/shotbrowser/src/preset_model_ui.cpp | 8 +- .../qml/ShotBrowser.1/ShotBrowserHelpers.js | 24 +- .../ShotBrowserMediaListMenu.qml | 42 + .../dialogs/XsSBPublishNotesDialog.qml | 3 +- .../notes_history/NotesHistoryResultPopup.qml | 6 +- .../shot_browser/XsShotBrowser.qml | 13 + .../left_sections/XsSBL2V1Tree.qml | 21 + .../viewItems/XsSBShotDelegate.qml | 17 +- .../right_sections/XsSBR1Tools.qml | 48 +- .../XsSBRPlaylistResultPopup.qml | 5 +- .../shot_history/ShotHistoryResultPopup.qml | 5 +- .../dneg/shotbrowser/src/query_engine.cpp | 55 +- .../dneg/shotbrowser/src/query_engine.hpp | 62 +- .../dneg/shotbrowser/src/result_model_ui.cpp | 55 +- .../dneg/shotbrowser/src/result_model_ui.hpp | 11 +- .../src/shotbrowser_engine_request_ui.cpp | 91 +- .../shotbrowser/src/shotbrowser_engine_ui.cpp | 52 + .../shotbrowser/src/shotbrowser_engine_ui.hpp | 1041 +++--- .../shotbrowser/src/shotbrowser_plugin.cpp | 45 +- .../shotbrowser/src/shotbrowser_plugin.hpp | 830 +++-- .../shotbrowser/src/shotgrid_provider_ui.hpp | 4 +- .../dneg/shotbrowser/src/worker.cpp | 130 +- .../dneg/shotbrowser/src/worker.hpp | 2 +- .../exr_data_window/src/exr_data_window.cpp | 10 +- .../exr_data_window/src/exr_data_window.hpp | 62 +- .../image_boundary/src/image_boundary_hud.hpp | 62 +- .../hud/pixel_probe/src/pixel_probe.hpp | 132 +- .../hud/pixel_probe/src/qml/.clang-tidy | 1 - .../media_hook/dneg/dnhook/src/dneg.cpp | 42 +- .../media_metadata/ffprobe/src/.clang-tidy | 1 - .../ffprobe/src/ffprobe_lib.cpp | 14 +- .../ffprobe/src/ffprobe_lib.hpp | 44 +- .../ffprobe/test/CMakeLists.txt | 1 + .../openimageio/src/openimageio_metadata.cpp | 1 - .../openimageio/src/openimageio_metadata.hpp | 31 +- src/plugin/media_reader/blank/src/blank.hpp | 34 +- src/plugin/media_reader/ffmpeg/src/ffmpeg.cpp | 42 +- src/plugin/media_reader/ffmpeg/src/ffmpeg.hpp | 108 +- .../ffmpeg/src/ffmpeg_decoder.cpp | 79 +- .../ffmpeg/src/ffmpeg_decoder.hpp | 206 +- .../media_reader/ffmpeg/src/ffmpeg_stream.cpp | 13 +- .../media_reader/ffmpeg/src/ffmpeg_stream.hpp | 282 +- .../media_reader/openexr/src/openexr.cpp | 21 +- .../media_reader/openexr/src/openexr.hpp | 107 +- .../openexr/src/simple_exr_sampler.hpp | 277 +- .../openimageio/src/openimageio.cpp | 6 +- .../openimageio/src/openimageio.hpp | 42 +- .../openimageio/test/CMakeLists.txt | 2 + src/plugin/media_reader/pdf/src/pdf.cpp | 80 +- src/plugin/media_reader/pdf/src/pdf.hpp | 60 +- src/plugin/media_reader/ppm/src/ppm.hpp | 46 +- src/plugin/python_plugins/CMakeLists.txt | 7 +- .../annotations_exporter.py | 16 +- .../AnnotationsExportDialog.qml | 4 - .../basic_viewport_mask/__init__.py | 2 + .../basic_viewport_mask.py | 166 + .../filesystem_browser/ffmpeg_thumbnails.py | 188 + .../filesystem_browser/filesystem_browser.py | 604 +--- .../DirectoryTree.qml | 2 +- .../FilesystemBrowser.qml | 20 +- .../XsFileSystemStyle.qml | 2 +- .../icons/folder_closed.svg | 0 .../qmldir | 0 .../FilesystemBrowser.qml | 1078 ++++++ .../icons/folder_closed.svg | 38 + .../icons/refresh.svg | 1 + .../qml/FilesystemBrowserXStudio.1/qmldir | 2 + .../styled_widgets/FSDirectoryTree.qml | 96 + .../styled_widgets/FSDirectoryTreeBody.qml | 516 +++ .../styled_widgets/FSFileContextMenu.qml | 56 + .../styled_widgets/FSListHeader.qml | 126 + .../styled_widgets/FSListHeaderColumn.qml | 35 + .../styled_widgets/FSListItem.qml | 65 + .../styled_widgets/FSListView.qml | 92 + .../styled_widgets/FSMainHeader.qml | 131 + .../styled_widgets/FSPathInput.qml | 396 ++ .../styled_widgets/FSThumbFolderHeader.qml | 32 + .../styled_widgets/FSThumbItem.qml | 188 + .../styled_widgets/FSThumbView.qml | 183 + .../filesystem_browser/scanner.py | 29 +- .../ViewportFlagIndicatorSettingsOverlay.qml | 30 +- .../viewport_flag_indicator_plugin.py | 32 +- .../SessionSnapshotsMenu.qml | 8 +- .../src/snapshot_model_ui.cpp | 2 + .../bmd_decklink/src/CMakeLists.txt | 8 +- .../src/decklink_audio_device.cpp | 8 +- .../src/decklink_audio_device.hpp | 74 +- .../bmd_decklink/src/decklink_output.cpp | 168 +- .../bmd_decklink/src/decklink_output.hpp | 358 +- .../bmd_decklink/src/decklink_plugin.cpp | 24 +- .../bmd_decklink/src/decklink_plugin.hpp | 171 +- .../bmd_decklink/src/pixel_swizzler.cpp | 17 +- .../bmd_decklink/src/pixel_swizzler.hpp | 292 +- .../video_renderer/src/qml/.clang-tidy | 1 - .../VideoRenderer.1/VideoRendererDialog.qml | 73 +- .../video_render_gl_framegrab_to_rgb10bit.cpp | 10 +- .../src/video_render_gl_framegrab_to_yuv.cpp | 10 +- .../src/video_render_plugin.cpp | 15 +- .../src/video_render_plugin.hpp | 258 +- .../src/video_render_prefs.json | 3 + .../src/video_render_worker.cpp | 278 +- .../src/video_render_worker.hpp | 258 +- .../src/composite_viewport_layout.cpp | 70 +- .../src/composite_viewport_layout.hpp | 70 +- .../src/viewport_layout_default.hpp | 64 +- .../src/viewport_layout_grid.hpp | 67 +- .../wipe_viewport_layout/src/qml/.clang-tidy | 1 - .../src/wipe_viewport_layout.cpp | 6 +- .../src/wipe_viewport_layout.hpp | 65 +- src/plugin/viewport_overlay/CMakeLists.txt | 2 +- .../annotations/src/CMakeLists.txt | 1 + .../annotations/src/annotation.cpp | 2 +- .../annotations/src/annotation.hpp | 53 +- .../src/annotation_opengl_renderer.cpp | 15 +- .../src/annotation_opengl_renderer.hpp | 206 +- .../src/annotation_render_data.hpp | 206 +- .../annotations/src/annotation_serialiser.hpp | 38 +- .../annotations/src/annotation_undo_redo.hpp | 455 ++- .../src/annotations_core_plugin.cpp | 297 +- .../src/annotations_core_plugin.hpp | 331 +- .../annotations/src/annotations_ui_plugin.cpp | 140 +- .../annotations/src/annotations_ui_plugin.hpp | 456 +-- .../annotations/src/pixel_patch.hpp | 130 +- .../annotations/src/pressure_lut.hpp | 424 ++- .../annotations/src/qml/.clang-tidy | 1 - .../qml/AnnotationsUI.2/XsBlendModeToggle.qml | 44 + .../AnnotationsUI.2/XsBrushToolProperties.qml | 159 +- .../AnnotationsUI.2/XsBurnToolProperties.qml | 50 + .../AnnotationsUI.2/XsDodgeToolProperties.qml | 50 + .../qml/AnnotationsUI.2/XsDrawingTools.qml | 28 + .../AnnotationsUI.2/XsEraseToolProperties.qml | 15 +- .../AnnotationsUI.2/XsLaserToolProperties.qml | 128 +- .../AnnotationsUI.2/XsPenToolProperties.qml | 128 +- .../XsShapesToolProperties.qml | 142 +- .../AnnotationsUI.2/XsTextToolProperties.qml | 140 +- .../src/qml/AnnotationsUI.2/XsToolActions.qml | 114 +- .../qml/AnnotationsUI.2/XsToolAttrControl.qml | 14 + .../AnnotationsUI.2/XsToolColourPicker.qml | 127 + .../qml/AnnotationsUI.2/XsToolSelector.qml | 8 +- .../src/qml/AnnotationsUI.2/anno_tools.qrc | 2 + .../src/qml/AnnotationsUI.2/icons/burn.svg | 1 + .../src/qml/AnnotationsUI.2/icons/dodge.svg | 1 + .../src/qml/AnnotationsUI.2/qmldir | 7 +- .../src/serialisers/1.0/serialiser_1_pt_0.cpp | 13 +- .../src/serialisers/2.0/serialiser_2_pt_0.cpp | 13 +- .../src/serialisers/3.0/serialiser_3_pt_0.cpp | 23 +- .../src/serialisers/4.0/serialiser_4_pt_0.cpp | 31 + .../src/audio_waveform_overlay.hpp | 201 +- .../basic_viewport_mask/src/CMakeLists.txt | 13 - .../src/basic_viewport_masking.cpp | 369 -- .../src/basic_viewport_masking.hpp | 97 - .../basic_viewport_mask/src/qml/.clang-tidy | 33 - .../BasicViewportMaskOverlay.qml | 195 - .../src/qml/BasicViewportMask.1/check.svg | 1 - .../src/qml/BasicViewportMask.1/qmldir | 3 - .../mask_renderer/src/CMakeLists.txt | 12 + .../mask_renderer/src/mask_renderer.cpp | 675 ++++ .../mask_renderer/src/mask_renderer.hpp | 119 + .../test/CMakeLists.txt | 0 .../src/media_metadata_hud.cpp | 30 +- .../src/media_metadata_hud.hpp | 491 ++- .../media_metadata_hud/src/qml/.clang-tidy | 1 - src/plugin_manager/src/hud_plugin.cpp | 4 +- src/plugin_manager/src/plugin_base.cpp | 23 +- src/plugin_manager/src/plugin_manager.cpp | 2 +- src/plugin_manager/test/CMakeLists.txt | 1 + src/pyside6_module/src/CMakeLists.txt | 5 + src/pyside6_module/src/plain_viewport.hpp | 10 +- src/pyside6_module/src/threaded_viewport.hpp | 10 +- src/python_module/src/py_atoms.cpp | 1 + src/python_module/src/py_config.hpp | 1 - src/python_module/src/py_context.cpp | 29 +- src/python_module/src/py_messages.cpp | 7 +- src/python_module/src/py_opaque.hpp | 2 + src/python_module/src/py_register.cpp | 51 +- src/python_module/src/py_types.cpp | 3 + src/python_module/src/py_xstudio.cpp | 6 +- src/scanner/src/scanner_actor.cpp | 10 +- src/session/src/session_actor.cpp | 30 +- src/session/test/session_actor_test.cpp | 19 +- src/subset/src/subset_actor.cpp | 4 +- src/thumbnail/src/thumbnail.cpp | 4 +- src/thumbnail/src/thumbnail_cache_actor.cpp | 2 +- .../src/thumbnail_disk_cache_actor.cpp | 4 +- src/timeline/src/clip.cpp | 2 +- src/timeline/src/gap.cpp | 2 +- src/timeline/src/item.cpp | 50 +- src/timeline/src/stack.cpp | 2 +- src/timeline/src/stack_actor.cpp | 2 +- src/timeline/src/timeline.cpp | 2 +- src/timeline/src/timeline_actor.cpp | 17 +- src/timeline/src/track.cpp | 2 +- src/timeline/src/track_actor.cpp | 4 +- src/ui/base/src/font.cpp | 12 +- src/ui/base/src/keyboard.cpp | 77 +- src/ui/base/src/tessellation_helpers.cpp | 14 +- src/ui/canvas/src/canvas.cpp | 2 +- src/ui/canvas/src/caption.cpp | 8 +- src/ui/canvas/src/shapes.cpp | 6 +- src/ui/canvas/src/stroke.cpp | 114 +- src/ui/model_data/src/model_data_actor.cpp | 35 +- .../src/opengl_multi_buffered_texture.cpp | 4 +- .../opengl/src/opengl_offscreen_shaders.glsl | 115 + src/ui/opengl/src/opengl_shape_renderer.cpp | 33 +- src/ui/opengl/src/opengl_stroke_renderer.cpp | 319 +- src/ui/opengl/src/opengl_stroke_shaders.glsl | 146 +- src/ui/opengl/src/opengl_text_rendering.cpp | 4 +- src/ui/opengl/src/opengl_texture_base.cpp | 4 +- .../opengl/src/opengl_viewport_renderer.cpp | 47 +- src/ui/opengl/src/shader_program_base.cpp | 32 +- src/ui/qml/.clang-tidy | 1 - src/ui/qml/bookmark/src/bookmark_model_ui.cpp | 6 +- src/ui/qml/conform/src/conform_ui.cpp | 32 +- .../src/global_store_model_ui.cpp | 6 +- src/ui/qml/helper/src/CMakeLists.txt | 4 +- .../qml/helper/src/QTreeModelToTableModel.cpp | 38 +- src/ui/qml/helper/src/helper_ui.cpp | 126 +- src/ui/qml/helper/src/json_tree_model_ui.cpp | 23 +- src/ui/qml/helper/src/model_data_ui.cpp | 29 +- src/ui/qml/helper/src/model_helper_ui.cpp | 6 +- src/ui/qml/helper/src/module_data_ui.cpp | 4 +- .../qml/helper/src/thumbnail_provider_ui.cpp | 9 +- src/ui/qml/log/src/log_ui.cpp | 2 +- src/ui/qml/session/src/caf_response_ui.cpp | 9 +- .../qml/session/src/session_model_core_ui.cpp | 8 +- .../session/src/session_model_handler_ui.cpp | 5 +- .../session/src/session_model_manip_ui.cpp | 8 +- .../session/src/session_model_methods_ui.cpp | 41 +- .../session/src/session_model_timeline_ui.cpp | 83 +- src/ui/qml/session/src/session_model_ui.cpp | 34 +- src/ui/qml/studio/src/studio_ui.cpp | 16 +- src/ui/qml/viewport/src/hotkey_ui.cpp | 564 ++- src/ui/qml/viewport/src/qml_viewport.cpp | 7 +- .../viewport/src/qml_viewport_renderer.cpp | 10 +- src/ui/qt/.clang-tidy | 3 - .../src/offscreen_viewport.cpp | 38 +- .../viewport_widget/src/viewport_widget.cpp | 1 + src/ui/viewport/src/fps_monitor.hpp | 64 +- src/ui/viewport/src/keypress_monitor.cpp | 236 +- src/ui/viewport/src/viewport.cpp | 52 +- .../src/viewport_frame_queue_actor.cpp | 14 +- .../viewport/src/viewport_layout_plugin.cpp | 2 +- src/utility/src/CMakeLists.txt | 13 +- src/utility/src/file_system_item.cpp | 8 +- src/utility/src/helpers.cpp | 147 +- src/utility/src/json_store.cpp | 9 + src/utility/src/media_reference.cpp | 102 +- src/utility/src/path_remapper.cpp | 102 + src/utility/src/sequence.cpp | 2 +- src/utility/src/timecode.cpp | 12 +- .../xstudio/application/XsSessionWindow.qml | 14 +- .../application/auxillary/XsConformTool.qml | 3 + .../dialogs/hotkeys/XsHotkeySetterDialog.qml | 259 ++ .../dialogs/hotkeys/XsHotkeysDialog.qml | 171 +- .../hotkeys/delegates/XsHotkeyDetails.qml | 165 +- .../hotkeys/delegates/XsHotkeyGroup.qml | 71 + .../hotkeys/delegates/XsHotkeySequence.qml | 77 + .../application/panels/media/XsMediaPanel.qml | 24 - .../media/delegates/XsMediaThumbnailImage.qml | 1 - .../media/functions/XsMediaListFunctions.qml | 264 +- .../panels/media/widgets/XsMediaHotKeys.qml | 266 +- .../media/widgets/XsMediaListContextMenu.qml | 327 +- .../media/widgets/XsMediaListPlusMenu.qml | 112 +- .../media/widgets/XsMediaListRemoveMenu.qml | 6 +- .../application/panels/notes/XsNotesView.qml | 2 +- .../panels/playlists/XsPlaylists.qml | 17 + .../XsPlaylistItemDragDropHandler.qml | 6 +- .../functions/XsPlaylistFunctions.qml | 152 + .../playlists/menus/XsPlaylistContextMenu.qml | 70 +- .../playlists/menus/XsPlaylistPlusMenu.qml | 101 +- .../playlists/widgets/XsPlaylistHotKeys.qml | 160 + .../panels/timeline/XsTimeline.qml | 165 +- .../panels/timeline/menus/XsNewTrackMenu.qml | 4 +- .../timeline/menus/XsTimelineClipMenu.qml | 3 +- .../timeline/menus/XsTimelineTrackMenu.qml | 30 +- .../viewport/widgets/XsViewerContextMenu.qml | 4 +- .../toolbar/XsViewerToolbarButtonBase.qml | 2 +- ui/qml/xstudio/assets/icons/account_tree.svg | 1 + ui/qml/xstudio/assets/icons/double_arrow.svg | 1 + ui/qml/xstudio/assets/icons/folder.svg | 1 + ui/qml/xstudio/assets/icons/folder_open.svg | 1 + ui/qml/xstudio/assets/icons/history.svg | 1 + ui/qml/xstudio/assets/icons/home.svg | 1 + ui/qml/xstudio/assets/icons/image.svg | 1 + ui/qml/xstudio/assets/icons/info.svg | 1 + ui/qml/xstudio/assets/icons/keep.svg | 1 + ui/qml/xstudio/assets/icons/list_group.svg | 54 + ui/qml/xstudio/assets/icons/refresh.svg | 1 + ui/qml/xstudio/assets/icons/scanner.svg | 1 + ui/qml/xstudio/dialogs/XsDialogHelpers.qml | 3 +- ui/qml/xstudio/menus/XsMenuDivider.qml | 10 +- ui/qml/xstudio/qml.qrc | 29 +- .../widgets/buttons/XsSimpleButton.qml | 7 +- ui/qml/xstudio/widgets/indicators/XsImage.qml | 4 +- .../widgets/indicators/XsTabButton.qml | 50 + ui/qml/xstudio/widgets/layout/XsTabBar.qml | 10 + ui/qml/xstudio/xStudio/qmldir | 3 + vcpkg.json | 2 +- 788 files changed, 40337 insertions(+), 42992 deletions(-) delete mode 100644 docs/Doxyfile create mode 100644 docs/_static/file-browser-01.webm delete mode 100644 docs/conf.py create mode 100644 docs/user_docs/images/file-system-browser-1.png create mode 100644 docs/user_docs/images/file-system-browser-group.png create mode 100644 docs/user_docs/images/file-system-browser-list.png create mode 100644 docs/user_docs/images/file-system-browser-thumbs.png create mode 100644 docs/user_docs/images/file-system-browser-tree.png create mode 100644 docs/user_docs/images/shortcuts-02.png create mode 100644 docs/user_docs/interface/file_system_browser.rst delete mode 100644 extern/cpp-colors/.travis.yml delete mode 100644 extern/cpp-colors/CMakeLists.txt delete mode 100644 extern/cpp-colors/LICENSE delete mode 100644 extern/cpp-colors/README.md delete mode 100644 extern/cpp-colors/clean-all.cmake delete mode 100644 extern/cpp-colors/examples/CMakeLists.txt delete mode 100644 extern/cpp-colors/examples/color-conversion.cpp delete mode 100644 extern/cpp-colors/include/cpp-colors/color.h delete mode 100644 extern/cpp-colors/include/cpp-colors/color_error.h delete mode 100644 extern/cpp-colors/include/cpp-colors/color_io.h delete mode 100644 extern/cpp-colors/include/cpp-colors/color_named.h delete mode 100644 extern/cpp-colors/include/cpp-colors/color_utils.h delete mode 100644 extern/cpp-colors/include/cpp-colors/colors.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/colors_impl.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/constants_impl.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/dotnet/dotnet_colors.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/dotnet/dotnet_constants.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/dotnet/dotnet_named.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/named_impl.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/named_utils.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/wpf/wpf_colors.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/wpf/wpf_constants.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/wpf/wpf_named.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/x11/x11_colors.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/x11/x11_constants.h delete mode 100644 extern/cpp-colors/include/cpp-colors/impl/x11/x11_named.h delete mode 100644 extern/cpp-colors/include/cpp-colors/pixel_format.h delete mode 100644 extern/cpp-colors/include/cpp-colors/pixel_utils.h delete mode 100644 extern/cpp-colors/test/CMakeLists.txt delete mode 100644 extern/cpp-colors/test/run_tests.cpp delete mode 100644 extern/cpp-colors/test/suites/test_color.cpp create mode 100644 include/xstudio/ui/viewport/mask.hpp create mode 100644 include/xstudio/utility/colours.hpp create mode 100644 include/xstudio/utility/path_remapper.hpp create mode 100644 python/src/xstudio/plugin/mask_plugin.py mode change 100644 => 100755 python/src/xstudio/testbed/client.py mode change 100644 => 100755 python/src/xstudio/testbed/server.py mode change 100644 => 100755 python/src/xstudio/testbed/session.py mode change 100644 => 100755 python/src/xstudiopy mode change 100644 => 100755 scripts/linting/run_clang_format delete mode 100644 share/docs/.doctrees/reference/build_guides/developer_tips.doctree create mode 100644 share/docs/.doctrees/user_docs/interface/file_system_browser.doctree create mode 100644 share/docs/_downloads/320813cbeeb16ba523e52d06672cf078/CMakePresets.json create mode 100644 share/docs/_images/file-system-browser-1.png create mode 100644 share/docs/_images/file-system-browser-group.png create mode 100644 share/docs/_images/file-system-browser-list.png create mode 100644 share/docs/_images/file-system-browser-thumbs.png create mode 100644 share/docs/_images/file-system-browser-tree.png create mode 100644 share/docs/_images/shortcuts-02.png delete mode 100644 share/docs/_sources/reference/build_guides/developer_tips.md.txt create mode 100644 share/docs/_sources/user_docs/interface/file_system_browser.rst.txt create mode 100644 share/docs/_static/file-browser-01.webm delete mode 100644 share/docs/reference/build_guides/developer_tips.html create mode 100644 share/docs/user_docs/interface/file_system_browser.html create mode 100644 share/preference/ui_keyboard.json create mode 100644 src/plugin/python_plugins/basic_viewport_mask/__init__.py create mode 100755 src/plugin/python_plugins/basic_viewport_mask/basic_viewport_mask.py create mode 100644 src/plugin/python_plugins/filesystem_browser/ffmpeg_thumbnails.py rename src/plugin/python_plugins/filesystem_browser/qml/{FilesystemBrowser.1 => FilesystemBrowserGeneric.1}/DirectoryTree.qml (99%) rename src/plugin/python_plugins/filesystem_browser/qml/{FilesystemBrowser.1 => FilesystemBrowserGeneric.1}/FilesystemBrowser.qml (99%) rename src/plugin/python_plugins/filesystem_browser/qml/{FilesystemBrowser.1 => FilesystemBrowserGeneric.1}/XsFileSystemStyle.qml (96%) rename src/plugin/python_plugins/filesystem_browser/qml/{FilesystemBrowser.1 => FilesystemBrowserGeneric.1}/icons/folder_closed.svg (100%) rename src/plugin/python_plugins/filesystem_browser/qml/{FilesystemBrowser.1 => FilesystemBrowserGeneric.1}/qmldir (100%) create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/FilesystemBrowser.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/icons/folder_closed.svg create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/icons/refresh.svg create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/qmldir create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSDirectoryTree.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSDirectoryTreeBody.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSFileContextMenu.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSListHeader.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSListHeaderColumn.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSListItem.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSListView.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSMainHeader.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSPathInput.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSThumbFolderHeader.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSThumbItem.qml create mode 100644 src/plugin/python_plugins/filesystem_browser/qml/FilesystemBrowserXStudio.1/styled_widgets/FSThumbView.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/XsBlendModeToggle.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/XsBurnToolProperties.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/XsDodgeToolProperties.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/XsToolAttrControl.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/XsToolColourPicker.qml create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/icons/burn.svg create mode 100644 src/plugin/viewport_overlay/annotations/src/qml/AnnotationsUI.2/icons/dodge.svg create mode 100644 src/plugin/viewport_overlay/annotations/src/serialisers/4.0/serialiser_4_pt_0.cpp delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/CMakeLists.txt delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/basic_viewport_masking.cpp delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/basic_viewport_masking.hpp delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/qml/.clang-tidy delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/qml/BasicViewportMask.1/BasicViewportMaskOverlay.qml delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/qml/BasicViewportMask.1/check.svg delete mode 100644 src/plugin/viewport_overlay/basic_viewport_mask/src/qml/BasicViewportMask.1/qmldir create mode 100644 src/plugin/viewport_overlay/mask_renderer/src/CMakeLists.txt create mode 100644 src/plugin/viewport_overlay/mask_renderer/src/mask_renderer.cpp create mode 100644 src/plugin/viewport_overlay/mask_renderer/src/mask_renderer.hpp rename src/plugin/viewport_overlay/{basic_viewport_mask => mask_renderer}/test/CMakeLists.txt (100%) create mode 100644 src/ui/opengl/src/opengl_offscreen_shaders.glsl create mode 100644 src/utility/src/path_remapper.cpp create mode 100644 ui/qml/xstudio/application/dialogs/hotkeys/XsHotkeySetterDialog.qml create mode 100644 ui/qml/xstudio/application/dialogs/hotkeys/delegates/XsHotkeyGroup.qml create mode 100644 ui/qml/xstudio/application/dialogs/hotkeys/delegates/XsHotkeySequence.qml create mode 100644 ui/qml/xstudio/application/panels/playlists/functions/XsPlaylistFunctions.qml create mode 100644 ui/qml/xstudio/application/panels/playlists/widgets/XsPlaylistHotKeys.qml create mode 100644 ui/qml/xstudio/assets/icons/account_tree.svg create mode 100644 ui/qml/xstudio/assets/icons/double_arrow.svg create mode 100644 ui/qml/xstudio/assets/icons/folder.svg create mode 100644 ui/qml/xstudio/assets/icons/folder_open.svg create mode 100644 ui/qml/xstudio/assets/icons/history.svg create mode 100644 ui/qml/xstudio/assets/icons/home.svg create mode 100644 ui/qml/xstudio/assets/icons/image.svg create mode 100644 ui/qml/xstudio/assets/icons/info.svg create mode 100644 ui/qml/xstudio/assets/icons/keep.svg create mode 100755 ui/qml/xstudio/assets/icons/list_group.svg create mode 100644 ui/qml/xstudio/assets/icons/refresh.svg create mode 100644 ui/qml/xstudio/assets/icons/scanner.svg create mode 100644 ui/qml/xstudio/widgets/indicators/XsTabButton.qml create mode 100644 ui/qml/xstudio/widgets/layout/XsTabBar.qml diff --git a/.clang-tidy b/.clang-tidy index d5d189503..b2bd62708 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,8 +1,8 @@ --- -Checks: '-*,modernize-*,-modernize-use-trailing-return-type,-modernize-use-using,clang-diagnostic-gnu-include-next,readability-identifier-naming*' +Checks: '-*,modernize-*,-modernize-use-trailing-return-type,-modernize-use-using,clang-diagnostic-gnu-include-next,-clang-diagnostic-unused-command-line-argument' WarningsAsErrors: '' HeaderFilterRegex: '/xstudio/include/.*' -AnalyzeTemporaryDtors: false +ExcludeHeaderFilterRegex: '/opt/.*' FormatStyle: none User: al CheckOptions: @@ -34,5 +34,3 @@ CheckOptions: value: "_" ... - - diff --git a/.gitignore b/.gitignore index f906b7286..0a54a6345 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ __*__ ignore/ *.egg-info/ python/test/xstudio.log +docs/Doxyfile docs/conf.py python/src/xstudio/version.py .vs/ @@ -17,4 +18,6 @@ xstudio_install/ CMakeUserPresets.json __build __build_debug +build_rel/ +build_dbg/ aqtinstall.log diff --git a/CMakeLists.txt b/CMakeLists.txt index c4b0530cb..10fa0f481 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(VERSION 3.26) #cmake_minimum_required(VERSION 3.28 FATAL_ERROR) #cmake_policy(VERSION 3.28) -set(XSTUDIO_GLOBAL_VERSION "1.2.0" CACHE STRING "Version string") +set(XSTUDIO_GLOBAL_VERSION "1.3.0" CACHE STRING "Version string") set(XSTUDIO_GLOBAL_NAME xStudio) # set(CMAKE_OSX_DEPLOYMENT_TARGET "14.5" CACHE STRING "Minimum OS X deployment version" FORCE) @@ -170,7 +170,7 @@ if(ENABLE_CLANG_TIDY) set(CMAKE_EXPORT_COMPILE_COMMANDS "ON") add_custom_target( clang-tidy - COMMAND ${CLANG_TIDY_COMMAND} -quiet -extra-arg=-I${CLANG_PATH}/lib/clang/11.1.0/include + COMMAND ${CLANG_TIDY_COMMAND} -use-color -quiet -extra-arg="-std=c++17 -I${CLANG_PATH}/lib/clang/20/include" USES_TERMINAL ) endif() @@ -216,11 +216,11 @@ if (USE_VCPKG) message(FATAL_ERROR "Failed to ensurepip.") else() execute_process( - COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy fileseq + COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy pyyaml fileseq RESULT_VARIABLE PIP_RESULT ) if(PIP_RESULT) - message(FATAL_ERROR "Failed to install Sphinx using pip.") + message(FATAL_ERROR "Failed to install python dependencies using pip.") endif() endif() @@ -316,10 +316,14 @@ if (WIN32) include(InstallRequiredSystemLibraries) - set(CPACK_PACKAGE_VERSION "1.2.0") - set(CPACK_PACKAGE_VERSION_MAJOR "2") - set(CPACK_PACKAGE_VERSION_MINOR "1") - set(CPACK_PACKAGE_VERSION_PATCH "0") + set(CPACK_PACKAGE_VERSION ${XSTUDIO_GLOBAL_VERSION}) + + string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSION_MATCH ${XSTUDIO_GLOBAL_VERSION}) + + set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) + set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2}) + set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3}) + set(CPACK_PACKAGE_VENDOR "DNEG / Academy Software Foundation") set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/ui/icons\\\\xstudio_app.ico") diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index abf17e681..b08519844 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,4 +24,8 @@ There are two contribution agreement types, one for individuals contributing ind ## Coding Conventions -Please follow the coding style accross the various file types in the project as best you can. While we have strived to maintain a consistent formatting to the code you may find there are differing styles thanks to the various authors and their natural preferences. We suggest you do your best to follow what's already there but we will not impose a strict style on new code in PRs. We do periodically run clang auto formatting across the C++ components of the codebase. Clang formatting rules are defined in the .clang-tidy and .clang-format files in the root. \ No newline at end of file +Please follow the coding style accross the various file types in the project as best you can. While we have strived to maintain a consistent formatting to the code you may find there are differing styles thanks to the various authors and their natural preferences. We suggest you do your best to follow what's already there but we will not impose a strict style on new code in PRs. We do periodically run clang auto formatting across the C++ components of the codebase. Clang formatting rules are defined in the .clang-tidy and .clang-format files in the root. + +## Git Workflow + +Please only submit pull requests on the 'develop' branch. The 'main' branch is reserved for updates from the 'develop' branch only. diff --git a/README.md b/README.md index aaa778ebf..fa8935191 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Welcome to xSTUDIO - v1.2.0 +# Welcome to xSTUDIO - v1.3.0 xSTUDIO is a media playback and review application designed for professionals working in the film and TV post production industries, particularly the Visual Effects and Feature Animation sectors. xSTUDIO is focused on providing an intuitive, easy to use interface with a high performance playback engine at its core and C++ and Python APIs for pipeline integration and customisation for total flexibility. -This codebase will build version 1.2.0 of xSTUDIO. +This codebase will build version 1.3.0 of xSTUDIO. ## Building xSTUDIO diff --git a/cmake/macros.cmake b/cmake/macros.cmake index e3cd1bafa..6afad909d 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -1,26 +1,20 @@ macro(default_compile_options name) target_compile_options(${name} # PRIVATE -fvisibility=hidden + PRIVATE $<$,$>:-Wextra> + PRIVATE $<$,$>:-Wno-unused-function> + PRIVATE $<$,$>:-Wpedantic> + PRIVATE $<$,$>:/wd4100> PRIVATE $<$,$>:-fno-omit-frame-pointer> PRIVATE $<$,$>:/Oy> PRIVATE $<$:-Wno-deprecated> - PRIVATE $<$:-Wno-deprecated> - # PRIVATE $<$:-Wno-deprecated-declarations> - # PRIVATE $<$:-Wno-unused-variable> - # PRIVATE $<$:-Wno-unused-but-set-variable> - # PRIVATE $<$:-Wno-unused-parameter> - PRIVATE $<$,$>:-Wno-unused-function> - PRIVATE $<$,$>:-Wextra> - PRIVATE $<$,$>:-Wextra> + PRIVATE $<$:-Wextra> + PRIVATE $<$:-Wall> + PRIVATE $<$:-Wno-unused-parameter> + PRIVATE $<$:-Werror> PRIVATE $<$:-Wfatal-errors> # Stop after first error - PRIVATE $<$,$>:-Wpedantic> - PRIVATE $<$,$>:/wd4100> + PRIVATE $<$:-Wno-deprecated> PRIVATE $<$:/bigobj> - # PRIVATE $<$:-Wall> - # PRIVATE $<$:-Werror> - # PRIVATE $<$:-Wextra> - # PRIVATE $<$:-Wpedantic> - # PRIVATE ${GTEST_CFLAGS} ) target_compile_features(${name} @@ -582,6 +576,7 @@ macro(create_test PATH DEPS) default_options_gtest(${NAME}) target_link_libraries(${NAME} PRIVATE + xstudio::global "${DEPS}" ${GTEST_LDFLAGS} ) diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch index 4a8d49954..37ff571a7 100644 --- a/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch +++ b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch @@ -3,10 +3,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,7 +245,7 @@ endif() - + # set up the internally hosted dependencies -add_subdirectory(src/deps) +# add_subdirectory(src/deps) - + set (OTIO_IMATH_TARGETS # For OpenEXR/Imath 3.x: diff --git a/docs/Doxyfile b/docs/Doxyfile deleted file mode 100644 index 9f6260794..000000000 --- a/docs/Doxyfile +++ /dev/null @@ -1,2305 +0,0 @@ -# Doxyfile 1.8.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "xStudio" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = "1.2.0" - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = "_build/doxygen" - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = NO - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = NO - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = "_build/doxygen/log.txt - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = "../include/" \ - "../src/" \ - "../python/src/" - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /