Update
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from ngSkinTools2.api import plugin
|
||||
from ngSkinTools2.api.python_compatibility import Object
|
||||
|
||||
|
||||
def suspend_updates(target):
|
||||
return SuspendUpdatesContext(target)
|
||||
|
||||
|
||||
class SuspendUpdatesContext(Object):
|
||||
def __init__(self, target):
|
||||
self.target = target
|
||||
|
||||
def __enter__(self):
|
||||
plugin.ngst2Layers(self.target, suspendUpdates=True)
|
||||
|
||||
def __exit__(self, _type, value, traceback):
|
||||
plugin.ngst2Layers(self.target, suspendUpdates=False)
|
||||
Reference in New Issue
Block a user