Math Vis Console - fixed errors with invalid objects in console locals #104958
@ -3,6 +3,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
from _bpy import types as bpy_types
|
||||||
|
|
||||||
|
|
||||||
def console_namespace():
|
def console_namespace():
|
||||||
@ -155,6 +156,10 @@ def console_math_data():
|
|||||||
if not disp:
|
if not disp:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# avoid bpy types to avoid possible errors caused by invalidated objects
|
||||||
|
if isinstance(var, bpy_types.ID):
|
||||||
|
continue
|
||||||
|
|
||||||
if isinstance(var, Matrix):
|
if isinstance(var, Matrix):
|
||||||
if len(var.col) != 4 or len(var.row) != 4:
|
if len(var.col) != 4 or len(var.row) != 4:
|
||||||
if len(var.col) == len(var.row):
|
if len(var.col) == len(var.row):
|
||||||
|
Loading…
Reference in New Issue
Block a user