[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54973] branches/soc-2008-mxcurioni/ release/scripts/startup/bl_operators/freestyle.py: Use sys.float_info. max instead of float('inf').

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sat Mar 2 19:27:51 CET 2013


Revision: 54973
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54973
Author:   kjym3
Date:     2013-03-02 18:27:50 +0000 (Sat, 02 Mar 2013)
Log Message:
-----------
Use sys.float_info.max instead of float('inf').
Review comment from Campbell.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py

Modified: branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py	2013-03-02 18:05:52 UTC (rev 54972)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py	2013-03-02 18:27:50 UTC (rev 54973)
@@ -16,6 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
+import sys
 import bpy
 
 from bpy.props import (EnumProperty, StringProperty)
@@ -59,7 +60,7 @@
         selection = [ob for ob in context.scene.objects if ob.select and ob.type == 'MESH' and ob.name != source.name]
         if len(selection) > 0:
             # Compute the min/max distance between selected mesh objects and the source
-            min_dist = float('inf')
+            min_dist = sys.float_info.max
             max_dist = -min_dist
             for ob in selection:
                 for vert in ob.data.vertices:




More information about the Bf-blender-cvs mailing list