[Bf-extensions-cvs] [f5cd384] master: Run the serialization inside a single try block.

Lukas Tönne noreply at git.blender.org
Wed Dec 10 19:20:24 CET 2014


Commit: f5cd38488e444dc43b8ca60ca4f9025952ad3c39
Author: Lukas Tönne
Date:   Wed Dec 10 19:20:04 2014 +0100
Branches: master
https://developer.blender.org/rBACf5cd38488e444dc43b8ca60ca4f9025952ad3c39

Run the serialization inside a single try block.

===================================================================

M	object_physics_meadow/blob.py

===================================================================

diff --git a/object_physics_meadow/blob.py b/object_physics_meadow/blob.py
index 9ac4b50..95d656d 100644
--- a/object_physics_meadow/blob.py
+++ b/object_physics_meadow/blob.py
@@ -185,8 +185,8 @@ def blobs_from_customprops(data):
     iter_samples_nor = iter(data['samples_nor'])
     iter_samples_idx = iter(data['samples_idx'])
 
-    while(True):
-        try:
+    try:
+        while(True):
             loc = (next(iter_loc), next(iter_loc), next(iter_loc))
             nor = (next(iter_nor), next(iter_nor), next(iter_nor))
             face_index = next(iter_face_index)
@@ -202,8 +202,8 @@ def blobs_from_customprops(data):
             blob = Blob(loc, nor, face_index)
             blob.samples = samples
             blobs.append(blob)
-        except StopIteration:
-            break
+    except StopIteration:
+        break
 
     return blobs



More information about the Bf-extensions-cvs mailing list