A clip says where what it plays runs out
Lengthening a placement past the end of the symbol it plays made the bar longer and the picture empty, with nothing on the bar to say so: a symbol made at the playhead near the end is only a few frames long, and moving it back and stretching it showed those few frames and then nothing. The frames past the symbol's end are now drawn empty inside the clip's outline, as Flash leaves an empty frame unfilled, on a row's bar and on a lane's clip alike. A held or looping placement always has a frame to show and is never marked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fce76dfaa6
commit
2eb5944a78
3 changed files with 66 additions and 2 deletions
|
|
@ -225,6 +225,28 @@
|
|||
(is (= [[2 3]] (mapv :span (:cels lane)))
|
||||
"a lane placed at twice the speed draws its frames 4–6 on ruler frames 2–3")))
|
||||
|
||||
(deftest a-bar-says-where-what-it-plays-runs-out
|
||||
(let [placed {:id :short :kind :instance :z "a" :span [0 10]
|
||||
:time {:at 6 :rate 1}
|
||||
:source {:symbol :short}
|
||||
:playback {:in 0 :speed 1 :end :stop}}
|
||||
doc (-> (clip/blank)
|
||||
(assoc-in [:symbols :main :frames] 24)
|
||||
(assoc-in [:symbols :main :nodes] {:short placed})
|
||||
(assoc-in [:symbols :short] {:id :short :frames 4 :nodes {}}))
|
||||
row #(first (timeline/rows % :main #{}))]
|
||||
(is (= [6 16] (:span (row doc))))
|
||||
(is (= [6 10] (:shows (row doc)))
|
||||
"four frames of symbol, stretched to ten, show from 6 to 10 only")
|
||||
(is (nil? (:shows (row (assoc-in doc [:symbols :main :nodes :short :playback :speed] 0))))
|
||||
"a held placement shows its frame across the whole span")
|
||||
(let [lane (-> (assoc-in doc [:symbols :main :display] :lane)
|
||||
(assoc-in [:symbols :main :nodes :short :playback :speed] 2)
|
||||
(timeline/rows :main #{})
|
||||
first)]
|
||||
(is (= [[6 8]] (mapv :shows (:cels lane)))
|
||||
"a clip in a lane says it too, at its own speed"))))
|
||||
|
||||
(deftest an-ordinary-symbol-keeps-a-row-per-node
|
||||
(let [doc (update-in (fixture/document) [:symbols :main] dissoc :display)
|
||||
rows (timeline/rows doc :main #{})]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue