mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix code (if not found should not have been nest into the for loop) + simplify logic
This commit is contained in:
parent
e79f1ef4b9
commit
c1b305a446
1 changed files with 2 additions and 5 deletions
|
|
@ -37,13 +37,10 @@ class RenderSettings(object):
|
|||
def set_render_camera(self, selection):
|
||||
for sel in selection:
|
||||
# to avoid Attribute Error from pymxs wrapper
|
||||
found = False
|
||||
if rt.classOf(sel) in rt.Camera.classes:
|
||||
found = True
|
||||
rt.viewport.setCamera(sel)
|
||||
break
|
||||
if not found:
|
||||
raise RuntimeError("Active Camera not found")
|
||||
return
|
||||
raise RuntimeError("Active Camera not found")
|
||||
|
||||
def render_output(self, container):
|
||||
folder = rt.maxFilePath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue