title: Nuke Viewer set framerange trouble
body: <p>I'm writing a timeline synchronization script in Nuke10. 
  I should change global frame settings. Example:</p>
  
  <pre><code>nuke.root().knob('first_frame').setValue(1)
  nuke.root().knob('last_frame').setValue(100)
  </code></pre>
  
  <p>After that i should change viewer playback range. Example:</p>
  
  <pre><code>vv = nuke.activeViewer().node()
  vv['frame_range_lock'].setValue(True)
  vv['frame_range'].setValue('5-40')
  </code></pre>
  
  <p>Separately it's worked. But together - not. At start i have global frame range 1-10. And when i run all that's lines - frame range set to 1-100 but playback range set to 5-10. </p>
  
  <p>I add command in the middle of the script to check playback range:</p>
  
  <pre><code>nuke.root().knob('first_frame').setValue(1)
  nuke.root().knob('last_frame').setValue(100)
  
  x = vv.playbackRange()
  print(x)
  
  vv['frame_range_lock'].setValue(True)
  vv['frame_range'].setValue('5-40')
  </code></pre>
  
  <p>it's print:</p>
  
  <pre><code># Result: 1-10
  </code></pre>
  
  <p>I think the problem is that the data in the viewer is not updated until the script finishes running. </p>
  
  <p>How do I force a nuke to refresh the viewer? </p>
  
  <p>Or there may be a command waiting to complete the update of previous commands?</p>
  
  <p>Or it can be necessary to specify in a viewer a frame range?</p>