[Bf-python] bvh_import.py : corrected (just 2 lines)
jms
jmsoler at free.fr
Sun Mar 20 12:31:42 CET 2005
In the current import_bvh,we ghave to modifiy these lines :
"""
if channelList[obIdx][0] != -1: # here
VAL1=lines[lineIdx][channelList[obIdx][1]]
if VAL1.find('.')==-1:
VAL1=VAL1[:len(VAL1)-6]+'.'+VAL1[-6:]
objectList[obIdx].getIpo().getCurve('LocY').addBezier((currentFrame, scale * eval(VAL1)))
if channelList[obIdx][0] != -1: # and there
VAL2=lines[lineIdx][channelList[obIdx][2]]
if VAL2.find('.')==-1:
VAL2=VAL2[:len(VAL2)-6]+'.'+VAL2[-6:]
objectList[obIdx].getIpo().getCurve('LocZ').addBezier((currentFrame, scale * eval(VAL2)))
"""
to :
"""
if channelList[obIdx][1] != -1: # here, new value = 1
VAL1=lines[lineIdx][channelList[obIdx][1]]
if VAL1.find('.')==-1:
VAL1=VAL1[:len(VAL1)-6]+'.'+VAL1[-6:]
objectList[obIdx].getIpo().getCurve('LocY').addBezier((currentFrame, scale * eval(VAL1)))
if channelList[obIdx][2] != -1: # and there, new value = 2
VAL2=lines[lineIdx][channelList[obIdx][2]]
if VAL2.find('.')==-1:
VAL2=VAL2[:len(VAL2)-6]+'.'+VAL2[-6:]
objectList[obIdx].getIpo().getCurve('LocZ').addBezier((currentFrame, scale * eval(VAL2)))
"""
-jms-
More information about the Bf-python
mailing list