Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def media_item_hud_data(self, media_item = None):
# display_info is an array of values corresponding to the columns
# of the Media List Panel in the xSTUDIO UI (the columns are fully
# user-configurable, by the way)
return media_item.display_info[idx]
return media_item.display_info[idx] \
if idx < len(media_item.display_info) \
else ""
else:
return ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ RowLayout {
spacing: 1
property var completionList: []

function getCommonPrefix(strings) {
if (!strings || strings.length === 0) return "";
var prefix = strings[0];
for (var i = 1; i < strings.length; i++) {
while (strings[i].indexOf(prefix) !== 0) {
prefix = prefix.substring(0, prefix.length - 1);
if (prefix === "") return "";
}
}
return prefix;
}

XsPrimaryButton {

Layout.preferredHeight: XsStyleSheet.primaryButtonStdHeight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ void MediaMetadataRenderer::render_image_overlay(
const auto viewport_width = (float)gl_viewport[2];
const auto viewport_height = (float)gl_viewport[3];

// don't render if the viewport is small (ie. for thumbnails)
if (viewport_width < 300.0f)
return;

if (display_settings_ != data->display_settings_) {

display_settings_ = data->display_settings_;
Expand Down
8 changes: 8 additions & 0 deletions src/plugin_manager/src/plugin_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ StandardPlugin::StandardPlugin(
if (p != watched_attr_event_handlers_.end()) {
p->second(attr_id, role_id, role_data);
}
},
[=](utility::event_atom,
utility::name_atom,
const std::string &name) {
},
[=](utility::event_atom,
utility::last_changed_atom,
const utility::time_point &last_change) {
}};
}

Expand Down
1 change: 1 addition & 0 deletions src/python_module/src/py_register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ void register_bookmark_detail_class(py::module &m, const std::string &name) {
.def_readwrite("author", &bookmark::BookmarkDetail::author_)
.def_readwrite("owner", &bookmark::BookmarkDetail::owner_)
.def_readwrite("note", &bookmark::BookmarkDetail::note_)
.def_readwrite("subject", &bookmark::BookmarkDetail::subject_)
.def_readwrite("created", &bookmark::BookmarkDetail::created_)
.def_readonly("has_note", &bookmark::BookmarkDetail::has_note_)
.def_readonly("has_annotation", &bookmark::BookmarkDetail::has_annotation_);
Expand Down
18 changes: 15 additions & 3 deletions src/ui/base/src/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,25 @@ std::string Hotkey::hotkey_sequence() const {
r = "Shift+" + r;
}
if ((modifiers_ & MetaModifier) == MetaModifier) {
#ifdef __apple__
r = "Ctrl+" + r;
#else
r = "Meta+" + r;
#endif
}
if ((modifiers_ & AltModifier) == AltModifier) {
#ifdef __apple__
r = "Opt+" + r;
#else
r = "Alt+" + r;
#endif
}
if ((modifiers_ & ControlModifier) == ControlModifier) {
#ifdef __apple__
r = "Cmd+" + r;
#else
r = "Ctrl+" + r;
#endif
}
return r;
}
Expand Down Expand Up @@ -269,7 +281,7 @@ void Hotkey::sequence_to_key_and_modifier(
}
}
}
if (keycode == -1) {
if (keycode == -1 and not modifier) {
throw std::runtime_error(
fmt::format("Unable to identify key name in hotkey sequence '{}'", sequence)
.c_str());
Expand Down Expand Up @@ -306,7 +318,7 @@ void Hotkey::sequence_to_key_and_modifier(
}
}
}
if (keycode == -1) {
if (keycode == -1 and not modifier) {
std::string ss;
for (const auto &s : seq) {
if (!ss.empty()) {
Expand All @@ -315,6 +327,6 @@ void Hotkey::sequence_to_key_and_modifier(
ss += s;
}
throw std::runtime_error(
fmt::format("Unable to identify key name in hotkey sequence \"{}\"", ss).c_str());
fmt::format("Unable to identify key name in hotkey sequence '{}'", ss).c_str());
}
}
2 changes: 1 addition & 1 deletion src/ui/qml/session/src/session_model_methods_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ QFuture<QList<QUuid>> SessionModel::handleOtherDropFuture(
*sys,
session_actor_,
session::add_playlist_atom_v,
"Drag Drop",
StdFromQString(getNextName("Drag Drop {}")),
Uuid(),
false);
target = uua.second.actor();
Expand Down
3 changes: 1 addition & 2 deletions src/ui/qml/viewport/src/hotkey_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ void HotkeysUI::makeFilteredHotkeysData() {
other_hk.uuid() != hk.uuid()) {
clash_warning = fmt::format(
"clashes with hotkey '{}'",
other_hk.hotkey_name(),
other_hk.hotkey_sequence());
other_hk.hotkey_name());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utility/src/chrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ xstudio::utility::to_sys_time_point(const std::string &datetime) {
#ifdef _WIN32
// TODO: Ahead to fix
#else
in >> date::parse("%Y-%m-%dT%TZ", tp);
date::from_stream(in, "%Y-%m-%dT%TZ", tp);
#endif
return tp;
}
3 changes: 2 additions & 1 deletion ui/qml/xstudio/application/XsSessionWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ ApplicationWindow {
}
}
function setLayoutName(name) {
var idx = ui_layouts_model.searchRecursive(name, "layout_name", ui_layouts_model.root_index)

var idx = ui_layouts_model.searchRecursive(name || "Review", "layout_name", ui_layouts_model.root_index)
if (idx.valid) {
layoutBar.selected_layout = idx.row
} else if (layoutBar.current_layout_index.row > 0) {
Expand Down
24 changes: 9 additions & 15 deletions ui/qml/xstudio/application/auxillary/XsConformTool.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,18 @@ Item{

function compareSelection(task, selection) {
for(let i=0; i< selection.length; i++) {
let pl_index = selection[i].model.getContainerIndex(selection[i])
Future.promise(
engine.conformItemsFuture(task,
selection[i].model.getContainerIndex(selection[i]),
selection[i], true, false)
engine.conformItemsFuture(task, pl_index, selection[i], true, false)
).then(
function(media_uuid_list) {
// create new selection.
// console.log(media_uuid_list)

let tmp = []
for(let i=0;i<selection.length;i++)
tmp.push(selection[i].model.get(selection[i], "actorUuidRole"))

for(let i=0;i<media_uuid_list.length;i++)
tmp.push(helpers.QVariantFromUuidString(media_uuid_list[i]))

mediaSelectionModel.selectNewMedia(selection[i].model.getContainerIndex(selection[i]), tmp)
// Select original item and results of the conform
// so that their selection order keeps them together
let tmp = [selection[i].model.get(selection[i], "actorUuidRole")]
for(let j=0;j<media_uuid_list.length;j++)
tmp.push(helpers.QVariantFromUuidString(media_uuid_list[j]))

mediaSelectionModel.selectNewMedia(pl_index, tmp, -1, ItemSelectionModel.Select)
},
function() {
}
Expand Down Expand Up @@ -441,7 +435,7 @@ Item{
menuPath: "More"
menuItemPosition: 1
menuModelName: "media_list_menu_"
onActivated: (menuContext) => conformToSequence(menuContext.mediaSelection, viewportCurrentMediaContainerIndex)
onActivated: (menuContext) => conformToSequence(menuContext.mediaSelection, viewportCurrentMediaContainerIndex, "Conformed Media")
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ RowLayout {
property var borderSize: 4
property var unbound: JSON.stringify(regularKeys) === JSON.stringify([""])

function platformLabel(modifier) {
if (Qt.platform.os === "osx") {
if (modifier == "Control")
return "Command"
else if (modifier == "Meta")
return "Control"
else if (modifier == "Alt")
return "Option"
else
return modifier
}
return modifier
}

Rectangle {
Layout.preferredWidth: textField.width + borderSize*2
Layout.preferredHeight: textField.height + borderSize*2
Expand Down Expand Up @@ -55,7 +69,7 @@ RowLayout {
XsText {
id: textField
anchors.centerIn: parent
text: modelData
text: platformLabel(modelData)
font.family: XsStyleSheet.fixedWidthFontFamily
font.bold: true
font.pixelSize: fontSize
Expand Down
2 changes: 1 addition & 1 deletion ui/qml/xstudio/application/panels/log/XsLogPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Item{
MouseArea{
anchors.fill: parent
z: 1
onClicked: {
onClicked: (mouse)=> {
if (mouse.button == Qt.LeftButton) {
if (mouse.modifiers & Qt.ShiftModifier) {
if(index < startSelection) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import xstudio.qml.clipboard 1.0
import xStudio 1.0

Item {
XsPreference {
id: sessionLinkPrefix
path: "/core/session/session_link_prefix"
}

XsPreference {
id: sessionRate
path: "/core/session/media_rate"
Expand Down Expand Up @@ -107,6 +112,15 @@ Item {
filenames.join(prefix)
}

function copyColumnToClipboard(column) {
let data = []
for( let i=0;i<mediaSelectionModel.selectedIndexes.length; i++) {
var fields = theSessionData.get(mediaSelectionModel.selectedIndexes[i], "mediaDisplayInfoRole")
data.push(fields[column])
}
clipboard.text = data.join("\n")
}

function setMediaAspect() {
let mi = mediaSelectionModel.selectedIndexes[0]
let ms = theSessionData.searchRecursive(theSessionData.get(mi, "imageActorUuidRole"), "actorUuidRole", mi)
Expand Down Expand Up @@ -363,13 +377,16 @@ Item {
for(let i =0; i<indexes.length; ++i)
to_remove.push(indexes[i].row)

to_remove = to_remove.sort(function(a,b){return a-b})
to_remove = to_remove.sort(function(a,b){return b-a})

while(select_row == -1 && to_remove.length) {
select_row = to_remove[0] - 1
select_row = to_remove[0] + 1
to_remove.shift()
}

if (select_row == indexes.length)
select_row = -1

return parent.model.index(select_row, 0, parent)
}

Expand Down Expand Up @@ -452,7 +469,7 @@ Item {
last_row = Math.max(mediaSelectionModel.selectedIndexes[i].row, last_row)
}
let parent = mediaSelectionModel.selectedIndexes[0].parent;
if (last_row > 0 && parent.model.rowCount(parent) > (last_row+1)) {
if (last_row >= 0 && parent.model.rowCount(parent) > (last_row+1)) {
mediaSelectionModel.select(
parent.model.index(last_row+1, 0, parent),
ItemSelectionModel.Select
Expand Down
14 changes: 14 additions & 0 deletions ui/qml/xstudio/application/panels/media/grid_view/XsMediaGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ XsGridView {
// are these indeces from the same list as our list here?
if (data.length && data[0].parent == mediaListModelDataRoot) {
// do a move rows
beforeMoveContentY = contentY
theSessionData.moveRows(
data,
dragTargetIndex.row,
Expand Down Expand Up @@ -256,6 +257,19 @@ XsGridView {

}

// When we do a moveRows, the list view resets contentY to zero. Annoying.
// So here we try and preserve the scrolled position in that case
property real beforeMoveContentY: 0
onContentYChanged: {
if (contentY == 0) {
// check if this is a reset we want to undo
if (beforeMoveContentY != 0) {
contentY = beforeMoveContentY
beforeMoveContentY = 0
}
}
}

property var autoScrollVelocity: 200
function autoScroll(mouseY) {
if ((height-mouseY) < 0 || mouseY < 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,12 @@ XsListView {
// So here we try and preserve the scrolled position in that case
property real beforeMoveContentY: 0
onContentYChanged: {
if(beforeMoveContentY != 0){
contentY = beforeMoveContentY
beforeMoveContentY = 0
if (contentY == 0) {
// check if this is a reset we want to undo
if (beforeMoveContentY != 0) {
contentY = beforeMoveContentY
beforeMoveContentY = 0
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ metadata with media that isn't from your pipeline.`
ListElement { detail_item: "Frame Range - MediaSource (Image)"}
}

property var model_index: columns_model.index(-1, -1)
property var model_index: columns_model.rootIndex

XsModelProperty {
id: __column_title
Expand Down Expand Up @@ -447,13 +447,14 @@ metadata with media that isn't from your pipeline.`
}

XsLabel {
id: lbl3
Layout.alignment: Qt.AlignVCenter|Qt.AlignRight
text: "Format Expression : "
horizontalAlignment: Text.AlignRight
visible: advanced.checked
XsToolTip{
text: regex_tooltip
visible: hovered
visible: lbl3.hovered
}
}

Expand All @@ -477,7 +478,7 @@ metadata with media that isn't from your pipeline.`
}

XsSimpleButton {

id: backup_btn
text: model_index.model.rowCount(model_index) ? qsTr("Configure Backup") : qsTr("Add Backup")
Layout.alignment: Qt.AlignVCenter|Qt.AlignLeft
Layout.preferredHeight: XsStyleSheet.widgetStdHeight
Expand All @@ -494,7 +495,7 @@ metadata with media that isn't from your pipeline.`
}
XsToolTip{
text: backup_tooltip
visible: hovered
visible: backup_btn.hovered
}

}
Expand Down
Loading
Loading