Math Vis Console - fixed errors with invalid objects in console locals #104958

Closed
Andrej wants to merge 3 commits from Andrej730/blender-addons:math_vis_fix_invalid_objects into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 7 additions and 0 deletions

View File

@ -155,6 +155,13 @@ def console_math_data():
if not disp:
continue
# In case `var` is a RNA struct 'proxy', check if the underlying RNA data is still valid.
# It can become invalid due to Blender data being freed or re-allocated e.g.
try:
hasattr(var, "bl_rna")
except ReferenceError:
continue
if isinstance(var, Matrix):
if len(var.col) != 4 or len(var.row) != 4:
if len(var.col) == len(var.row):