From 40367bf3fd605b2f7bd905fc1b8d56fae4778824 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 18 Jan 2011 02:21:58 +0000
Subject: [PATCH] ensure vector/matrix sizes are usable.

---
 space_view3d_math_vis/utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/space_view3d_math_vis/utils.py b/space_view3d_math_vis/utils.py
index a9c26ae40..5511cf306 100644
--- a/space_view3d_math_vis/utils.py
+++ b/space_view3d_math_vis/utils.py
@@ -43,8 +43,12 @@ def console_math_data():
         var_type = type(var)
 
         if var_type is Matrix:
+            if var.col_size != 4 or var.row_size != 4:
+               var = var.copy().resize4x4() 
             data_matrix[key] = var
         elif var_type is Vector:
+            if len(var) < 3:
+                var = var.copy().resize3D()
             data_vector[key] = var
         elif var_type is Quaternion:
             data_quat[key] = var
-- 
GitLab