[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4725] trunk/py/scripts/addons/ io_scene_fbx/import_fbx.py: tweaks to xor use.

Campbell Barton ideasman42 at gmail.com
Mon Sep 2 09:46:31 CEST 2013


Revision: 4725
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4725
Author:   campbellbarton
Date:     2013-09-02 07:46:31 +0000 (Mon, 02 Sep 2013)
Log Message:
-----------
tweaks  to xor use.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_fbx/import_fbx.py

Modified: trunk/py/scripts/addons/io_scene_fbx/import_fbx.py
===================================================================
--- trunk/py/scripts/addons/io_scene_fbx/import_fbx.py	2013-09-02 06:24:26 UTC (rev 4724)
+++ trunk/py/scripts/addons/io_scene_fbx/import_fbx.py	2013-09-02 07:46:31 UTC (rev 4725)
@@ -616,7 +616,7 @@
                 poly_loop_starts.append(poly_loop_prev)
                 poly_loop_totals.append((i - poly_loop_prev) + 1)
                 poly_loop_prev = i + 1
-                index = index ^ -1
+                index ^= -1
             l.vertex_index = index
 
         mesh.polygons.add(len(poly_loop_starts))
@@ -635,10 +635,11 @@
 
         edge_index = 0
         for i in fbx_edges:
-            if fbx_polys[i] >= 0:
-                e_a, e_b = fbx_polys[i], fbx_polys[i + 1]
+            e_a = fbx_polys[i]
+            if e_a >= 0:
+                e_b = fbx_polys[i + 1]
                 if e_b < 0:
-                    e_b = e_b ^ -1
+                    e_b ^= -1
             else:
                 # Last index of polygon, wrap back to the start.
 
@@ -647,7 +648,8 @@
                 j = i - 1
                 while j >= 0 and fbx_polys[j] >= 0:
                     j -= 1
-                e_a, e_b = fbx_polys[i] ^ -1, fbx_polys[j + 1]
+                e_a ^= -1
+                e_b = fbx_polys[j + 1]
 
             edges_conv[edge_index] = e_a
             edges_conv[edge_index + 1] = e_b



More information about the Bf-extensions-cvs mailing list