Feature: added constraint definitions that were added to blender 2.62 so that the loaded does not crash when meets one

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10385 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 12 years ago
parent d59e679f71
commit bdd8ab1fb0
  1. 26
      engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java
  2. 4
      engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java
  3. 26
      engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java
  4. 26
      engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java

@ -0,0 +1,26 @@
package com.jme3.scene.plugins.blender.constraints.definitions;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.jme3.math.Transform;
import com.jme3.scene.plugins.blender.BlenderContext;
import com.jme3.scene.plugins.blender.file.Structure;
/**
* This class represents 'Camera solver' constraint type in blender.
* @author Marcin Roguski (Kaelthas)
*/
/*package*/ class ConstraintDefinitionCameraSolver extends ConstraintDefinition {
private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName());
public ConstraintDefinitionCameraSolver(Structure constraintData, BlenderContext blenderContext) {
super(constraintData, blenderContext);
}
@Override
public void bake(Transform ownerTransform, Transform targetTransform, float influence) {
// TODO: implement 'Camera solver' constraint
LOGGER.log(Level.WARNING, "'Camera solver' constraint NOT implemented!");
}
}

@ -70,6 +70,10 @@ public class ConstraintDefinitionFactory {
CONSTRAINT_CLASSES.put("bTrackToConstraint", ConstraintDefinitionTrackTo.class);
CONSTRAINT_CLASSES.put("bSameVolumeConstraint", ConstraintDefinitionSameVolume.class);
CONSTRAINT_CLASSES.put("bTransLikeConstraint", ConstraintDefinitionTransLike.class);
//Blender 2.62+
CONSTRAINT_CLASSES.put("bCameraSolverConstraint", ConstraintDefinitionCameraSolver.class);
CONSTRAINT_CLASSES.put("bObjectSolverConstraint", ConstraintDefinitionObjectSolver.class);
CONSTRAINT_CLASSES.put("bFollowTrackConstraint", ConstraintDefinitionFollowTrack.class);
}
/**

@ -0,0 +1,26 @@
package com.jme3.scene.plugins.blender.constraints.definitions;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.jme3.math.Transform;
import com.jme3.scene.plugins.blender.BlenderContext;
import com.jme3.scene.plugins.blender.file.Structure;
/**
* This class represents 'Follow track' constraint type in blender.
* @author Marcin Roguski (Kaelthas)
*/
/*package*/ class ConstraintDefinitionFollowTrack extends ConstraintDefinition {
private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName());
public ConstraintDefinitionFollowTrack(Structure constraintData, BlenderContext blenderContext) {
super(constraintData, blenderContext);
}
@Override
public void bake(Transform ownerTransform, Transform targetTransform, float influence) {
// TODO: implement 'Follow track' constraint
LOGGER.log(Level.WARNING, "'Follow track' constraint NOT implemented!");
}
}

@ -0,0 +1,26 @@
package com.jme3.scene.plugins.blender.constraints.definitions;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.jme3.math.Transform;
import com.jme3.scene.plugins.blender.BlenderContext;
import com.jme3.scene.plugins.blender.file.Structure;
/**
* This class represents 'Object solver' constraint type in blender.
* @author Marcin Roguski (Kaelthas)
*/
/*package*/ class ConstraintDefinitionObjectSolver extends ConstraintDefinition {
private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName());
public ConstraintDefinitionObjectSolver(Structure constraintData, BlenderContext blenderContext) {
super(constraintData, blenderContext);
}
@Override
public void bake(Transform ownerTransform, Transform targetTransform, float influence) {
// TODO: implement 'Object solver' constraint
LOGGER.log(Level.WARNING, "'Object solver' constraint NOT implemented!");
}
}
Loading…
Cancel
Save