aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/playback.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-10-24 16:54:50 +0200
committerThomas White <taw@physics.org>2020-10-24 16:54:50 +0200
commit8726a5c44c16503697197d089d3880218d61df83 (patch)
tree35cd1914079e828a789d9173a9f442ea7a911aaf /guile/starlet/playback.scm
parentcd1e43183ac01466ecb91709671046a22036acf7 (diff)
Match cue-part attributes by name as well
Diffstat (limited to 'guile/starlet/playback.scm')
-rw-r--r--guile/starlet/playback.scm21
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)