Skip to content

Commit f4c290e

Browse files
committed
Some useful feature extensions for Python API
Signed-off-by: Ted Waine <[email protected]>
1 parent c286ae0 commit f4c290e

File tree

49 files changed

+876
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+876
-116
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ if (USE_VCPKG)
197197
message(FATAL_ERROR "Failed to ensurepip.")
198198
else()
199199
execute_process(
200-
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO OpenTimelineIO-Plugins importlib_metadata zipp
200+
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp
201201
RESULT_VARIABLE PIP_RESULT
202202
)
203203
if(PIP_RESULT)

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"binaryDir": "${sourceDir}/build",
88
"cacheVariables": {
99
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake",
10-
"Qt6_DIR": "C:/Qt6/6.5.3/msvc2019_64/lib/cmake/Qt6",
10+
"Qt6_DIR": "/Users/tedwaine/Qt6/6.5.3/macos/lib/cmake/Qt6",
1111
"CMAKE_INSTALL_PREFIX": "xstudio_install",
1212
"X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON",
1313
"BUILD_DOCS": "OFF",

docs/python_api/core.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ Uuid
101101
:members:
102102
:undoc-members:
103103

104-
UuidVec
105-
=======
106-
.. autoclass:: xstudio.core.__pybind_xstudio.UuidVec
107-
:members:
108-
:undoc-members:
109-
110104
absolute_receive_timeout
111105
========================
112106
.. autoclass:: xstudio.core.__pybind_xstudio.absolute_receive_timeout

docs/python_api/sync.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/user_docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ xSTUDIO User Guide
88
IMPORANT: These docs are out of date and refer to the v0.X release series of xSTUDIO.
99
Updated documentation for v1.X is work-in-progress and will be available August 2025.
1010

11+
12+
1113
.. image:: ./images/xstudio-logo.png
1214
:scale: 80 %
1315
:align: center
1416

17+
18+
1519
.. note::
1620
The screenshots included in this user guide show visual content from the 'Meridian' title, part of the `Netflix Open Content <https://opencontent.netflix.com/>`_ media data set.
1721

extern/otio/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ set(OTIO_INSTALL_PYTHON_MODULES ON)
44
set(OTIO_INSTALL_COMMANDLINE_TOOLS OFF)
55
set(OTIO_FIND_IMATH ON)
66
set(OTIO_PYTHON_INSTALL_DIR python)
7-
set(CMAKE_INSTALL_PREFIX "bin/python")
7+
8+
if (APPLE)
9+
#install directly into VCPKG pythin installation. This gets copied into xSTUDIO.app installation
10+
set(CMAKE_INSTALL_PREFIX "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${PYTHONVP}/site-packages")
11+
else()
12+
set(CMAKE_INSTALL_PREFIX "bin/python")
13+
endif()
814

915
# Build options
10-
set(OTIO_SHARED_LIBS OFF)
16+
set(OTIO_SHARED_LIBS ON)
1117
set(OTIO_AUTOMATIC_SUBMODULES ON)
1218

1319
find_package(Python COMPONENTS Interpreter Development)

include/xstudio/atoms.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_plugin_atoms, FIRST_CUSTOM_ID + (200 * 3))
558558
CAF_ADD_ATOM(xstudio_plugin_atoms, xstudio::conform, conform_tasks_atom)
559559
CAF_ADD_ATOM(xstudio_plugin_atoms, xstudio::media_hook, get_clip_hook_atom)
560560

561+
CAF_ADD_ATOM(xstudio_plugin_atoms, xstudio::plugin, plugin_events_group_atom)
562+
561563
CAF_END_TYPE_ID_BLOCK(xstudio_plugin_atoms)
562564

563565

@@ -862,6 +864,9 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_ui_atoms, FIRST_CUSTOM_ID + (200 * 6))
862864

863865
CAF_ADD_ATOM(xstudio_ui_atoms, xstudio::ui, set_clipboard_atom)
864866

867+
CAF_ADD_ATOM(xstudio_ui_atoms, xstudio::ui::viewport, annotation_atom)
868+
869+
865870
CAF_END_TYPE_ID_BLOCK(xstudio_ui_atoms)
866871

867872
// clang-format on

include/xstudio/plugin_manager/plugin_base.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ namespace plugin {
206206

207207
void remove_bookmark(const utility::Uuid &bookmark_id);
208208

209+
/* Get the (unique) name of the current, active viewport in xSTUDIO's
210+
main UI window. */
211+
std::string active_viewport_name() const;
212+
209213
/* set playback state for playhead attached to the named viewport */
210214
void start_stop_playback(const std::string viewport_name, bool play);
211215

@@ -228,6 +232,10 @@ namespace plugin {
228232
on_playhead_playing_changed callbacks. */
229233
void listen_to_playhead_events(const bool listen = true);
230234

235+
/* Access the plugin events group to broadcast events to other entities
236+
that may want to interact with the plugin*/
237+
caf::actor & plugin_events_group() { return plugin_events_; }
238+
231239
private:
232240
// re-implement to receive callback when the on-screen media changes. To
233241
void on_screen_media_changed(caf::actor media) override;
@@ -247,6 +255,7 @@ namespace plugin {
247255
caf::actor_addr playhead_media_events_group_;
248256
caf::actor bookmark_manager_;
249257
caf::actor playhead_events_actor_;
258+
caf::actor plugin_events_;
250259
bool joined_playhead_events_ = {false};
251260
std::map<std::string, utility::Uuid> last_source_uuid_;
252261

include/xstudio/timeline/item.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ namespace timeline {
301301
}
302302

303303
void resolve_and_request_clip_frames(
304+
const timebase::flicks timeline_start,
304305
caf::actor &helper,
305306
std::vector<bool> &filled_frames,
306307
const timebase::flicks ref_time,

include/xstudio/ui/canvas/canvas.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace ui {
121121
float softness,
122122
float opacity);
123123
void start_erase_stroke(float thickness);
124-
void update_stroke(const Imath::V2f &pt);
124+
void update_stroke(const Imath::V2f &pt, const float size = -1.0f);
125125
// Delete the strokes when reaching 0 opacity.
126126
bool fade_all_strokes(float opacity);
127127

0 commit comments

Comments
 (0)