From b46d6bb5d42c7ebb894502121446c8f860d75b49 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Tue, 10 Oct 2023 17:00:34 +0200 Subject: [PATCH] almost multilayer recording --- bin/web/js/audio.js | 1 + bin/web/js/record.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/web/js/audio.js b/bin/web/js/audio.js index 57cdec0..cb58974 100644 --- a/bin/web/js/audio.js +++ b/bin/web/js/audio.js @@ -950,6 +950,7 @@ const Audio = function(tp, record) { inputElement.dispatchEvent(new Event('change')); } } + console.log(p, clone(record.getHot())); record.addValue(p.id, p.title, p.value, position); if (p.title.indexOf('color') === 0) { if (!config.audio.colorSeparateRGBA || p.title === 'color.a') { diff --git a/bin/web/js/record.js b/bin/web/js/record.js index 6786c46..91db08b 100644 --- a/bin/web/js/record.js +++ b/bin/web/js/record.js @@ -255,12 +255,12 @@ const Record = function(tp) { // make all mapped props hot and Object.keys(audio.mapping) .forEach((layerID) => { - if (getLayer(layerID).isSelected()) { + //if (getLayer(layerID).isSelected()) { // NOTE: multilayer recording Object.keys(audio.mapping[layerID]) .forEach((propTitle) => { addHot(layerID, propTitle); }); - } + //} }); } else { // only make this propTitle hot and @@ -356,6 +356,10 @@ const Record = function(tp) { value, position = tp.sheet.sequence.position, lastPosition = buffy.NO_TIME) => { + // NOTE: multilayer recording + if (!hot.hasOwnProperty(layerID) || !hot[layerID].hasOwnProperty(propTitle)) { + return; + } hot[layerID][propTitle].recording.push({ position, value,