Open the palette lane onto its selected transition, like any lane
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1a6d6564c5
commit
c359ac650f
2 changed files with 53 additions and 17 deletions
|
|
@ -365,26 +365,39 @@
|
|||
(walk sid [] 0 identity)
|
||||
[])))))
|
||||
|
||||
(defn palette-track-row
|
||||
"`sid`'s palette row: ONE LANE ROW WHETHER OR NOT THE LANE EXISTS YET, because
|
||||
(defn palette-track-rows
|
||||
"`sid`'s palette rows. Its row: ONE LANE ROW WHETHER OR NOT THE LANE EXISTS YET, because
|
||||
a person putting a palette transition somewhere is doing the same thing in
|
||||
either case. Empty, it names the symbol whose palette it would be; filled, it
|
||||
is the lane symbol's own row under this pane's name for it."
|
||||
is the lane symbol's own row under this pane's name for it, and opens as any
|
||||
lane does: onto the selected transition, its keys and channels."
|
||||
[clip sid frames expanded chosen]
|
||||
(let [track-id (get-in clip [:symbols sid :palette-track])
|
||||
track (get-in clip [:symbols track-id])]
|
||||
(if (= :palette-track (:type track))
|
||||
;; A MATERIALIZED TRACK IS AN ORDINARY LANE ROW, selection and all: it is
|
||||
;; the row `rows` already draws for a lane symbol, wearing this pane's
|
||||
;; name for it. Only the row of a track that does not exist yet has to say
|
||||
;; whose palette it would be, which is what creating in it needs.
|
||||
(-> (first (rows clip track-id expanded chosen))
|
||||
(assoc :path [::palette-track] :owner track-id
|
||||
:label "palette" :kind :palette
|
||||
:expandable? false :expanded? false))
|
||||
{:path [::palette-track] :depth 0 :label "palette" :kind :palette
|
||||
:lane? true :owner nil :select [::palette-track sid]
|
||||
:span [0 frames] :keys [] :cels []})))
|
||||
;; A MATERIALIZED TRACK IS AN ORDINARY LANE ROW, selection, portal and
|
||||
;; all: it is what `rows` already draws for a lane symbol, wearing this
|
||||
;; pane's name for it. Only the row of a track that does not exist yet has
|
||||
;; to say whose palette it would be, which is what creating in it needs.
|
||||
;;
|
||||
;; `rows` calls a lane's own row `[::lane]`, which is also the open
|
||||
;; symbol's when that is a lane, so this row goes by `[::palette-track]`
|
||||
;; and is translated on the way in. The portal's rows keep their authored
|
||||
;; paths -- the clip ids are the track's own -- and carry the track as
|
||||
;; their `:owner`, so dragging them slides the clip in the track.
|
||||
(let [expanded (cond-> (disj (set expanded) [::lane])
|
||||
(contains? (set expanded) [::palette-track]) (conj [::lane]))
|
||||
[lane & more] (rows clip track-id expanded chosen)]
|
||||
(into [(assoc lane :path [::palette-track] :owner track-id
|
||||
:label "palette" :kind :palette)]
|
||||
(comp (take-while #(pos? (:depth %)))
|
||||
(map #(cond-> (assoc % :owner track-id)
|
||||
(= ::lane (first (:path %)))
|
||||
(assoc :path (into [::palette-track] (rest (:path %)))))))
|
||||
more))
|
||||
[{:path [::palette-track] :depth 0 :label "palette" :kind :palette
|
||||
:lane? true :owner nil :select [::palette-track sid]
|
||||
:span [0 frames] :keys [] :cels []}])))
|
||||
|
||||
(defn sound-rows
|
||||
"Audio rows use the same flattened intervals as the mixer, including source
|
||||
|
|
@ -1395,7 +1408,7 @@
|
|||
{:id ::drop :label (str "+ " (:label drop)) :ghost? true
|
||||
:span drop-span})
|
||||
chosen (when (= :node (first selection)) (nth selection 3))
|
||||
picture (cond-> (cond->> (into [(palette-track-row clip open frames expanded chosen)]
|
||||
picture (cond-> (cond->> (into (palette-track-rows clip open frames expanded chosen)
|
||||
(rows clip open expanded chosen))
|
||||
lane-ghost
|
||||
(mapv (fn [row]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue