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.
Showing only changes of commit c1099e6fde - Show all commits

View File

@ -155,8 +155,11 @@ def console_math_data():
if not disp:
continue
# avoid bpy types to avoid possible errors caused by invalidated objects
if isinstance(var, bpy.types.ID):
# 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):