Skip to content
Snippets Groups Projects
Commit 40367bf3 authored by Campbell Barton's avatar Campbell Barton
Browse files

ensure vector/matrix sizes are usable.

parent 84c40946
No related branches found
No related tags found
No related merge requests found
...@@ -43,8 +43,12 @@ def console_math_data(): ...@@ -43,8 +43,12 @@ def console_math_data():
var_type = type(var) var_type = type(var)
if var_type is Matrix: if var_type is Matrix:
if var.col_size != 4 or var.row_size != 4:
var = var.copy().resize4x4()
data_matrix[key] = var data_matrix[key] = var
elif var_type is Vector: elif var_type is Vector:
if len(var) < 3:
var = var.copy().resize3D()
data_vector[key] = var data_vector[key] = var
elif var_type is Quaternion: elif var_type is Quaternion:
data_quat[key] = var data_quat[key] = var
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment