[Bf-extensions-cvs] [e66713cf] master: fix T52642: math_vis - avoid eror message when defining an empty array in the blender console.

Gaia Clary noreply at git.blender.org
Sun Sep 3 20:12:12 CEST 2017


Commit: e66713cfad6e9227f85314cc80002f72e1afd0d2
Author: Gaia Clary
Date:   Sun Sep 3 20:06:45 2017 +0200
Branches: master
https://developer.blender.org/rBAe66713cfad6e9227f85314cc80002f72e1afd0d2

fix T52642: math_vis - avoid eror message when defining an empty array in the blender console.

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

M	space_view3d_math_vis/draw.py

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

diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py
index 09cb2fe2..1875afcd 100644
--- a/space_view3d_math_vis/draw.py
+++ b/space_view3d_math_vis/draw.py
@@ -113,7 +113,8 @@ def draw_callback_px():
     # lines
     if data_vector_array:
         for key, vec in data_vector_array.items():
-            draw_text(key, vec[0])
+            if vec and len(vec) > 0:
+                draw_text(key, vec[0])
 
     # matrix
     if data_matrix:



More information about the Bf-extensions-cvs mailing list