Procedurally Generating animated 3D Models (and textures)?

Well, this sure was the most difficult thing I had done before.
But it wasnt impossible. I got most of the stuff figured out and working, only things are perhaps assigning the bones to vertices and setting weights part, and setting the animation transforms for each frame. that part is a bit weird.
[Procedural character skeleton hierarchy generation?)
drwr posted a snippet there:

from direct.directbase.DirectStart import *
from pandac.PandaModules import *
from direct.actor.Actor import Actor

# Create a character.
ch = Character('simplechar')
bundle = ch.getBundle(0)
skeleton = PartGroup(bundle, '<skeleton>')

# Create the joint hierarchy.
root = CharacterJoint(ch, bundle, skeleton, 'root',
                      Mat4.identMat())
hjoint = CharacterJoint(ch, bundle, root, 'hjoint',
                        Mat4.translateMat(Vec3(10, 0, 0)))
vjoint = CharacterJoint(ch, bundle, hjoint, 'vjoint',
                        Mat4.translateMat(Vec3(0, 0, 10)))

# Create a TransformBlendTable, listing all the different combinations
# of joint assignments we will require for our vertices.
root_trans = JointVertexTransform(root)
hjoint_trans = JointVertexTransform(hjoint)
vjoint_trans = JointVertexTransform(vjoint)

tbtable = TransformBlendTable()
t0 = tbtable.addBlend(TransformBlend())
t1 = tbtable.addBlend(TransformBlend(root_trans, 1.0))
t2 = tbtable.addBlend(TransformBlend(hjoint_trans, 1.0))
t3 = tbtable.addBlend(TransformBlend(vjoint_trans, 1.0))
t4 = tbtable.addBlend(TransformBlend(hjoint_trans, 0.7, vjoint_trans, 0.3))

# Create a GeomVertexFormat to represent the vertices.  We can store
# the regular vertex data in the first array, but we also need a
# second array to hold the transform blend index, which associates
# each vertex with one row in the above tbtable, to give the joint
# assignments for that vertex.
array1 = GeomVertexArrayFormat()
array1.addColumn(InternalName.make('vertex'),
                3, Geom.NTFloat32, Geom.CPoint)
array2 = GeomVertexArrayFormat()
array2.addColumn(InternalName.make('transform_blend'),
                 1, Geom.NTUint16, Geom.CIndex)
format = GeomVertexFormat()
format.addArray(array1)
format.addArray(array2)
aspec = GeomVertexAnimationSpec()
aspec.setPanda()
format.setAnimation(aspec)
format = GeomVertexFormat.registerFormat(format)

# Create a GeomVertexData and populate it with vertices.
vdata = GeomVertexData('vdata', format, Geom.UHStatic)
vdata.setTransformBlendTable(tbtable)
vwriter = GeomVertexWriter(vdata, 'vertex')
twriter = GeomVertexWriter(vdata, 'transform_blend')

vwriter.addData3f(0, 0, 0)
twriter.addData1i(t1)

vwriter.addData3f(10, 0, 0)
twriter.addData1i(t2)

vwriter.addData3f(10, 0, 10)
twriter.addData1i(t3)

vwriter.addData3f(8, 0, 2)
twriter.addData1i(t4)

# Be sure to tell the tbtable which of those vertices it will be
# animating (in this example, all of them).
tbtable.setRows(SparseArray.lowerOn(vdata.getNumRows()))

# Create a GeomTriangles to render the geometry
tris = GeomTriangles(Geom.UHStatic)
tris.addVertices(2, 3, 1)
tris.closePrimitive()
tris.addVertices(1, 3, 0)
tris.closePrimitive()

# Create a Geom and a GeomNode to store that in the scene graph.
geom = Geom(vdata)
geom.addPrimitive(tris)
gnode = GeomNode('gnode')
gnode.addGeom(geom)
ch.addChild(gnode)

# Now create the animation tables.  (We could also load just this part
# from an egg file, if we already have a compatible table ready.)
bundle = AnimBundle('simplechar', 5.0, 10)
skeleton = AnimGroup(bundle, '<skeleton>')
root = AnimChannelMatrixXfmTable(skeleton, 'root')

hjoint = AnimChannelMatrixXfmTable(root, 'hjoint')
table = [10, 11, 12, 13, 14, 15, 14, 13, 12, 11]
data = PTAFloat.emptyArray(len(table))
for i in range(len(table)):
    data.setElement(i, table[i])
hjoint.setTable(ord('x'), CPTAFloat(data))

vjoint = AnimChannelMatrixXfmTable(hjoint, 'vjoint')
table = [10, 9, 8, 7, 6, 5, 6, 7, 8, 9]
data = PTAFloat.emptyArray(len(table))
for i in range(len(table)):
    data.setElement(i, table[i])
vjoint.setTable(ord('z'), CPTAFloat(data))

wiggle = AnimBundleNode('wiggle', bundle)

# Finally, wrap the whole thing in a NodePath and pass it to the
# Actor.
np = NodePath(ch)
anim = NodePath(wiggle)
a = Actor(np, {'simplechar' : anim})
a.reparentTo(render)
a.setPos(0, 50, 0)
a.loop('simplechar')

Look at this part:

# Now create the animation tables.  (We could also load just this part
# from an egg file, if we already have a compatible table ready.)
bundle = AnimBundle('simplechar', 5.0, 10)
skeleton = AnimGroup(bundle, '<skeleton>')
root = AnimChannelMatrixXfmTable(skeleton, 'root')

hjoint = AnimChannelMatrixXfmTable(root, 'hjoint')
table = [10, 11, 12, 13, 14, 15, 14, 13, 12, 11]
data = PTAFloat.emptyArray(len(table))
for i in range(len(table)):
    data.setElement(i, table[i])
hjoint.setTable(ord('x'), CPTAFloat(data))

Now I would expect to animate the joints for each frame with a Mat4, not a Python list converted to some kind of Array object.
I would like to know what the values in the table are. I would guess scalex,scaley,scalez, roth,rotp,rotr, posx,posy,posz, but there are like 10 members. What are they?
I think completely don’t understand what those objects are.

At least I managed to make the procedural geometry, textures and bones, though.