diff --git a/plugins/qlab/cue.ejs b/plugins/qlab/cue.ejs
index 27810ca..553f9ed 100644
--- a/plugins/qlab/cue.ejs
+++ b/plugins/qlab/cue.ejs
@@ -24,8 +24,17 @@
<% } %>
+ <% if(cue.type == "Group"){ %>
+
 |
+
+ <% }else{ %>
+ .replace(' ','-') %>.png) |
+
+ <% } %>
+
+
+
- .replace(' ','-') %>.png) |
<%= cue.number || " " %> |
@@ -86,7 +95,7 @@
<% if(cue.preWait){ %>
- <%= elapsedTime(cue.preWait, cue.preWaitElapsed, "preWait", cue) %> |
+ <%= elapsedTime(cue.preWait, cue.preWaitElapsed, "preWait", cue) %> |
<% }else{ %>
00:00.00 |
diff --git a/plugins/qlab/img/v5/group-1.png b/plugins/qlab/img/v5/group-1.png
new file mode 100644
index 0000000..b573ce6
Binary files /dev/null and b/plugins/qlab/img/v5/group-1.png differ
diff --git a/plugins/qlab/img/v5/group-2.png b/plugins/qlab/img/v5/group-2.png
new file mode 100644
index 0000000..6d4e614
Binary files /dev/null and b/plugins/qlab/img/v5/group-2.png differ
diff --git a/plugins/qlab/img/v5/group-3.png b/plugins/qlab/img/v5/group-3.png
new file mode 100644
index 0000000..4b10aa6
Binary files /dev/null and b/plugins/qlab/img/v5/group-3.png differ
diff --git a/plugins/qlab/img/v5/group-4.png b/plugins/qlab/img/v5/group-4.png
new file mode 100644
index 0000000..36badda
Binary files /dev/null and b/plugins/qlab/img/v5/group-4.png differ
diff --git a/plugins/qlab/img/v5/group-6.png b/plugins/qlab/img/v5/group-6.png
new file mode 100644
index 0000000..81c3cd4
Binary files /dev/null and b/plugins/qlab/img/v5/group-6.png differ
diff --git a/plugins/qlab/main.js b/plugins/qlab/main.js
index 0e3c9c1..8521b25 100644
--- a/plugins/qlab/main.js
+++ b/plugins/qlab/main.js
@@ -16,7 +16,7 @@ const cueTemplate = _.template(fs.readFileSync(path.join(__dirname, `cue.ejs`)))
const tileTemplate = _.template(fs.readFileSync(path.join(__dirname, `tile.ejs`)));
const cartTemplate = _.template(fs.readFileSync(path.join(__dirname, `cart.ejs`)));
-exports.defaultName = 'QLab 4';
+exports.defaultName = 'QLab';
exports.connectionType = 'osc';
exports.heartbeatInterval = 50;
exports.heartbeatTimeout = 2000;
@@ -73,25 +73,28 @@ exports.data = function data(_device, oscData) {
workspace.cueLists = {};
workspace.cues = {};
- json.data.forEach(cueList => {
- workspace.cueLists[cueList.uniqueID] = cueList;
- addCueToWorkspace(workspace, cueList);
- });
+ if(json.data){
- device.draw();
-
- setTimeout(() => {
- json.data.forEach(ql => {
- workspace.cueLists[ql.uniqueID] = ql;
- getValuesForKeys(device, json.workspace_id, ql);
+ json.data.forEach(cueList => {
+ workspace.cueLists[cueList.uniqueID] = cueList;
+ addCueToWorkspace(workspace, cueList);
});
- }, 0);
- }else if(match(oscAddressParts, ["reply", "cue_id", "*", "children"])){
+ device.draw();
+
+ setTimeout(() => {
+ json.data.forEach(ql => {
+ workspace.cueLists[ql.uniqueID] = ql;
+ getValuesForKeys(device, json.workspace_id, ql);
+ });
+ }, 0);
+ }
+
+ }else if(match(oscAddressParts, ["reply", "cue_id", "*", "children"]) || match(oscAddressParts, ["reply", "workspace", "*", "cue_id", "*", "children"])){
const json = JSON.parse(oscData.args[0]);
const workspace = device.data.workspaces[json.workspace_id];
- const cueID = oscAddressParts[2];
+ const cueID = json.address.substring(55, 91);
const cue = workspace.cues[cueID];
if(!_.isEqual(cue.cues, json.data)){
@@ -101,7 +104,7 @@ exports.data = function data(_device, oscData) {
getValuesForKeys(device, json.workspace_id, cue);
}
- }else if(match(oscAddressParts, ["reply", "cue_id", "*", "valuesForKeys"])){
+ }else if(match(oscAddressParts, ["reply", "cue_id", "*", "valuesForKeys"]) || match(oscAddressParts, ["reply", "workspace", "*", "cue_id", "*", "valuesForKeys"])){
const json = JSON.parse(oscData.args[0]);
const cueValues = json.data;
@@ -124,7 +127,7 @@ exports.data = function data(_device, oscData) {
cue.flagged = cueValues.isFlagged;
cue.paused = cueValues.isPaused;
cue.type = cueValues.type;
- cue.cues = cueValues.children;
+ //cue.cues = cueValues.children;
cue.preWait = cueValues.preWait;
cue.postWait = cueValues.postWait;
cue.duration = cueValues.currentDuration;
@@ -139,6 +142,13 @@ exports.data = function data(_device, oscData) {
cue.actionElapsed = cueValues.actionElapsed;
cue.postWaitElapsed = cueValues.postWaitElapsed;
+ // QLab 5 fix
+ if(cueValues.type=="Group" || cueValues.type=="Cue List"){
+ cue.cues = cueValues.children;
+ }else{
+ cue.cues = undefined;
+ }
+
const nestedGroupModes = [];
const nestedGroupPosition = [];
@@ -181,7 +191,7 @@ exports.data = function data(_device, oscData) {
const json = JSON.parse(oscData.args[0]);
const workspace = device.data.workspaces[json.workspace_id];
- const cue = workspace.cues[oscAddressParts[2]];
+ const cue = workspace.cues[json.address.substring(55, 91)];
cue.preWaitElapsed = json.data;
lastElapsedUpdate = Date.now();
@@ -192,7 +202,7 @@ exports.data = function data(_device, oscData) {
const json = JSON.parse(oscData.args[0]);
const workspace = device.data.workspaces[json.workspace_id];
- const cue = workspace.cues[oscAddressParts[2]];
+ const cue = workspace.cues[json.address.substring(55, 91)];
cue.actionElapsed = json.data;
lastElapsedUpdate = Date.now();
@@ -203,7 +213,7 @@ exports.data = function data(_device, oscData) {
const json = JSON.parse(oscData.args[0]);
const workspace = device.data.workspaces[json.workspace_id];
- const cue = workspace.cues[oscAddressParts[2]];
+ const cue = workspace.cues[json.address.substring(55, 91)];
cue.postWaitElapsed = json.data;
lastElapsedUpdate = Date.now();
@@ -352,14 +362,14 @@ exports.heartbeat = function heartbeat(device) {
heartbeatCount++;
if(Date.now() - lastElapsedUpdate > 300){
- interval = 5;
+ interval = 24;
}else{
interval = 1;
}
if(heartbeatCount % interval === 0){
- device.send(`/cue/active/preWaitElapsed`);
- device.send(`/cue/active/actionElapsed`);
- device.send(`/cue/active/postWaitElapsed`);
+ device.send(`/cue_id/active/preWaitElapsed`);
+ device.send(`/cue_id/active/actionElapsed`);
+ device.send(`/cue_id/active/postWaitElapsed`);
}
};
\ No newline at end of file
diff --git a/plugins/qlab/styles.css b/plugins/qlab/styles.css
index 715abf7..fe1894d 100644
--- a/plugins/qlab/styles.css
+++ b/plugins/qlab/styles.css
@@ -151,6 +151,12 @@ tr.playback-position .q-gray-text {
.gMode-4 {
border-color: #925fc0;
}
+.gMode-4 {
+ border-color: #925fc0;
+}
+.gMode-6 {
+ border-color: #D05B15;
+}
.gMode-,
.gMode-0 {
border-color: rgba(0, 0, 0, 0);