Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 66 additions & 39 deletions qml/AnimationDopeSheet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,18 @@ Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
visible: morphRowsRep.count > 0

// Cap the band at ~40% of the dope-sheet height so high-count
// blendshape rigs (Mixamo characters routinely ship 50+) can't
// push the bone tracks off-screen. When the content needs more
// room, morphList becomes scrollable internally.
readonly property int naturalContentHeight:
morphHeader.height + morphRowsRep.count * (root.rowHeight + 1) + 4
readonly property int maxBandHeight:
Math.max(morphHeader.height + root.rowHeight + 6,
Math.floor(root.height * 0.4))
height: visible
? (morphHeader.height + morphRowsRep.count * (root.rowHeight + 1) + 4)
? Math.min(naturalContentHeight, maxBandHeight)
: 0
color: AnimationControlController.panelColor
border.color: AnimationControlController.borderColor
Expand All @@ -750,54 +760,71 @@ Rectangle {
}
}

Column {
// Scrollable list when content exceeds the capped height. Plain
// Flickable + Column (instead of ListView) so the existing
// Repeater-rendered rows continue to work unchanged.
Flickable {
id: morphList
anchors.left: parent.left
anchors.right: parent.right
anchors.top: morphHeader.bottom
anchors.bottom: parent.bottom
anchors.topMargin: 2
spacing: 1

Repeater {
id: morphRowsRep
model: root.morphRows
clip: true
Comment on lines +766 to +773
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable morph Flickable drag to preserve timeline marquee

The new Flickable in the morph band is left with default pointer settings, so it consumes left-button drags in that region. timelineArea is the component that implements left-drag marquee selection (and expects empty-track drags to reach it), which worked before this change because the morph rows were plain Column/Items. After this commit, starting a marquee drag over morph lanes no longer reaches timelineArea, so selection behavior regresses whenever the drag starts in the bottom band.

Useful? React with 👍 / 👎.

contentHeight: morphCol.height
boundsBehavior: Flickable.StopAtBounds

Item {
width: parent.width
height: root.rowHeight
Column {
id: morphCol
width: parent.width
spacing: 1

Rectangle {
width: root.leftStripWidth; height: root.rowHeight
color: AnimationControlController.panelColor
border.color: AnimationControlController.borderColor
border.width: 1
Text {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left; anchors.leftMargin: 8
text: modelData.name
color: AnimationControlController.textColor
font.pixelSize: 10
elide: Text.ElideRight
width: root.leftStripWidth - 12
}
}
Repeater {
id: morphRowsRep
model: root.morphRows

// Right side: diamond per keyframe time. Sharing the
// bone-row timeline math so they line up vertically.
Item {
anchors.left: parent.left; anchors.leftMargin: root.leftStripWidth
anchors.right: parent.right
width: parent.width
height: root.rowHeight
Repeater {
model: modelData.keyTimes
Rectangle {
property real keyTime: modelData
x: (keyTime - root.viewStart) * root.pxPerSec - width / 2

Rectangle {
width: root.leftStripWidth; height: root.rowHeight
color: AnimationControlController.panelColor
border.color: AnimationControlController.borderColor
border.width: 1
Text {
anchors.verticalCenter: parent.verticalCenter
width: 10; height: 10
rotation: 45
color: "#88ccff" // visually distinct from bone keys (yellow)
border.color: AnimationControlController.borderColor
border.width: 1
anchors.left: parent.left; anchors.leftMargin: 8
text: modelData.name
color: AnimationControlController.textColor
font.pixelSize: 10
elide: Text.ElideRight
width: root.leftStripWidth - 12
}
}

// Right side: diamond per keyframe time. Sharing
// the bone-row timeline math so they line up
// vertically. `clip: true` so off-screen diamonds
// (from pan/zoom) don't bleed into the name strip
// or neighboring rows, matching the bone tracks.
Item {
anchors.left: parent.left; anchors.leftMargin: root.leftStripWidth
anchors.right: parent.right
height: root.rowHeight
clip: true
Repeater {
model: modelData.keyTimes
Rectangle {
property real keyTime: modelData
x: (keyTime - root.viewStart) * root.pxPerSec - width / 2
anchors.verticalCenter: parent.verticalCenter
width: 10; height: 10
rotation: 45
color: "#88ccff" // visually distinct from bone keys (yellow)
border.color: AnimationControlController.borderColor
border.width: 1
}
}
}
}
Expand Down
Loading