Package nukescripts :: Module readviewscheck
[hide private]
[frames] | no frames]

Module readviewscheck

source code

Check for multiple views in files when a read node is created, by looking for a VIEW_NAMES entry in the node's metadata. Most file types won't specify views but EXR/SXR and potentially other files may do. Registers for callbacks when a Read node is created, or its 'file' knob is changed. If there are multiple views, and they do not exist on the root node, the user is asked if they should be created.

Functions [hide private]
 
createViews(views)
Add the views in a list to the root node.
source code
 
getViews(read)
Attempt to get the views from a read node's metadata.
source code
 
checkReadNodeViews(read)
Check if a read has multiple views, and if so, ask the user if they want to add them to the root node.
source code
 
onReadNodeCreated()
Callback when a Read node is created.
source code
 
onReadNodeKnobChanged()
Callback when a Read node knob changes.
source code
Variables [hide private]
  UserAlreadySaidNo = False
  __package__ = 'nukescripts'
Function Details [hide private]

getViews(read)

source code 

Attempt to get the views from a read node's metadata. Returns an empty list if no views were found or if the node is disabled.

onReadNodeCreated()

source code 

Callback when a Read node is created. Note that the knob values don't seem to be set when this callback occurs. Defer the check with a QTimer, which will cause the views check to be done when the Qt event loop next sends events.

onReadNodeKnobChanged()

source code 

Callback when a Read node knob changes. If it's the file knob, check for multi views.