|
|
|
@ -40,6 +40,7 @@ import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Map.Entry; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.logging.Level; |
|
|
|
|
import java.util.logging.Logger; |
|
|
|
|
|
|
|
|
|
import com.jme3.animation.AnimControl; |
|
|
|
@ -118,7 +119,7 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
} else if (Modifier.MIRROR_MODIFIER_DATA.equals(modifier.getType())) { |
|
|
|
|
return this.applyMirrorModifierData(node, modifier, dataRepository); |
|
|
|
|
} else { |
|
|
|
|
LOGGER.warning("Modifier: " + modifier.getType() + " not yet implemented!!!"); |
|
|
|
|
LOGGER.log(Level.WARNING, "Modifier: {0} not yet implemented!!!", modifier.getType()); |
|
|
|
|
return node; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -266,7 +267,7 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
loadedModifier = new AnimData(new Skeleton(bones), animations); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
LOGGER.warning("Unsupported modifier type: " + modifier.getType()); |
|
|
|
|
LOGGER.log(Level.WARNING, "Unsupported modifier type: {0}", modifier.getType()); |
|
|
|
|
} |
|
|
|
|
} else if (Modifier.PARTICLE_MODIFIER_DATA.equals(modifier.getType())) {// ****************PARTICLES MODIFIER
|
|
|
|
|
Pointer pParticleSystem = (Pointer) modifier.getFieldValue("psys"); |
|
|
|
@ -488,7 +489,11 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
|
|
|
|
|
protected Node applyObjectAnimationModifier(Node node, Modifier modifier, DataRepository dataRepository) { |
|
|
|
|
AnimData ad = (AnimData) modifier.getJmeModifierRepresentation(); |
|
|
|
|
ad.skeleton.getBone(0).setAttachNode(node); |
|
|
|
|
|
|
|
|
|
// TODO: Why is this line here? Why is this needed?
|
|
|
|
|
// Remove if necessary.
|
|
|
|
|
//ad.skeleton.getBone(0).setAttachNode(node);
|
|
|
|
|
|
|
|
|
|
return this.applyArmatureModifierData(node, modifier, dataRepository); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -544,7 +549,7 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
objectOffset[1] = translation.y; |
|
|
|
|
objectOffset[2] = translation.z; |
|
|
|
|
} catch (BlenderFileException e) { |
|
|
|
|
LOGGER.warning("Problems in blender file structure! Object offset cannot be applied! The problem: " + e.getMessage()); |
|
|
|
|
LOGGER.log(Level.WARNING, "Problems in blender file structure! Object offset cannot be applied! The problem: {0}", e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -563,10 +568,10 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
ObjectHelper objectHelper = dataRepository.getHelper(ObjectHelper.class); |
|
|
|
|
caps[i] = (Node) objectHelper.toObject(capStructure, dataRepository); |
|
|
|
|
if (caps[i] == null) { |
|
|
|
|
LOGGER.warning("Cap object '" + capStructure.getName() + "' couldn't be loaded!"); |
|
|
|
|
LOGGER.log(Level.WARNING, "Cap object ''{0}'' couldn''t be loaded!", capStructure.getName()); |
|
|
|
|
} |
|
|
|
|
} catch (BlenderFileException e) { |
|
|
|
|
LOGGER.warning("Problems in blender file structure! Cap object cannot be applied! The problem: " + e.getMessage()); |
|
|
|
|
LOGGER.log(Level.WARNING, "Problems in blender file structure! Cap object cannot be applied! The problem: {0}", e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -648,7 +653,7 @@ public class ModifierHelper extends AbstractBlenderHelper { |
|
|
|
|
center[2] = translation.z; |
|
|
|
|
} |
|
|
|
|
} catch (BlenderFileException e) { |
|
|
|
|
LOGGER.severe("Cannot load mirror's reference object. Cause: " + e.getLocalizedMessage()); |
|
|
|
|
LOGGER.log(Level.SEVERE, "Cannot load mirror''s reference object. Cause: {0}", e.getLocalizedMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
float tolerance = ((Number) modifierData.get("tolerance")).floatValue(); |
|
|
|
|