A name is a name, even when it is the id
Reading a name equal to the id as no name was a guess at what older documents meant, and it renamed a symbol called after its id to where it is drawn. The automation suite's box is named, as it means to be. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FLuCjp9kNH6ovwJVXSbq9
This commit is contained in:
parent
66e805b956
commit
249ecfc054
3 changed files with 5 additions and 7 deletions
|
|
@ -104,14 +104,13 @@
|
||||||
reads as that symbol's name and the frame it starts on — `body 12` — worked
|
reads as that symbol's name and the frame it starts on — `body 12` — worked
|
||||||
out on every read, so renaming the lane renames its drawings and moving one
|
out on every read, so renaming the lane renames its drawings and moving one
|
||||||
renames it. A symbol placed nowhere, or in two places, has no one place to be
|
renames it. A symbol placed nowhere, or in two places, has no one place to be
|
||||||
named by and reads as its id. A `:name` that is just the id is no name: older
|
named by and reads as its id."
|
||||||
documents stored one on every drawing."
|
|
||||||
([clip sid] (symbol-name clip sid #{}))
|
([clip sid] (symbol-name clip sid #{}))
|
||||||
([clip sid seen]
|
([clip sid seen]
|
||||||
(let [given (:name (symbol clip sid))
|
(let [given (:name (symbol clip sid))
|
||||||
[owner :as os] (owners clip sid)]
|
[owner :as os] (owners clip sid)]
|
||||||
(cond
|
(cond
|
||||||
(and given (not= given (name sid))) given
|
given given
|
||||||
(and (= 1 (count os)) (not (seen owner)))
|
(and (= 1 (count os)) (not (seen owner)))
|
||||||
(str (symbol-name clip owner (conj seen sid)) " "
|
(str (symbol-name clip owner (conj seen sid)) " "
|
||||||
(js/Math.floor (second (first (get (placements clip) sid)))))
|
(js/Math.floor (second (first (get (placements clip) sid)))))
|
||||||
|
|
|
||||||
|
|
@ -274,9 +274,8 @@
|
||||||
(is (= "body 5" (clip/symbol-name c :inner)))
|
(is (= "body 5" (clip/symbol-name c :inner)))
|
||||||
(is (= "lane 5" (clip/symbol-name (assoc-in c [:symbols :outer :name] "lane") :inner))
|
(is (= "lane 5" (clip/symbol-name (assoc-in c [:symbols :outer :name] "lane") :inner))
|
||||||
"renaming the lane renames its drawings"))
|
"renaming the lane renames its drawings"))
|
||||||
(testing "a name of its own wins, and one that is only the id is no name"
|
(testing "a name of its own wins"
|
||||||
(is (= "hand" (clip/symbol-name (assoc-in c [:symbols :inner :name] "hand") :inner)))
|
(is (= "hand" (clip/symbol-name (assoc-in c [:symbols :inner :name] "hand") :inner))))
|
||||||
(is (= "body 5" (clip/symbol-name (assoc-in c [:symbols :inner :name] "inner") :inner))))
|
|
||||||
(testing "placed nowhere, or in two symbols, it is its id"
|
(testing "placed nowhere, or in two symbols, it is its id"
|
||||||
(is (= "loose" (clip/symbol-name c :loose)))
|
(is (= "loose" (clip/symbol-name c :loose)))
|
||||||
(is (= "inner" (clip/symbol-name (clip/place-symbol c nil :loose :inner 0 (random-uuid) nil)
|
(is (= "inner" (clip/symbol-name (clip/place-symbol c nil :loose :inner 0 (random-uuid) nil)
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ try {
|
||||||
k('source'), m(k('symbol'), k('box')), k('span'), v(0, 60),
|
k('source'), m(k('symbol'), k('box')), k('span'), v(0, 60),
|
||||||
k('time'), m(k('at'), 0, k('rate'), 1),
|
k('time'), m(k('at'), 0, k('rate'), 1),
|
||||||
k('playback'), m(k('in'), 0, k('speed'), 1, k('end'), k('stop')));
|
k('playback'), m(k('in'), 0, k('speed'), 1, k('end'), k('stop')));
|
||||||
c = cljs.core.assoc_in(c, v(k('symbols'), k('box')), m(k('id'), k('box'), k('frames'), 60, k('nodes'), m()));
|
c = cljs.core.assoc_in(c, v(k('symbols'), k('box')), m(k('id'), k('box'), k('name'), 'box', k('frames'), 60, k('nodes'), m()));
|
||||||
c = cljs.core.assoc_in(c, v(k('symbols'), k('main'), k('nodes')), m(k('a'), rect('a',0,true), k('b'), rect('b',4,false), k('target'), target));
|
c = cljs.core.assoc_in(c, v(k('symbols'), k('main'), k('nodes')), m(k('a'), rect('a',0,true), k('b'), rect('b',4,false), k('target'), target));
|
||||||
const id = arthur.footage.store.install_BANG_(m(k('clip'), c, k('store'), m()), 'timeline-browser');
|
const id = arthur.footage.store.install_BANG_(m(k('clip'), c, k('store'), m()), 'timeline-browser');
|
||||||
const a = v(k('node'),k('main'),k('a'),v(k('a'))), b = v(k('node'),k('main'),k('b'),v(k('b')));
|
const a = v(k('node'),k('main'),k('a'),v(k('a'))), b = v(k('node'),k('main'),k('b'),v(k('b')));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue