List of available animation sequences (for a player)
by Mathieu · in Torque Game Engine · 03/07/2007 (3:03 pm) · 3 replies
I would like to get the list of available animation sequences from a script function (I want to populate a GuiPopUpMenuCtrl with them, like the one in Torque Show Tool Pro).
Is there a script function doing something like this?
Is there a script function doing something like this?
About the author
Developer at frogames.com / frogames.net
#2
Just a quick guess, honestly.
03/12/2007 (11:05 am)
Not directly, as far as I am aware, but you could look at the TSShapeConstructor that's appropriate for the model and dump out the sequence[x] dataset, then filter it.Just a quick guess, honestly.
#3
I manage to get what I need with this two new console methods in shapebase.cc:
03/18/2007 (3:31 pm)
Thanks Stephen!I manage to get what I need with this two new console methods in shapebase.cc:
//MF
ConsoleMethod( ShapeBase, getSequencesCount, S32, 2, 2, "Get the number of sequences for this player")
{
return object->getShape()->sequences.size();
}
ConsoleMethod( ShapeBase, getSequenceName, const char*, 3, 3, "(S32 SequenceNumber)")
{
S32 i = dAtoi(argv[2]);
return object->getShape()->getName(object->getShape()->sequences[i].nameIndex);
}
//FM
Torque Owner Mathieu