Custom Objects are now being saved with Path Presets instead of globally

This commit is contained in:
CrushedPixel
2015-08-16 18:30:00 +02:00
parent c95c2f0e4c
commit f2752f2790
10 changed files with 59 additions and 61 deletions

View File

@@ -118,10 +118,14 @@ public class ReplayHandler {
}
public static void useKeyframePresetFromRepository(int index) {
useKeyframePreset(keyframeRepository[index].getKeyframes());
useKeyframePreset(keyframeRepository[index]);
}
public static void useKeyframePreset(Keyframe[] kfs) {
public static void useKeyframePreset(KeyframeSet keyframeSet) {
setCustomImageObjects(Arrays.asList(keyframeSet.getCustomObjects()));
Keyframe[] kfs = keyframeSet.getKeyframes();
positionKeyframes.clear();
timeKeyframes.clear();
for(Keyframe kf : kfs) {
@@ -406,9 +410,7 @@ public class ReplayHandler {
//load assets
assetRepository = currentReplayFile.assetRepository().get();
//load custom image objects
customImageObjects = currentReplayFile.customImageObjects().get();
if(customImageObjects == null) customImageObjects = new CustomObjectRepository();
customImageObjects = new CustomObjectRepository();
ReplayMod.replaySender = new ReplaySender(currentReplayFile, asyncMode);
channel.pipeline().addFirst(ReplayMod.replaySender);