[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4283] trunk/py/scripts/addons/ io_anim_c3d: markers may have duplicate labels; thanx to Jens Meisner for the bug report

Daniel M. Basso danielmbasso at gmail.com
Sat Feb 16 18:01:19 CET 2013


Revision: 4283
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4283
Author:   dmbasso
Date:     2013-02-16 17:01:19 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
markers may have duplicate labels; thanx to Jens Meisner for the bug report

Modified Paths:
--------------
    trunk/py/scripts/addons/io_anim_c3d/__init__.py
    trunk/py/scripts/addons/io_anim_c3d/import_c3d.py

Modified: trunk/py/scripts/addons/io_anim_c3d/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_anim_c3d/__init__.py	2013-02-16 08:12:03 UTC (rev 4282)
+++ trunk/py/scripts/addons/io_anim_c3d/__init__.py	2013-02-16 17:01:19 UTC (rev 4283)
@@ -25,8 +25,8 @@
 bl_info = {
     "name": "C3D Graphics Lab Motion Capture file (.c3d)",
     "author": "Daniel Monteiro Basso <daniel at basso.inf.br>",
-    "version": (2012, 7, 11, 1),
-    "blender": (2, 63, 0),
+    "version": (2013, 2, 16, 1),
+    "blender": (2, 65, 9),
     "location": "File > Import",
     "description": "Imports C3D Graphics Lab Motion Capture files",
     "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"

Modified: trunk/py/scripts/addons/io_anim_c3d/import_c3d.py
===================================================================
--- trunk/py/scripts/addons/io_anim_c3d/import_c3d.py	2013-02-16 08:12:03 UTC (rev 4282)
+++ trunk/py/scripts/addons/io_anim_c3d/import_c3d.py	2013-02-16 17:01:19 UTC (rev 4283)
@@ -204,6 +204,13 @@
                 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  # ...



More information about the Bf-extensions-cvs mailing list