Remove active viewer warning.

- Because we set the context on the creation of the Root, the log error 
pop up appear unnecessarily.
- Working with viewer is Nuke workflow behaviour which should not be 
explained by the pipeline.
- Supporting finding the first viewer node in the scene.
This commit is contained in:
Toke Jepsen 2019-07-26 08:15:18 +01:00
parent 6999c2a00a
commit 414d6a888d

View file

@ -392,8 +392,11 @@ def reset_frame_range_handles():
try:
vv = nuke.activeViewer().node()
except AttributeError:
log.error("No active viewer. Select any node and hit num `1`")
return
viewer_nodes = nuke.allNodes(filter="Viewer")
if viewer_nodes:
vv = viewer_nodes[0]
else:
return
range = '{0}-{1}'.format(
int(asset["data"]["fstart"]),