From 5ac1d63bb90ff92750f28c6e6c59d967b5b8e103 Mon Sep 17 00:00:00 2001 From: Normen Hansen Date: Tue, 10 Mar 2015 15:08:57 +0100 Subject: [PATCH] - check for animations being present before importing them in ExternalChangeScanner --- .../gde/core/assets/ExternalChangeScanner.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/ExternalChangeScanner.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/ExternalChangeScanner.java index 61a036582..ba3fac318 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/ExternalChangeScanner.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/ExternalChangeScanner.java @@ -130,12 +130,14 @@ public class ExternalChangeScanner implements AssetDataPropertyChangeListener, F Spatial original = loadOriginalSpatial(); Spatial spat = (Spatial) assetDataObject.loadAsset(); SpatialUtil.updateMeshDataFromOriginal(spat, original); - NotifyDescriptor.Confirmation mesg = new NotifyDescriptor.Confirmation("Model appears to have animations, try to import as well?\nCurrently this will unlink attachment Nodes and clear\nadded effects tracks.", - "Animations Available", - NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.QUESTION_MESSAGE); - DialogDisplayer.getDefault().notify(mesg); - if (mesg.getValue() == NotifyDescriptor.Confirmation.YES_OPTION) { - SpatialUtil.updateAnimControlDataFromOriginal(spat, original); + if (SpatialUtil.hasAnimations(original)) { + NotifyDescriptor.Confirmation mesg = new NotifyDescriptor.Confirmation("Model appears to have animations, try to import as well?\nCurrently this will unlink attachment Nodes and clear\nadded effects tracks.", + "Animations Available", + NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.QUESTION_MESSAGE); + DialogDisplayer.getDefault().notify(mesg); + if (mesg.getValue() == NotifyDescriptor.Confirmation.YES_OPTION) { + SpatialUtil.updateAnimControlDataFromOriginal(spat, original); + } } closeOriginalSpatial(); assetDataObject.saveAsset();