use of com.jme3.scene.plugins.blender.modifiers.Modifier in project jmonkeyengine by jMonkeyEngine.
the class Modifier method validate.
protected boolean validate(Structure modifierStructure, BlenderContext blenderContext) {
Structure modifierData = (Structure) modifierStructure.getFieldValue("modifier");
Pointer pError = (Pointer) modifierData.getFieldValue("error");
invalid = pError.isNotNull();
return !invalid;
}
use of com.jme3.scene.plugins.blender.modifiers.Modifier in project jmonkeyengine by jMonkeyEngine.
the class TriangulateModifier method apply.
@Override
public void apply(Node node, BlenderContext blenderContext) {
if (invalid) {
LOGGER.log(Level.WARNING, "Triangulate modifier is invalid! Cannot be applied to: {0}", node.getName());
}
TemporalMesh temporalMesh = this.getTemporalMesh(node);
if (temporalMesh != null) {
LOGGER.log(Level.FINE, "Applying triangulation modifier to: {0}", temporalMesh);
temporalMesh.triangulate();
} else {
LOGGER.log(Level.WARNING, "Cannot find temporal mesh for node: {0}. The modifier will NOT be applied!", node);
}
}
Aggregations