Math Vis Console - fixed errors with invalid objects in console locals #104958
@ -155,8 +155,11 @@ def console_math_data():
|
|||||||
if not disp:
|
if not disp:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# avoid bpy types to avoid possible errors caused by invalidated objects
|
# In case `var` is a RNA struct 'proxy', check if the underlying RNA data is still valid.
|
||||||
if isinstance(var, bpy.types.ID):
|
# It can become invalid due to Blender data being freed or re-allocated e.g.
|
||||||
|
try:
|
||||||
|
hasattr(var, "bl_rna")
|
||||||
|
except ReferenceError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(var, Matrix):
|
if isinstance(var, Matrix):
|
||||||
|
Loading…
Reference in New Issue
Block a user