summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-07-02 23:49:39 +0200
committerThomas White <taw@physics.org>2019-07-02 23:49:51 +0200
commit5ec2adf7c2235fd42742da8fd2ecc26a87541067 (patch)
tree6af098a37914bff73991554df478a9bfcdabbaee
parent2bdad0113b8fd8c09bed87f57c5277896f6445eb (diff)
Check gobo/prism flags in any_selected_fixture_has()
-rw-r--r--src/lightctx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lightctx.c b/src/lightctx.c
index 8551882..21c0c03 100644
--- a/src/lightctx.c
+++ b/src/lightctx.c
@@ -172,6 +172,12 @@ int any_selected_fixture_has(struct lightctx *nl, int attr)
for ( i=0; i<nl->n_sel; i++ ) {
struct fixture *fix = &nl->fixtures[nl->selection[i]];
if ( fix->cls->attributes & attr ) return 1;
+ if ( fix->cls->attributes & GOBO ) {
+ if ( fix->cls->gobo_flags[fix->gobo] & attr ) return 1;
+ }
+ if ( fix->cls->attributes & PRISM ) {
+ if ( fix->cls->prism_flags[fix->prism] & attr ) return 1;
+ }
}
return 0;
}