[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1717] trunk/py/scripts/addons/ io_export_pc2.py: update for changes to python 3.2

Florian Meyer florianfelix at web.de
Fri Mar 18 18:36:20 CET 2011


Revision: 1717
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1717
Author:   testscreenings
Date:     2011-03-18 17:36:19 +0000 (Fri, 18 Mar 2011)
Log Message:
-----------
update for changes to python 3.2

Modified Paths:
--------------
    trunk/py/scripts/addons/io_export_pc2.py

Modified: trunk/py/scripts/addons/io_export_pc2.py
===================================================================
--- trunk/py/scripts/addons/io_export_pc2.py	2011-03-18 04:09:34 UTC (rev 1716)
+++ trunk/py/scripts/addons/io_export_pc2.py	2011-03-18 17:36:19 UTC (rev 1717)
@@ -60,14 +60,14 @@
     end = props.range_end
     sampling = float(props.sampling)
     apply_modifiers = props.apply_modifiers
-    me = ob.to_mesh(sc, apply_modifiers, 'PREVIEW')
+    me = ob.create_mesh(sc, apply_modifiers, 'PREVIEW')
     vertCount = len(me.vertices)
     sampletimes = getSampling(start, end, sampling)
     sampleCount = len(sampletimes)
     
     # Create the header
-    headerFormat='<12ciiffi'
-    headerStr = struct.pack(headerFormat, 'P','O','I','N','T','C','A','C','H','E','2','\0',
+    headerFormat='<12siiffi'
+    headerStr = struct.pack(headerFormat, b'POINTCACHE2\0',
                             1, vertCount, start, sampling, sampleCount)
 
     file = open(filepath, "wb")
@@ -75,7 +75,7 @@
     
     for frame in sampletimes:
         sc.frame_set(frame)
-        me = ob.to_mesh(sc, apply_modifiers, 'PREVIEW')
+        me = ob.create_mesh(sc, apply_modifiers, 'PREVIEW')
         
         if len(me.vertices) != vertCount:
             file.close()
@@ -200,4 +200,4 @@
     #bpy.types.VIEW3D_PT_tools_objectmode.remove(menu_func)
     
 if __name__ == "__main__":
-    register()
+    register()
\ No newline at end of file



More information about the Bf-extensions-cvs mailing list