Reads a header of DPX-file and returns the data in a readable form.
The returned data is formatted to be viewed with a fixed width font, like courier.
Updated to V1.1, now decodes film stocks.
Quick Example:
1. Put this script in your plugin path.
2. Launch Nuke
3. Create a read node and point it to some DPX files.
4. Create a Text-Node, select a fixed with font, like Courier, and write:
[dpxInfo decode all [value [value [input [knob name] 0].name].file]]
5. Connect the Read node to the Text-Node.
DONE. (Now, go and create a Gizmo...)
------
"Advanced" stuff:
Usage:
dpxInfo "mode" "field(s)" "filename"
mode:
"decode": Make values more human readable.
"raw": Use this if you want to decode the data yourself.
"singledecode": Decodes but does not include the fieldname in the output.
"singleraw:" Just like raw, but does not include fieldname in the output.
field(s):
can be replaced with "all" to show ALL fields in the header. (for us lazy people). Otherwise: just specify the fields you want to be read.
Throws an error when there is problem. (so it is wise to use catch-phrases...)
Examples (Not tested, just made up...):
# Print all header info.
puts "[dpxInfo decode all img.0001.dpx]"
# Do your own fancy output:
foreach {symbol value} [dpxInfo decode all img.0001.dpx] {
puts " -- ${symbol} -- ${value} --"
}
# Print timecode:
puts "[dpxInfo singledecode tvTimeCode img.0001.dpx]"
# Get width and height
set data [dpxInfo singledecode iPixelsPerLine iLinesPerImage img.0001.dpx]
set width [lindex ${data} 0]
set height [lindex ${data} 1]
# Get width and height (Tcl-array-style!)
array set header [dpxInfo decode all img.0001.dpx]
set width $header(iPixelsPerLine)
set height $header(iLinesPerImage)
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.