diff options
author | Thomas White <taw@physics.org> | 2020-10-24 16:54:50 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-10-24 16:54:50 +0200 |
commit | 8726a5c44c16503697197d089d3880218d61df83 (patch) | |
tree | 35cd1914079e828a789d9173a9f442ea7a911aaf /guile/starlet/playback.scm | |
parent | cd1e43183ac01466ecb91709671046a22036acf7 (diff) |
Match cue-part attributes by name as well
Diffstat (limited to 'guile/starlet/playback.scm')
-rw-r--r-- | guile/starlet/playback.scm | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/guile/starlet/playback.scm b/guile/starlet/playback.scm index 5a3c2a1..c340c52 100644 --- a/guile/starlet/playback.scm +++ b/guile/starlet/playback.scm @@ -302,9 +302,24 @@ (define (match-fix-attr attr-el fix attr) - (if (fixture? attr-el) - (eq? attr-el fix) - (eqv? attr-el (cons fix attr)))) + (cond + + ((fixture? attr-el) + (eq? attr-el fix)) + + ((and (pair? attr-el) + (fixture? (car attr-el)) + (fixture-attribute? (cdr attr-el))) + (and (eq? (car attr-el) fix) + (eq? (cdr attr-el) attr))) + + ((and (pair? attr-el) + (fixture? (car attr-el)) + (symbol? (cdr attr-el))) + (and (eq? (car attr-el) fix) + (eq? (cdr attr-el) (get-attr-name attr)))) + + (else #f))) (define (in-cue-part? cue-part fix attr) |