diff options
author | Daniel M. Basso <danielmbasso@gmail.com> | 2013-02-16 21:01:19 +0400 |
---|---|---|
committer | Daniel M. Basso <danielmbasso@gmail.com> | 2013-02-16 21:01:19 +0400 |
commit | 3d5172cf6bc017f929818725ccb890084617c519 (patch) | |
tree | bc37c6f9f4cd2c86147637b849ee97f7b14b699a /io_anim_c3d/import_c3d.py | |
parent | fa8c52897eda889aa4864f31546a2394435bbd92 (diff) |
markers may have duplicate labels; thanx to Jens Meisner for the bug report
Diffstat (limited to 'io_anim_c3d/import_c3d.py')
-rw-r--r-- | io_anim_c3d/import_c3d.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/io_anim_c3d/import_c3d.py b/io_anim_c3d/import_c3d.py index 0c8cd8f2..9381a537 100644 --- a/io_anim_c3d/import_c3d.py +++ b/io_anim_c3d/import_c3d.py @@ -204,6 +204,13 @@ class MarkerSet: break # pg should be 'POINT', but let's be liberal and accept any group self.markerLabels = self.paramGroups[pg].params['LABELS'].decode() + repeats = {} + for i, m in enumerate(self.markerLabels): + if m in repeats: + self.markerLabels[i] = '{}.{}'.format(m, repeats[m]) + repeats[m] += 1 + else: + repeats[m] = 1 def readMarker(self, infile): pass # ... |