TSShapeConstructor not working for .cached.DTS
by Ivan Mandzhukov · in Torque 3D Professional · 11/08/2009 (7:17 am) · 2 replies
guys,
I have this problem: I have setup my model to use DAE and its animations work flawlessly.
But when I decided to change everything to use the cached DTS file instead of DAE animations stopped working.
For clarification these are the objects datablock and its *.cs file with the ShapeConstructor with DAE (that works) :
And these are the changed files to use the cached DTS file:
I have this problem: I have setup my model to use DAE and its animations work flawlessly.
But when I decided to change everything to use the cached DTS file instead of DAE animations stopped working.
For clarification these are the objects datablock and its *.cs file with the ShapeConstructor with DAE (that works) :
datablock StaticShapeData(MyShape)
{
category = "MyShape";
shapeFile = "art/shapes/myShape/myShape.DAE";
};
//in the myShape.cs:
//--- OBJECT WRITE BEGIN ---
function myShapeDAE::onLoad(%this)
{
%this.addSequence("AnimationClip", "root", 0, 25);
%this.setSequenceCyclic("root", "1");
}
singleton TSShapeConstructor(myShapeDAE)
{
baseShape = "art/shapes/myShape/myShape.DAE";
upAxis = "DEFAULT";
unit = "-1";
lodType = "DetectDTS";
singleDetailSize = "2";
ignoreNodeScale = "0";
adjustCenter = "0";
adjustFloor = "0";
forceUpdateMaterials = "0";
canSaveDynamicFields = "1";
};
//--- OBJECT WRITE END ---And these are the changed files to use the cached DTS file:
datablock StaticShapeData(MyShape)
{
category = "MyShape";
shapeFile = "art/shapes/myShape/myShape.cached.dts";
};
//in the myShape.cs:
//--- OBJECT WRITE BEGIN ---
function myShapeDAE::onLoad(%this)
{
%this.addSequence("AnimationClip", "root", 0, 25);
%this.setSequenceCyclic("root", "1");
}
singleton TSShapeConstructor(myShapeDAE)
{
baseShape = "art/shapes/myShape/myShape.cached.dts";
upAxis = "DEFAULT";
unit = "-1";
lodType = "DetectDTS";
singleDetailSize = "2";
ignoreNodeScale = "0";
adjustCenter = "0";
adjustFloor = "0";
forceUpdateMaterials = "0";
canSaveDynamicFields = "1";
};
//--- OBJECT WRITE END ---
#2
Thanks for the answer.
Actually i solved this earlier today:
baseShape = "art/shapes/myShape/myShape.cached.dts";
should be replaced with:
baseShape = "art/shapes/myShape/myShape.dae";
then delete the *.dae file
Collada loader will see that the *.dae is missing and all will work the same for the cached.dts
11/08/2009 (2:04 pm)
@J.C.SmithThanks for the answer.
Actually i solved this earlier today:
baseShape = "art/shapes/myShape/myShape.cached.dts";
should be replaced with:
baseShape = "art/shapes/myShape/myShape.dae";
then delete the *.dae file
Collada loader will see that the *.dae is missing and all will work the same for the cached.dts
Torque 3D Owner J.C. Smith