N makes a symbol, shift-N a lane, alt for the top of the tab; alt-T traces
N and shift-N make a symbol or a lane where the selection says, as the timeline's buttons do; with alt, at the top of the tab whatever is selected. A new symbol in a lane is a new drawing, so there N is shift-K: one meaning for a new empty thing in a lane. Alt-T switches tracing, beside alt-O for onion skin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
285a195fee
commit
af0df98a15
2 changed files with 31 additions and 5 deletions
|
|
@ -394,10 +394,11 @@
|
|||
(rf/reg-event-fx
|
||||
::drawing-here
|
||||
;; K and ⇧K in a lane: see `span/drawing-at`. The new cel is selected and the
|
||||
;; playhead put on it, because it is there to be drawn in.
|
||||
(fn [{:keys [db]} [_ copy?]]
|
||||
;; playhead put on it, because it is there to be drawn in. `lane` is
|
||||
;; `lane-here`'s answer unless the caller has already chosen one.
|
||||
(fn [{:keys [db]} [_ copy? lane]]
|
||||
(let [clip (:clip (store/entry (:clip/current db)))
|
||||
{:keys [sid frame path time]} (lane-here db)
|
||||
{:keys [sid frame path time]} (or lane (lane-here db))
|
||||
id (random-uuid)
|
||||
result (if sid
|
||||
(span/drawing-at clip sid frame id (clip/fresh-id clip)
|
||||
|
|
@ -971,10 +972,27 @@
|
|||
|
||||
(rf/reg-event-db
|
||||
::new-lane
|
||||
(fn [db _]
|
||||
(fn [db [_ where]]
|
||||
;; A lane is an explicit persistent row across the effective target symbol.
|
||||
;; The playhead validates that nested target; the row itself begins at zero.
|
||||
(create-container db :inside true)))
|
||||
(create-container db (or where :inside) true)))
|
||||
|
||||
(rf/reg-event-fx
|
||||
::new
|
||||
;; N and its variants: a new symbol or lane where the selection says, or at
|
||||
;; the top of the tab (`:top`).
|
||||
;;
|
||||
;; A NEW SYMBOL IN A LANE IS A NEW DRAWING, so there it is ⇧K — one meaning
|
||||
;; for "a new empty thing in a lane", rather than two that differ in how
|
||||
;; much of the hold they take. A lane made in a lane is still a lane.
|
||||
(fn [{:keys [db]} [_ where lane?]]
|
||||
(let [{document :clip st :store} (store/entry (:clip/current db))
|
||||
into (creation/target document st (get-in db [:ui :open])
|
||||
(when-not (= :top where) (get-in db [:ui :selection]))
|
||||
(editing-frame db document))]
|
||||
(if (and (not lane?) (= :lane (:kind into)))
|
||||
{:fx [[:dispatch [::drawing-here false into]]]}
|
||||
{:db (create-container db where lane?)}))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
;; a drop in flight
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@
|
|||
:note "playback loops between the marks"}
|
||||
{:label "Mark out" :keys ["o"] :run (constantly [::pb/mark :out])}
|
||||
{:label "Clear the marks" :keys ["alt+x"] :run (constantly [::pb/clear-marks])}
|
||||
{:label "Tracing" :keys ["alt+t"]
|
||||
:run #(vector ::ui/tracing-on (not (get-in % [:ui :tracing :on?])))}
|
||||
{:label "Onion skin" :keys ["alt+o"]
|
||||
:run #(let [on? (get-in % [:ui :onion (:clip/current %) (get-in % [:ui :open]) :on?])]
|
||||
[::layout/onion :on? (not on?)])}]]
|
||||
|
|
@ -80,6 +82,12 @@
|
|||
:run #(when-let [p (ui/span-path %)] [::ui/slide p 1 :out true])}
|
||||
{:label "One frame shorter" :keys ["-"]
|
||||
:run #(when-let [p (ui/span-path %)] [::ui/slide p -1 :out true])}]]
|
||||
["Make"
|
||||
[{:label "New symbol" :keys ["n"] :run (constantly [::ui/new :inside false])
|
||||
:note "in the selected symbol; in a lane, a blank drawing"}
|
||||
{:label "New lane" :keys ["shift+n"] :run (constantly [::ui/new :inside true])}
|
||||
{:label "New symbol at the top of the tab" :keys ["alt+n"] :run (constantly [::ui/new :top false])}
|
||||
{:label "New lane at the top of the tab" :keys ["alt+shift+n"] :run (constantly [::ui/new :top true])}]]
|
||||
["Draw"
|
||||
[{:label "Select" :keys ["v"] :run (constantly [::ui/tool-key "v"])}
|
||||
{:label "Pen" :keys ["p"] :run (constantly [::ui/tool-key "p"])}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue