MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / is_registering

Function is_registering

src/bonsai/bonsai/__init__.py:84–96  ·  view source on GitHub ↗

During addon registration ``bpy.context`` and ``bpy.data`` are restricted and you can't access their properties.

()

Source from the content-addressed store, hash-verified

82
83
84def is_registering() -> bool:
85 """
86 During addon registration ``bpy.context`` and ``bpy.data`` are restricted
87 and you can't access their properties.
88 """
89 import bpy
90
91 if TYPE_CHECKING or bpy.app.version >= (5, 0, 0):
92 import _bpy_restrict_state as bpy_restrict_state
93 else:
94 import bpy_restrict_state
95
96 return isinstance(bpy.context, bpy_restrict_state._RestrictContext)
97
98
99def initialize_bbim_semver():

Callers 1

get_debug_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected