mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
roy's comment
This commit is contained in:
parent
582bdb51a2
commit
45f02e8db3
5 changed files with 27 additions and 14 deletions
|
|
@ -282,3 +282,13 @@ def get_max_version():
|
|||
"""
|
||||
max_info = rt.MaxVersion()
|
||||
return max_info[7]
|
||||
|
||||
@contextlib.contextmanager
|
||||
def viewport_camera(camera):
|
||||
original = rt.viewport.getCamera()
|
||||
review_camera = rt.getNodeByName(camera)
|
||||
try:
|
||||
rt.viewport.setCamera(review_camera)
|
||||
yield
|
||||
finally:
|
||||
rt.viewport.setCamera(original)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue