Generate Read node(s) from selected Write node(s). Supports filepaths with expressions.
readFromWrite
Updated: 8 June 2016
Author: fredrik
Compatible Nuke versions: 6.2 or later
Compatibility: Linux, Mac, Windows
Read node generator v2.3, 2016-06-08
Changelog:
- v2.3:
- Bug fix: crash when knob 'use_limit' isn't available on node
- Accidentally left ReadFromWrite() at bottom of script in v2.2
- v2.2:
- Support for nodes with filepath which does not exist on disk
(will read Write node settings or incoming framerange)
- Support for additional Read/Write node option 'raw'
- v2.1:
- Fixed bug where Read node always got premultiplied
- Support for ../ in filepath/expression
- Dialog on 'filepath not found' error
- Set origfirst, origlast framerange
- Additional movie file format support (see SINGLE_FILE_FORMATS
variable)
- General cleanup of various methods for greater maintainability
- v2.0:
- Completely rewritten from scratch
- Improved detection of frame range
- Supports any padding format (not only %04d)
- Applies colorspace to Read node
- Supports not only Write nodes (see FILEPATH_KNOBS variable)
- Supports definition of 'single file image sequence' formats
(see SINGLE_FILE_FORMATS variable)
- PEP8 compliant!
Usage:
Select any Write node and run ReadFromWrite() after having sourced this
file, or put the following in your menu.py:
import readFromWrite
nuke.menu('Nuke').addCommand('Read from Write',
'readFromWrite.ReadFromWrite()',
'shift+r')
Please note:
Script is now started via ReadFromWrite() instead of the old
readfromWrite() function, so you'll have to update your scripts if you
are updating from a 1.x version.
Still untested in Linux. Let me know if it works there and if so, I can tick the 'Linux' checkbox.
Released under the MIT license
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.