* Fix syntax error in TestOgreAnim
* Ogre3D MaterialLoader now properly loads materials exported from blender2ogre (Blender 2.57) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7297 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e6b11e8013
commit
b729309949
@ -246,6 +246,9 @@ public class MaterialLoader implements AssetLoader {
|
|||||||
String mode = scan.next();
|
String mode = scan.next();
|
||||||
if (mode.equals("alpha_blend")){
|
if (mode.equals("alpha_blend")){
|
||||||
blend = true;
|
blend = true;
|
||||||
|
}else{
|
||||||
|
// skip the rest
|
||||||
|
readString("\n");
|
||||||
}
|
}
|
||||||
}else if (keyword.equals("cull_hardware")){
|
}else if (keyword.equals("cull_hardware")){
|
||||||
String mode = scan.next();
|
String mode = scan.next();
|
||||||
|
@ -36,6 +36,7 @@ import com.jme3.animation.AnimChannel;
|
|||||||
import com.jme3.animation.AnimControl;
|
import com.jme3.animation.AnimControl;
|
||||||
import com.jme3.animation.AnimEventListener;
|
import com.jme3.animation.AnimEventListener;
|
||||||
import com.jme3.animation.LoopMode;
|
import com.jme3.animation.LoopMode;
|
||||||
|
import com.jme3.animation.SkeletonControl;
|
||||||
import com.jme3.app.SimpleApplication;
|
import com.jme3.app.SimpleApplication;
|
||||||
import com.jme3.input.KeyInput;
|
import com.jme3.input.KeyInput;
|
||||||
import com.jme3.input.controls.ActionListener;
|
import com.jme3.input.controls.ActionListener;
|
||||||
@ -83,11 +84,13 @@ public class TestOgreAnim extends SimpleApplication
|
|||||||
|
|
||||||
channel.setAnim("stand");
|
channel.setAnim("stand");
|
||||||
|
|
||||||
|
SkeletonControl skeletonControl = model.getControl(SkeletonControl.class);
|
||||||
|
|
||||||
Box b = new Box(.25f,3f,.25f);
|
Box b = new Box(.25f,3f,.25f);
|
||||||
Geometry item = new Geometry("Item", b);
|
Geometry item = new Geometry("Item", b);
|
||||||
item.move(0, 1.5f, 0);
|
item.move(0, 1.5f, 0);
|
||||||
item.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
|
item.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
|
||||||
Node n = control.getAttachmentsNode("hand.right");
|
Node n = skeletonControl.getAttachmentsNode("hand.right");
|
||||||
n.attachChild(item);
|
n.attachChild(item);
|
||||||
|
|
||||||
rootNode.attachChild(model);
|
rootNode.attachChild(model);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user