When i try and load a milkshape joint controller if returns null meaning it didn’t find wat it wants, Well what does it want i animated the model.
How are you loading and retrieving your .ms3d file?
jme loader that converts it to .jme then i load it then i have it load the controller. It’s worked before for me
Is the model animated in the .ms3d format?
well duh lol
Show me the code you’re using.
it’s pretty divided up but here we go
[/code]
import com.jme.scene.model.XMLparser.Converters.;
import java.io.;
import com.jme.animation.*;
import com.jme.scene.Node;
public class parse
{
Node model;
//Converter Constructor
AseToJme atj; //asii to jme binary
MaxToJme mxtj; //max to jme binary
Md2ToJme md2tj; //md2 to jme binary
Md3ToJme md3tj; //md3 to jme binary
MilkToJme mltj; //milkshape to jme binary
ObjToJme otj;
//IO Contructor
public parse()
{
}
public void parse(String location,String fileName,String fileType)throws IOException,FileNotFoundException
{
String base =location;
location=base;
fileType=fileType.toLowerCase();
FileInputStream fis=new FileInputStream(location+fileName+"."+fileType);
FileOutputStream fos=new FileOutputStream(location+fileName+".jme");
if(fileType.equals(“ase”))
{
atj = new AseToJme();
atj.convert(fis,fos);
}
else if(fileType.equals(“obj”))
{
otj = new ObjToJme();
otj.convert(fis,fos);
}
else if(fileType.equals(“max”))
{
mxtj = new MaxToJme();
mxtj.convert(fis,fos);
}
else if(fileType.equals(“md2”))
{
md2tj=new Md2ToJme();
md2tj.convert(fis,fos);
}
else if(fileType.equals(“ms3d”))
{
mltj=new MilkToJme();
mltj.convert(fis,fos);
}
else if(fileType.equals(“md3”))
{
md3tj=new Md3ToJme();
md3tj.convert(fis,fos);
}
else
{
System.out.println(“FAILED”);//debating
}
}
public static void giveTry(String location,String fileName,String fileType)
{
parse p = new parse();
try
{
p.parse(location,fileName,fileType);
}
catch(IOException e)
{
System.out.print(e.getMessage());
}
}
public SpatialTransformer max(Node a)
{
SpatialTransformer st=mxtj.findController(a);
return st;
}
public KeyframeController md2(Node a)
{
KeyframeController kc = md2tj.findController(a);
return kc;
}
public JointController ms3d(Node a)
{
JointController jc = mltj.findController(a);
return jc;
}
}
after it’s converted it calls another class to read it in then u call the ms3d were it returns the JointController[code]
after it’s converted it calls another class to read it in then u call the ms3d were it returns the JointController
Does the model display without trying to get the controller? The node you pass to findController has to be exactly the node you get from animating the model. If you can, email me the milkshape3d model and I’ll look at it.