diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java new file mode 100644 index 000000000..ba327183b --- /dev/null +++ b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.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!"); + } +} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java index 664c76585..603bb6bfe 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java @@ -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); } /** diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java new file mode 100644 index 000000000..458464d59 --- /dev/null +++ b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.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 '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!"); + } +} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java new file mode 100644 index 000000000..0d47e5710 --- /dev/null +++ b/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 '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!"); + } +}