новая структура проекта

This commit is contained in:
2026-04-20 21:04:25 +04:00
parent 1fe2a72ef1
commit 1a56b22e38
1932 changed files with 1886 additions and 22779 deletions
@@ -0,0 +1,44 @@
from ..utils.misc import singleton
class _BaseLock:
_update_lock: int
def __enter__(self):
self._update_lock += 1
def __exit__(self, exc_type, exc_val, exc_tb):
self._update_lock -= 1
def push(self):
""" Manually enter the locking scope. """
self._update_lock += 1
def pop(self):
""" Manually exit the locking scope. """
self._update_lock -= 1
@property
def status(self) -> bool:
"""
Test if depsgraph handlers are locked now.
:return: True if locked, else False.
"""
return bool(self._update_lock)
@singleton
class DepsgraphLock(_BaseLock):
"""
Locks all depsgraph handler operations. Ensures no automated UI takss are handled in enclosed code.
"""
_update_lock: int = 0
@singleton
class UIPropUpdateLock(_BaseLock):
"""
Locks all update() callback in bpy.props custom defined properties that support locking.
"""
_update_lock: int = 0