Open OlafHaag opened 6 years ago
Hey there! It seems this issue is fixed. Could you please bump the version and push it to https://pypi.org/project/bvh/? Thanks a lot! I really appreciate your work, it helped me to build upon it (https://github.com/OlafHaag/bvh-tools) and add features like writing back to BVH and other formats. That's why I need an updated version of your bvh module on PYPI as a dependency.
Thanks a lot for the script, it's great! But I stumbled across an issue: The Bvh class member functions _frame_jointchannel , _frame_jointchannels and _frames_jointchannels are all accepting a value argument, yet this argument can't do anything. In line 148, 157, and 174 there's a check
if channel_index == -1 and value is not None:
, but channel_index can never be -1, because it's retrieved byself.joint_channels(joint).index(channel)
which just throws a ValueError if it can't find channel (e.g. 'Zposition' is not in list), because index() is a simple list member function.I guess that value was supposed to be a fallback value if the channel wasn't found and the idea was to do a similar check as in _joint_parentindex, but was forgotten?