jancory opened this issue on Jul 12, 2010 · 14 posts
lesbentley posted Tue, 13 July 2010 at 7:13 PM
I don't think there is any way to inject hand grasp channels into a figure. The best way is undoubtedly to build them into the cr2. There is a readScript method for adding channels. A cr2 is constructed that only contains channels you desire to add. To this cr2 you then add a 'readScript' line that calls (imports) the rest of the figure into the new cr2. The cr2 must be saved to the same folder as the cr2 you want to add the channels to. Then you don't load the original cr2, but your new one instead. The figure number (:#) in your new cr2 should match the number in the cr2 you are calling. It will take longer to load than a normal cr2. I have not tested this extensively but it seems to work. Below is the text of a cr2 to load V4 with hand grasp. Note the readScript line near the start of the file:
{
//V4 Hand Grasp.cr2
version
{
number 4.01
}
readScript "Victoria 4.2.cr2"
actor rHand:1
{
channels
{
handGrasp grasp
{
name GetStringRes(1028,48)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
thumbGrasp thumbGrasp
{
name GetStringRes(1028,49)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
handSpread spread
{
name GetStringRes(1028,50)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
}
}
actor lHand:1
{
channels
{
handGrasp grasp
{
name GetStringRes(1028,48)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
thumbGrasp thumbGrasp
{
name GetStringRes(1028,49)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
handSpread spread
{
name GetStringRes(1028,50)
initValue 0
hidden 0
forceLimits 0
min -100000
max 100000
trackingScale 0.2
keys
{
static 0
k 0 0
}
interpStyleLocked 0
}
}
}
}