From 1784458931ba4e92f28c2ff323448611c464e313 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Tue, 10 Apr 2018 22:30:17 +0200 Subject: [PATCH] Use mutable set for animation names See https://youtrack.jetbrains.com/issue/KT-9959 Fixes #34 (again) --- VERSION.md | 4 ++++ .../com/rhubarb_lip_sync/rhubarb_for_spine/SpineJson.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION.md b/VERSION.md index 04cc1c9..6644f35 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1,5 +1,9 @@ # Version history +## Unreleased + +* Fixed bug in Rhubarb for Spine where processing failed depending on the number of existing animations. See [issue #34](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/34#issuecomment-378198776). + ## Version 1.7.1 * Fixed [issue #34](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/34): Generic error message in Rhubarb for Spine diff --git a/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/SpineJson.kt b/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/SpineJson.kt index f59df1e..f87d028 100644 --- a/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/SpineJson.kt +++ b/extras/EsotericSoftwareSpine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/SpineJson.kt @@ -96,7 +96,7 @@ class SpineJson(val filePath: Path) { } val animationNames = observableSet( - json.obj("animations")?.map{ it.key }?.toSet() ?: setOf() + json.obj("animations")?.map{ it.key }?.toMutableSet() ?: mutableSetOf() ) fun createOrUpdateAnimation(mouthCues: List, eventName: String, animationName: String,