Mishiza
02-15-2009, 09:23 PM
Hello all!
I'm trying to do a very simple and easy to read animation importer.
I've already done a exporter (exporting in ascii).
What I'm basically trying to do is to make a script to read my file format but I'm having problems with the actual execution. the format is:
Frame Number|
ObjectName TranslateXValue TangetOutValue TangentWeightValue;
ObjectName TranslateYValue TangetOutValue TangentWeightValue;
ObjectName TranslateZValue TangetOutValue TangentWeightValue;
ObjectName RotateXValue TangetOutvalue TangentWeightValue;
@
..... etc
What I need the script to do is:
1. Reading the lines until it reaches the breaker "|", Set the frame number.
2. Reading the lines until it reaches the breaker ";", Set key based on value and from tangent based on the tangent out and tangent weight value.
3. When reaching "@" starting over.
If someone could help me out and give me an example script of how to read my files and use the variables with in to execute the code i would be eternally thankful ^^
I'm trying to do a very simple and easy to read animation importer.
I've already done a exporter (exporting in ascii).
What I'm basically trying to do is to make a script to read my file format but I'm having problems with the actual execution. the format is:
Frame Number|
ObjectName TranslateXValue TangetOutValue TangentWeightValue;
ObjectName TranslateYValue TangetOutValue TangentWeightValue;
ObjectName TranslateZValue TangetOutValue TangentWeightValue;
ObjectName RotateXValue TangetOutvalue TangentWeightValue;
@
..... etc
What I need the script to do is:
1. Reading the lines until it reaches the breaker "|", Set the frame number.
2. Reading the lines until it reaches the breaker ";", Set key based on value and from tangent based on the tangent out and tangent weight value.
3. When reaching "@" starting over.
If someone could help me out and give me an example script of how to read my files and use the variables with in to execute the code i would be eternally thankful ^^
