Math Vis Console - fixed errors with invalid objects in console locals #104958
@ -3,7 +3,6 @@
|
|||||||
# 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
|
|
||||||
|
|
||||||
Andrej730 marked this conversation as resolved
Outdated
|
|||||||
|
|
||||||
def console_namespace():
|
def console_namespace():
|
||||||
@ -155,9 +154,9 @@ def console_math_data():
|
|||||||
disp, lock = state_prop.state
|
disp, lock = state_prop.state
|
||||||
if not disp:
|
if not disp:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# avoid bpy types to avoid possible errors caused by invalidated objects
|
# avoid bpy types to avoid possible errors caused by invalidated objects
|
||||||
if isinstance(var, bpy_types.ID):
|
if isinstance(var, bpy.types.ID):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(var, Matrix):
|
if isinstance(var, Matrix):
|
||||||
|
Loading…
Reference in New Issue
Block a user
It looks like
bpy.types
works just as well, why not use that?Agreed, fixed.