opencolorio-1.0.9~dfsg0.orig/0000755000175000017500000000000012260232052014266 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/0000755000175000017500000000000012225107126015374 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/nuke/0000755000175000017500000000000012225107126016336 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/nuke/examples/0000755000175000017500000000000012225107126020154 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/nuke/examples/ocio_to_colorlookup_rgb.py0000644000175000017500000000123512225107126025444 0ustar mfvmfvimport SpImport OCIO = SpImport.SpComp2("PyOpenColorIO",2) #import PyOpenColorIO as OCIO c = OCIO.GetCurrentConfig() processor = c.getProcessor(OCIO.FileTransform('woz_qt_to_mxfva.spi1d', interpolation=OCIO.Constants.INTERP_LINEAR)) node = nuke.createNode("ColorLookup") node.setName("woz_post_film") knob = node['lut'] knob.removeKeyAt(0.0, 1) knob.removeKeyAt(1.0, 1) knob.removeKeyAt(0.0, 2) knob.removeKeyAt(1.0, 2) knob.removeKeyAt(0.0, 3) knob.removeKeyAt(1.0, 3) SIZE = 11 for i in xrange(SIZE): x = i/(SIZE-1.0) y = processor.applyRGB((x,x,x)) knob.setValueAt(y[0],x, 1) knob.setValueAt(y[1],x, 2) knob.setValueAt(y[2],x, 3) opencolorio-1.0.9~dfsg0.orig/share/nuke/examples/ocio_to_colorlookup_all.py0000644000175000017500000000153712225107126025447 0ustar mfvmfv#import SpImport #OCIO = SpImport.SpComp2("PyOpenColorIO", 2) c = OCIO.GetCurrentConfig() cs_to_lin = c.getProcessor(OCIO.Constants.ROLE_COMPOSITING_LOG, OCIO.Constants.ROLE_SCENE_LINEAR) node = nuke.createNode("ColorLookup") node.setName("sm2_slg_to_ln") knob = node['lut'] knob.removeKeyAt(0.0) knob.removeKeyAt(1.0) node2 = nuke.createNode("ColorLookup") node2.setName("sm2_ln_to_slg") knob2 = node2['lut'] knob2.removeKeyAt(0.0) knob2.removeKeyAt(1.0) def Fit(value, fromMin, fromMax, toMin, toMax): if fromMin == fromMax: raise ValueError("fromMin == fromMax") return (value - fromMin) / (fromMax - fromMin) * (toMax - toMin) + toMin SIZE = 2**10 for i in xrange(SIZE): x = i/(SIZE-1.0) x = Fit(x, 0.0, 1.0, -0.125, 1.5) y = cs_to_lin.applyRGB((x,x,x))[1] knob.setValueAt(y,x) knob2.setValueAt(x,y) opencolorio-1.0.9~dfsg0.orig/share/nuke/examples/colorlookup_to_spi1d.py0000644000175000017500000000102512225107126024676 0ustar mfvmfv def WriteSPI1D(filename, fromMin, fromMax, data): f = file(filename,'w') f.write("Version 1\n") f.write("From %s %s\n" % (fromMin, fromMax)) f.write("Length %d\n" % len(data)) f.write("Components 1\n") f.write("{\n") for value in data: f.write(" %s\n" % value) f.write("}\n") f.close() knob = nuke.selectedNode()['lut'] SIZE = 2**10 data = [] for i in xrange(SIZE): x = i/(SIZE-1.0) data.append(knob.getValueAt(x)) WriteSPI1D('/tmp/colorlookup.spi1d', 0.0, 1.0, data) opencolorio-1.0.9~dfsg0.orig/share/nuke/ocio_icon.png0000644000175000017500000000471312225107126021012 0ustar mfvmfvPNG  IHDRw=iCCPICC ProfilexTkA6n"Zkx"IYhE6bk Ed3In6&*Ezd/JZE(ޫ(b-nL~7}ov r4 Ril|Bj A4%UN$As{z[V{wwҶ@G*q Y<ߡ)t9Nyx+=Y"|@5-MS%@H8qR>׋infObN~N>! ?F?aĆ=5`5_M'Tq. VJp8dasZHOLn}&wVQygE0  HPEaP@<14r?#{2u$jtbDA{6=Q<("qCA*Oy\V;噹sM^|vWGyz?W15s-_̗)UKuZ17ߟl;=..s7VgjHUO^gc)1&v!.K `m)m$``/]?[xF QT*d4o(/lșmSqens}nk~8X<R5 vz)Ӗ9R,bRPCRR%eKUbvؙn9BħJeRR~NցoEx pHYs  IDATH } lUϱW^t{ .)UZ(Bh"FFI#Q DmMEt9.rtvcfwf|o`O^?QU< l61jB kLZ[n7oެ9k'H }v;ZZZI%00 g{M!L]]vﮐ |H !AA%z//;gP`3kDBۍMM/$b! '=ޙSOĐ̤Am۲??];jMeeLI F:(b\UeY,IR-BQ,FWOo-Qplʹ)pKeRmqGUmxw&2&^=lH >w8\Fh2_D rE__vV S*&j[,N06D=CH4[xyb,]2AEy qJ6`$ <\{=QM;?gT9 r,mɨiW): X, b_V>߱.^Au%B*9U-<>;+Z49o~KUW=9WO,9B/TQ|& Z ߴf͢q@:z{fɰX&Pfo[7yWIObY EE"'(EFOxӹ׏cKL${jU|]vW9vd(rQ^O'17Yq)FLa?#ACE,zKJb6M{Z@M$64 ڧcZʹʐ(G~ӹ?OU_ E +eԁK},{#;wo0_FW#"j_l4g5V gi%~'Wlq{ȵ©3ruƶ0!m[)ME1r MJ4 Wvh 蓀[)(>(˦ gc 4>u켅'Ɣtc_$.*˲*aZ8ǧggժ.q~;yi@CPAԔTՖs~TQQvq HQk?Qݫ6872PO 0EYtL@ؖ5ܜyٹtkj0 TYyzkv5X믢IHuVgozoG러;"#!LmXV6Gr[$DPX +WHիҬNϴXKͻ81҇CO > 3^W5 G 'aRRlRsg/ eBPpt:GG‘ Ԕ> G"G[h xh=9 MkRVkxW037֦u̠_A崌b4G[u(IENDB`opencolorio-1.0.9~dfsg0.orig/share/nuke/menu.py0000644000175000017500000000211012225107126017646 0ustar mfvmfvimport os import nuke import ocionuke.cdl def ocio_populate_menu(): """Adds OCIO nodes to a menu in Color """ m_nodes = nuke.toolbar('Nodes') m_color = m_nodes.findItem("Color") m_ocio = m_color.addMenu("OCIO", icon = "ocio_icon.png") allplugs = nuke.plugins(nuke.ALL | nuke.NODIR, "OCIO*.so", "OCIO*.dylib", "OCIO*.dll") for fname in allplugs: nodeMenu = nodeClass = os.path.splitext(fname)[0] # strip .so extension # Put a space after "OCIO" to match The Foundry's convention (huh?) if nodeMenu.startswith("OCIO"): nodeMenu = nodeMenu.replace("OCIO", "OCIO ", 1) # Only add the item if it doesn't exist if not m_ocio.findItem(nodeMenu): m_ocio.addCommand(nodeMenu, lambda nodeClass=nodeClass: nuke.createNode(nodeClass)) m_utils = m_ocio.addMenu("Utils") m_utils.addCommand("Import .ccc to CDL nodes", ocionuke.cdl.import_multiple_from_ccc) m_utils.addCommand("Export selected CDL's to .ccc", ocionuke.cdl.export_multiple_to_ccc) if __name__ == "__main__": ocio_populate_menu() opencolorio-1.0.9~dfsg0.orig/share/nuke/init.py0000644000175000017500000000114512225107126017654 0ustar mfvmfvimport nuke EBANNER = "OCIO Error: " OCIO = None def load_ocio_plugins(): """Loads the PyOpenColorIO module and the OCIO-prefixed nodes """ global OCIO try: import PyOpenColorIO as OCIO except Exception, e: print '%s%s\n%s' % (EBANNER, 'Loading OCIO python module', e) allplugs = nuke.plugins(nuke.ALL | nuke.NODIR, "OCIO*.so", "OCIO*.dylib", "OCIO*.dll") for p in allplugs: try: nuke.load(p) except Exception, e: print '%sLoading OCIO node %s\n%s' % (EBANNER, p, e) if __name__ == "__main__": load_ocio_plugins() opencolorio-1.0.9~dfsg0.orig/share/nuke/ocionuke/0000755000175000017500000000000012225107126020152 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/nuke/ocionuke/viewer.py0000644000175000017500000000352712225107126022034 0ustar mfvmfvimport nuke def register_viewers(also_remove = "default"): """Registers the a viewer process for each display device/view, and sets the default viewer process. ``also_remove`` can be set to either: - "default" to remove the default sRGB/rec709 viewer processes - "all" to remove all processes - "none" to leave existing viewer processes untouched """ if also_remove not in ("default", "none", "all"): raise ValueError("also_remove should be set to 'default', 'none' or 'all'") if also_remove == "default": nuke.ViewerProcess.unregister('rec709') nuke.ViewerProcess.unregister('sRGB') nuke.ViewerProcess.unregister('None') elif also_remove == "all": # Unregister all processes, including None, which should be defined in config.ocio for curname in nuke.ViewerProcess.registeredNames(): nuke.ViewerProcess.unregister(curname) # Formats the display and transform, e.g "Film1D (sRGB)" DISPLAY_UI_FORMAT = "%(view)s (%(display)s)" import PyOpenColorIO as OCIO config = OCIO.GetCurrentConfig() # For every display, loop over every view for display in config.getDisplays(): for view in config.getViews(display): # Register the node nuke.ViewerProcess.register( name = DISPLAY_UI_FORMAT % {'view': view, "display": display}, call = nuke.nodes.OCIODisplay, args = (), kwargs = {"display": display, "view": view, "layer": "all"}) # Get the default display and view, set it as the default used on Nuke startup defaultDisplay = config.getDefaultDisplay() defaultView = config.getDefaultView(defaultDisplay) nuke.knobDefault( "Viewer.viewerProcess", DISPLAY_UI_FORMAT % {'view': defaultView, "display": defaultDisplay}) opencolorio-1.0.9~dfsg0.orig/share/nuke/ocionuke/__init__.py0000644000175000017500000000000012225107126022251 0ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/nuke/ocionuke/cdl.py0000644000175000017500000002052712225107126021274 0ustar mfvmfv"""Various utilities relating to the OCIOCDLTransform node """ import nuke import PyOpenColorIO as OCIO import xml.etree.ElementTree as ET def _node_to_cdltransform(node): """From an OCIOCDLTransform node, returns a PyOpenColorIO CDLTransform object, which could be used to write XML """ # Color_Knob.value returns single float if control is not # expanded, so use value(index=...) to always get three values slope = [node['slope'].value(x) for x in range(3)] offset = [node['offset'].value(x) for x in range(3)] power = [node['power'].value(x) for x in range(3)] sat = node['saturation'].value() cccid = node['cccid'].value() cdl = OCIO.CDLTransform() cdl.setSlope(slope) cdl.setOffset(offset) cdl.setPower(power) cdl.setSat(sat) cdl.setID(cccid) return cdl def _cdltransform_to_node(cdl, node): """From an XML string, populates the parameters on an OCIOCDLTransform node """ # Treat "node" as a dictionary of knobs, as the "node" argument could be # a the return value of PythonPanel.knob(), as in SelectCCCIDPanel node['slope'].setValue(cdl.getSlope()) node['offset'].setValue(cdl.getOffset()) node['power'].setValue(cdl.getPower()) node['saturation'].setValue(cdl.getSat()) node['cccid'].setValue(cdl.getID()) def _xml_to_cdltransforms(xml): """Given some XML as a string, returns a list of CDLTransform objects for each ColorCorrection (returns a one-item list for a .cc file) """ tree = ET.fromstring(xml) # Strip away xmlns for elem in tree.getiterator(): if elem.tag.startswith("{"): elem.tag = elem.tag.partition("}")[2] filetype = tree.tag if filetype == "ColorCorrection": ccxml = ET.tostring(tree) cdl = OCIO.CDLTransform() cdl.setXML(ccxml) return [cdl] elif filetype == "ColorCorrectionCollection": allcdl = [] for cc in tree.getchildren(): if cc.tag != "ColorCorrection": continue ccxml = ET.tostring(cc) cdl = OCIO.CDLTransform() cdl.setXML(ccxml) allcdl.append(cdl) return allcdl else: raise RuntimeError( "The supplied file did not have the correct root element, expected" " 'ColorCorrection' or 'ColorCorrectionCollection', got %r" % (filetype)) def _cdltransforms_to_xml(allcc): """Given a list of CDLTransform objects, returns an XML string """ root = ET.Element("ColorCorrectionCollection") root.attrib['xmlns'] = 'urn:ASC:CDL:v1.2' for cc in allcc: cur = ET.fromstring(cc.getXML()) # Strip away xmlns for elem in cur.getiterator(): if elem.tag.startswith("{"): elem.tag = elem.tag.partition("}")[2] root.append(cur) return ET.tostring(root) def SelectCCCIDPanel(*args, **kwargs): # Wrap class definition in a function, so nukescripts.PythonPanel # is only accessed when ``SelectCCCIDPanel()`` is called, # https://github.com/imageworks/OpenColorIO/issues/277 import nukescripts class _SelectCCCIDPanel(nukescripts.PythonPanel): """Allows the user to select from a list of CDLTransform objects """ def __init__(self, allcdl): super(_SelectCCCIDPanel, self).__init__() self.available = {} for cur in allcdl: self.available[cur.getID()] = cur self.addKnob(nuke.Enumeration_Knob("cccid", "cccid", self.available.keys())) self.addKnob(nuke.Text_Knob("divider")) self.addKnob(nuke.Color_Knob("slope")) self.addKnob(nuke.Color_Knob("offset")) self.addKnob(nuke.Color_Knob("power")) self.addKnob(nuke.Double_Knob("saturation")) def selected(self): return self.available[self.knobs()['cccid'].value()] def knobChanged(self, knob): """When the user selects a cccid, a grade-preview knobs are set. This method is triggered when any knob is changed, which has the useful side-effect of preventing changing the preview values, while keeping them selectable for copy-and-paste. """ _cdltransform_to_node(self.selected(), self.knobs()) return _SelectCCCIDPanel(*args, **kwargs) def export_as_cc(node = None, filename = None): """Export a OCIOCDLTransform node as a ColorCorrection XML file (.cc) If node is None, "nuke.thisNode()" will be used. If filename is not specified, the user will be prompted. """ if node is None: node = nuke.thisNode() cdl = _node_to_cdltransform(node) if filename is None: ccfilename = nuke.getFilename("Color Correction filename", pattern = "*.cc") if ccfilename is None: # User clicked cancel return xml = cdl.getXML() print "Writing to %s - contents:\n%s" % (ccfilename, xml) open(ccfilename, "w").write(xml) def import_cc_from_xml(node = None, filename = None): """Import a ColorCorrection XML (.cc) into a OCIOCDLTransform node. If node is None, "nuke.thisNode()" will be used. If filename is not specified, the user will be prompted. """ if node is None: node = nuke.thisNode() if filename is None: ccfilename = nuke.getFilename("Color Correction filename", pattern = "*.cc *.ccc") if ccfilename is None: # User clicked cancel return xml = open(ccfilename).read() allcc = _xml_to_cdltransforms(xml) if len(allcc) == 1: _cdltransform_to_node(allcc[0], node) elif len(allcc) > 1: do_selectcccid = nuke.ask( "Selected a ColorCorrectionCollection, do you wish to select a ColorCorrection from this file?") if do_selectcccid: sel = SelectCCCIDPanel(allcc) okayed = sel.showModalDialog() if okayed: cc = sel.selected() _cdltransform_to_node(cc, node) else: return else: nuke.message("The supplied file (%r) contained no ColorCorrection's" % ccfilename) return def export_multiple_to_ccc(filename = None): """Exported all selected OCIOCDLTransform nodes to a ColorCorrectionCollection XML file (.ccc) """ if filename is None: filename = nuke.getFilename("Color Correction XML file", pattern = "*.cc *.ccc") if filename is None: # User clicked cancel return allcc = [] for node in nuke.selectedNodes("OCIOCDLTransform"): allcc.append(_node_to_cdltransform(node)) xml = _cdltransforms_to_xml(allcc) print "Writing %r, contents:\n%s" % (filename, xml) open(filename, "w").write(xml) def import_multiple_from_ccc(filename = None): """Import a ColorCorrectionCollection file (.ccc) into multiple OCIOCDLTransform nodes. Also creates a single node for a .cc file """ if filename is None: filename = nuke.getFilename("Color Correction XML file", pattern = "*.cc *.ccc") if filename is None: # User clicked cancel return xml = open(filename).read() allcc = _xml_to_cdltransforms(xml) def _make_node(cdl): newnode = nuke.nodes.OCIOCDLTransform(inputs = nuke.selectedNodes()[:1]) _cdltransform_to_node(cdl, newnode) newnode['label'].setValue("id: [value cccid]") if len(allcc) > 0: for cc in allcc: _make_node(cc) else: nuke.message("The supplied file (%r) contained no ColorCorrection's" % filename) def select_cccid_for_filetransform(node = None, fileknob = 'file', cccidknob = 'cccid'): """Select cccid button for the OCIOFileTransform node, also used in OCIOCDLTransform. Presents user with list of cccid's within the specified .ccc file, and sets the cccid knob to the selected ID. """ if node is None: node = nuke.thisNode() filename = node[fileknob].value() try: xml = open(filename).read() except IOError, e: nuke.message("Error opening src file: %s" % e) raise allcc = _xml_to_cdltransforms(xml) if len(allcc) == 0: nuke.message("The file (%r) contains no ColorCorrection's") return sel = SelectCCCIDPanel(allcc) okayed = sel.showModalDialog() if okayed: node[cccidknob].setValue(sel.selected().getID()) opencolorio-1.0.9~dfsg0.orig/share/cmake/0000755000175000017500000000000012225107126016454 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/cmake/OCIOMacros.cmake0000644000175000017500000002642612225107126021366 0ustar mfvmfvMACRO(messageonce MSG) if(CMAKE_FIRST_RUN) message(STATUS ${MSG}) endif() ENDMACRO() MACRO(OCIOFindOpenGL) if(APPLE) INCLUDE_DIRECTORIES(/System/Library/Frameworks) endif() # Find OpenGL find_package(OpenGL) if(OPENGL_FOUND) message(STATUS "Found OpenGL library ${OPENGL_LIBRARY}") message(STATUS "Found OpenGL includes ${OPENGL_INCLUDE_DIR}") else() message(STATUS "OpenGL not found") endif() # Find GLUT find_package(GLUT) if(GLUT_FOUND) message(STATUS "Found GLUT library ${GLUT_LIBRARY}") else() message(STATUS "GLUT not found") endif() # Find GLEW set(GLEW_VERSION 1.5.1) FIND_PATH(GLEW_INCLUDES GL/glew.h /usr/include /usr/local/include /sw/include /opt/local/include DOC "The directory where GL/glew.h resides") FIND_LIBRARY(GLEW_LIBRARIES NAMES GLEW glew /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib PATHS DOC "The GLEW library") if(GLEW_INCLUDES AND GLEW_LIBRARIES) set(GLEW_FOUND TRUE) message(STATUS "Found GLEW library ${GLEW_LIBRARIES}") message(STATUS "Found GLEW includes ${GLEW_INCLUDES}") else() message(STATUS "GLEW not found") set(GLEW_FOUND FALSE) endif() ENDMACRO() MACRO(OCIOFindOpenImageIO) if(OIIO_PATH) message(STATUS "OIIO path explicitly specified: ${OIIO_PATH}") endif() if(OIIO_INCLUDE_PATH) message(STATUS "OIIO INCLUDE_PATH explicitly specified: ${OIIO_INCLUDE_PATH}") endif() if(OIIO_LIBRARY_PATH) message(STATUS "OIIO LIBRARY_PATH explicitly specified: ${OIIO_LIBRARY_PATH}") endif() FIND_PATH( OIIO_INCLUDES OpenImageIO/version.h ${OIIO_INCLUDE_PATH} ${OIIO_PATH}/include/ /usr/include /usr/local/include /sw/include /opt/local/include DOC "The directory where OpenImageIO/version.h resides") FIND_LIBRARY(OIIO_LIBRARIES NAMES OIIO OpenImageIO PATHS ${OIIO_LIBRARY_PATH} ${OIIO_PATH}/lib/ /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib DOC "The OIIO library") if(OIIO_INCLUDES AND OIIO_LIBRARIES) set(OIIO_FOUND TRUE) message(STATUS "Found OIIO library ${OIIO_LIBRARIES}") message(STATUS "Found OIIO includes ${OIIO_INCLUDES}") else() set(OIIO_FOUND FALSE) message(STATUS "OIIO not found. Specify OIIO_PATH to locate it") endif() ENDMACRO() MACRO(OCIOFindPython) # Set the default python runtime if(NOT PYTHON) set(PYHELP "path to Python executable (also used to find headers against which to compile Python bindings)") set(PYTHON_HEADER Python.h) set(PYTHON python CACHE FILEPATH ${PYHELP} FORCE) endif(NOT PYTHON) if(CMAKE_FIRST_RUN) message(STATUS "Setting python bin to: ${PYTHON}") endif() set(PYTHON_OK YES) # OK until something goes wrong # Get Python version execute_process(COMMAND ${PYTHON} -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_VERSION RESULT_VARIABLE PYTHON_RETURNVALUE OUTPUT_STRIP_TRAILING_WHITESPACE ) if(${PYTHON_RETURNVALUE} EQUAL 0) # Everything is fine else() # TODO: These error strings clobber previous values set(PYTHON_ERR "${PYTHON} returned ${PYTHON_RETURNVALUE} trying to determine version number.") set(PYTHON_OK NO) endif() # Determine Python UCS version execute_process(COMMAND ${PYTHON} -c "import sys; print(sys.maxunicode > 65536 and 'ucs4' or 'ucs2')" OUTPUT_VARIABLE PYTHON_UCS RESULT_VARIABLE PYTHON_RETURNVALUE OUTPUT_STRIP_TRAILING_WHITESPACE ) if(${PYTHON_RETURNVALUE} EQUAL 0) # Hurray else() set(PYTHON_OK NO) set(PYTHON_ERR "${PYTHON} returned ${PYTHON_RETURNVALUE} trying to determine UCS version.") endif() # Locate headers execute_process(COMMAND ${PYTHON} -c "from distutils import sysconfig; print(':'.join(set(sysconfig.get_config_var('INCLDIRSTOMAKE').split())))" OUTPUT_VARIABLE PYTHON_INCLUDE_RAW RESULT_VARIABLE PYTHON_RETURNVALUE OUTPUT_STRIP_TRAILING_WHITESPACE ) # Handle errors, and process include path if(${PYTHON_RETURNVALUE} EQUAL 0) file(TO_CMAKE_PATH "${PYTHON_INCLUDE_RAW}" PYTHON_INCLUDE) else() set(PYTHON_ERR "${PYTHON} returned ${PYTHON_RETURNVALUE} trying to determine header location.") set(PYTHON_OK NO) endif() # Locate Python library execute_process(COMMAND ${PYTHON} -c "from distutils import sysconfig; print(':'.join(set(sysconfig.get_config_var('LIBPL').split())))" OUTPUT_VARIABLE PYTHON_LIBRARY_DIRS_RAW RESULT_VARIABLE PYTHON_RETURNVALUE OUTPUT_STRIP_TRAILING_WHITESPACE ) # Handle errors, and process include path if(${PYTHON_RETURNVALUE} EQUAL 0) file(TO_CMAKE_PATH "${PYTHON_LIBRARY_DIRS_RAW}" PYTHON_LIBRARY_DIRS) FIND_LIBRARY(PYTHON_LIBRARY NAMES "python${PYTHON_VERSION}" PATHS ${PYTHON_LIBRARY_DIRS} NO_DEFAULT_PATH # Don't be "helpful" and randomly grab library from /usr/lib etc ) message("Python library: ${PYTHON_LIBRARY}") else() set(PYTHON_ERR "${PYTHON} returned ${PYTHON_RETURNVALUE} trying to determine library path.") set(PYTHON_OK NO) endif() # Construct variant path - a path that sufficiently identifies the # ABI-compatbility of the built library. See Github issue #236 if(OCIO_PYGLUE_RESPECT_ABI) # Respect Python major/minor version, and UCS version (unicode # content system). E.g install into "lib/python2.6/ucs4/site-packages" set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_UCS}/site-packages") else() # Ignore UCS value and install into lib/python2.6/site-packages dir set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/python${PYTHON_VERSION}/site-packages") endif() ENDMACRO() MACRO(OCIOFindJava) if(APPLE) SET(_JAVA_HINTS $ENV{JAVA_HOME}/bin) SET(_JAVA_PATHS /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands) FIND_PROGRAM(Java_JAVA_EXECUTABLE NAMES java HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) IF(Java_JAVA_EXECUTABLE) EXECUTE_PROCESS(COMMAND ${Java_JAVA_EXECUTABLE} -version RESULT_VARIABLE res OUTPUT_VARIABLE var ERROR_VARIABLE var # sun-java output to stderr OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) IF( res ) IF(${Java_FIND_REQUIRED}) MESSAGE( FATAL_ERROR "Error executing java -version" ) ELSE() MESSAGE( STATUS "Warning, could not run java --version") ENDIF() ELSE() # extract major/minor version and patch level from "java -version" output # Tested on linux using # 1. Sun / Sun OEM # 2. OpenJDK 1.6 # 3. GCJ 1.5 # 4. Kaffe 1.4.2 IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+[oem-]*\".*") # This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer STRING( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+)[oem-]*\".*" "\\1" Java_VERSION_STRING "${var}" ) ELSEIF(var MATCHES "java full version \"kaffe-[0-9]+\\.[0-9]+\\.[0-9_]+\".*") # Kaffe style STRING( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*" "\\1" Java_VERSION_STRING "${var}" ) ELSE() IF(NOT Java_FIND_QUIETLY) message(WARNING "regex not supported: ${var}. Please report") ENDIF(NOT Java_FIND_QUIETLY) ENDIF() STRING( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" ) STRING( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" ) STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" ) # warning tweak version can be empty: STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+\\_?\\.?([0-9]*)$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" ) if( Java_VERSION_TWEAK STREQUAL "" ) # check case where tweak is not defined set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}) else( ) set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK}) endif( ) ENDIF() ENDIF(Java_JAVA_EXECUTABLE) FIND_PROGRAM(Java_JAR_EXECUTABLE NAMES jar HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) FIND_PROGRAM(Java_JAVAC_EXECUTABLE NAMES javac HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) FIND_PROGRAM(Java_JAVAH_EXECUTABLE NAMES javah HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) FIND_PROGRAM(Java_JAVADOC_EXECUTABLE NAMES javadoc HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) # Check for everything include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Java REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE Java_VERSION) set(Java_FOUND TRUE) find_package(JNI) else() find_package(Java) find_package(JNI) endif() ENDMACRO() MACRO(ExtractRstCPP INFILE OUTFILE) add_custom_command( OUTPUT ${OUTFILE} COMMAND ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceCPP.py ${INFILE} ${OUTFILE} DEPENDS ${INFILE} COMMENT "Extracting reStructuredText from ${INFILE} (using old process)" ) ENDMACRO() MACRO(ExtractRstSimple INFILE OUTFILE) add_custom_command( OUTPUT ${OUTFILE} COMMAND ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceSimple.py ${INFILE} ${OUTFILE} DEPENDS ${INFILE} COMMENT "Extracting reStructuredText from ${INFILE}" ) ENDMACRO() MACRO(CopyFiles TARGET) # parse the macro arguments PARSE_ARGUMENTS(COPYFILES "OUTDIR;" "NOTUSED" ${ARGN}) # get the list of sources from the args set(FILES ${COPYFILES_DEFAULT_ARGS}) # find the shader compiler if(NOT COPYFILES_OUTDIR) set(COPYFILES_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) endif() set(${TARGET}_OUTPUT) foreach(FILE ${FILES}) get_filename_component(_FILE_NAME ${FILE} NAME) set(OUTFILENAME "${COPYFILES_OUTDIR}/${_FILE_NAME}") list(APPEND ${TARGET}_OUTPUT ${OUTFILENAME}) add_custom_command( OUTPUT ${OUTFILENAME} COMMAND ${CMAKE_COMMAND} -E copy ${FILE} ${OUTFILENAME} DEPENDS ${FILE} COMMENT "Copying file ${FILE}\n to ${OUTFILENAME}" ) endforeach() ENDMACRO() opencolorio-1.0.9~dfsg0.orig/share/cmake/iPhone-armv6-toolchain.cmake0000644000175000017500000000300212225107126023702 0ustar mfvmfv set(IPHONE_SDK "4.3") set(IPHONE_ROOT "/Developer/Platforms/iPhoneOS.platform/Developer") set(IPHONE_SDK_ROOT "${IPHONE_ROOT}/SDKs/iPhoneOS${IPHONE_SDK}.sdk") set(CMAKE_FIND_ROOT_PATH "${IPHONE_SDK_ROOT}" "${IPHONE_ROOT}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_SYSTEM_NAME "GNU") set(CMAKE_SYSTEM_PROCESSOR armv6) set(CMAKE_OSX_ARCHITECTURES armv6) set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) set(CMAKE_C_COMPILER gcc-4.2) set(CMAKE_CXX_COMPILER g++-4.2) add_definitions("-D__IPHONE__") add_definitions("-arch armv6 -pipe -no-cpp-precomp --sysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK}") set(CMAKE_C_LINK_FLAGS "-arch armv6 --isysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK} -L${IPHONE_SDK_ROOT}/usr/lib -L${IPHONE_SDK_ROOT}/usr/lib/system") set(CMAKE_CXX_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}) include_directories("${IPHONE_SDK_ROOT}/usr/include") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1/armv6-apple-darwin10") link_directories("${IPHONE_SDK_ROOT}/usr/lib") link_directories("${IPHONE_SDK_ROOT}/usr/lib/system") set(CMAKE_CROSSCOMPILING TRUE) set(IPHONE TRUE) set(OCIO_BUILD_SHARED FALSE) set(OCIO_BUILD_STATIC TRUE) set(OCIO_BUILD_TRUELIGHT FALSE) set(OCIO_BUILD_TESTBED FALSE) set(OCIO_BUILD_APPS FALSE) set(OCIO_BUILD_NUKE FALSE) set(OCIO_BUILD_PYGLUE FALSE) set(OCIO_BUILD_SSE FALSE) opencolorio-1.0.9~dfsg0.orig/share/cmake/FindTruelight.cmake0000644000175000017500000000573212225107126022235 0ustar mfvmfv#========== # # Copyright (c) 2011, Malcolm Humphreys. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Dan Bethell nor the names of any # other contributors to this software may be used to endorse or # promote products derived from this software without specific prior # written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #========== # # Variables defined by this module: # Truelight_FOUND # Truelight_INCLUDE_DIR # Truelight_COMPILE_FLAGS # Truelight_LINK_FLAGS # Truelight_LIBRARIES # Truelight_LIBRARY_DIR # # Usage: # FIND_PACKAGE( Truelight ) # FIND_PACKAGE( Truelight REQUIRED ) # # Note: # You can tell the module where Truelight is installed by setting # the TRUELIGHT_INSTALL_PATH (or setting the TRUELIGHT_ROOT environment # variable before calling FIND_PACKAGE. # # E.g. # SET( TRUELIGHT_INSTALL_PATH "/usr/fl/truelight" ) # FIND_PACKAGE( Truelight REQUIRED ) # #========== # our includes FIND_PATH( Truelight_INCLUDE_DIR truelight.h $ENV{TRUELIGHT_ROOT}/include ${TRUELIGHT_INSTALL_PATH}/include ) # our library FIND_LIBRARY( Truelight_LIBRARIES libtruelight.a $ENV{TRUELIGHT_ROOT}/lib ${TRUELIGHT_INSTALL_PATH}/lib ) SET( Truelight_COMPILE_FLAGS "" ) SET( Truelight_LINK_FLAGS "" ) IF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) SET( Truelight_COMPILE_FLAGS "" ) SET( Truelight_LINK_FLAGS "-framework CoreServices -framework IOKit" ) ENDIF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) # our library path GET_FILENAME_COMPONENT( Truelight_LIBRARY_DIR ${Truelight_LIBRARIES} PATH ) # did we find everything? INCLUDE( FindPackageHandleStandardArgs ) FIND_PACKAGE_HANDLE_STANDARD_ARGS( "Truelight" DEFAULT_MSG Truelight_INCLUDE_DIR Truelight_LIBRARIES Truelight_LIBRARY_DIR ) opencolorio-1.0.9~dfsg0.orig/share/cmake/TestForDDImageVersion.cxx0000644000175000017500000000100012225107126023276 0ustar mfvmfv#include #include "DDImage/ddImageVersionNumbers.h" int main(int, char*[]) { // Print a Nuke API identifier number, used to make the // lib/nuke${API_NUMBER} directory // Nuke aims to maintain API compatibilty between "v" releases, so // compiling for 6.1v1 will work with 6.1v2 etc (but not // 6.2v1). Only exception has been 5.1v5 and 5.1v6 (because it was // supposed to be 5.2v1) std::cout << kDDImageVersionMajorNum << "." << kDDImageVersionMinorNum; return 0; } opencolorio-1.0.9~dfsg0.orig/share/cmake/FindTinyXML.cmake0000644000175000017500000000456712225107126021577 0ustar mfvmfv# Find the tinyxml XML parsing library. # # Sets the usual variables expected for find_package scripts: # # TINYXML_INCLUDE_DIRS - header location # TINYXML_LIBRARIES - library to link against # TINYXML_FOUND - true if tinyxml was found. # TINYXML_MAJOR_VERSION # TINYXML_MINOR_VERSION # TINYXML_PATCH_VERSION # TINYXML_VERSION find_path(TINYXML_INCLUDE_DIR tinyxml.h) find_library(TINYXML_LIBRARY NAMES tinyxml) # Try to get the tinyxml version from the header file. if(TINYXML_INCLUDE_DIR) set(_tixml_header ${TINYXML_INCLUDE_DIR}/tinyxml.h) file(READ ${_tixml_header} _contents) if(_contents) string(REGEX MATCH "const int TIXML_MAJOR_VERSION = ([0-9]+);" _TMP_major "${_contents}") string(REGEX REPLACE ".*([0-9]+).*" "\\1" _OUT_major "${_TMP_major}") string(REGEX MATCH "const int TIXML_MINOR_VERSION = ([0-9]+);" _TMP_minor "${_contents}") string(REGEX REPLACE ".*([0-9]+).*" "\\1" _OUT_minor "${_TMP_minor}") string(REGEX MATCH "const int TIXML_PATCH_VERSION = ([0-9]+);" _TMP_patch "${_contents}") string(REGEX REPLACE ".*([0-9]+).*" "\\1" _OUT_patch "${_TMP_patch}") if(NOT ${_OUT_major} MATCHES "[0-9]+") message(FATAL_ERROR "Version parsing failed for TIXML_MAJOR_VERSION!") endif() if(NOT ${_OUT_minor} MATCHES "[0-9]+") message(FATAL_ERROR "Version parsing failed for TIXML_MINOR_VERSION!") endif() if(NOT ${_OUT_patch} MATCHES "[0-9]+") message(FATAL_ERROR "Version parsing failed for TIXML_MICRO_VERSION!") endif() set(TINYXML_MAJOR_VERSION ${_OUT_major}) set(TINYXML_MINOR_VERSION ${_OUT_minor}) set(TINYXML_PATCH_VERSION ${_OUT_patch}) set(TINYXML_VERSION ${TINYXML_MAJOR_VERSION}.${TINYXML_MINOR_VERSION}.${TINYXML_PATCH_VERSION}) else() message(FATAL_ERROR "Include file ${_tixml_header} does not exist") endif() endif() # Support the REQUIRED and QUIET arguments, and set TINYXML_FOUND if found. include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS (TinyXML DEFAULT_MSG TINYXML_LIBRARY TINYXML_INCLUDE_DIR) message(STATUS "TinyXML version: ${TINYXML_VERSION}") if(TINYXML_FOUND) set(TINYXML_LIBRARIES ${TINYXML_LIBRARY}) set(TINYXML_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR}) endif() mark_as_advanced(TINYXML_LIBRARY TINYXML_INCLUDE_DIR) opencolorio-1.0.9~dfsg0.orig/share/cmake/iPhoneSimulator-toolchain.cmake0000644000175000017500000000307212225107126024560 0ustar mfvmfv set(IPHONE_SDK "4.3") set(IPHONE_ROOT "/Developer/Platforms/iPhoneSimulator.platform/Developer") set(IPHONE_SDK_ROOT "${IPHONE_ROOT}/SDKs/iPhoneSimulator${IPHONE_SDK}.sdk") set(CMAKE_FIND_ROOT_PATH "${IPHONE_SDK_ROOT}" "${IPHONE_ROOT}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_OSX_ARCHITECTURES i686) set(CMAKE_OSX_SYSROOT "${IPHONE_SDK_ROOT}") set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) set(CMAKE_C_COMPILER gcc-4.2) set(CMAKE_CXX_COMPILER g++-4.2) add_definitions("-D__IPHONE__") add_definitions("-arch i686 -pipe -no-cpp-precomp --sysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK}") set(CMAKE_C_LINK_FLAGS "-arch i686 --isysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK} -L${IPHONE_SDK_ROOT}/usr/lib -L${IPHONE_SDK_ROOT}/usr/lib/system") set(CMAKE_CXX_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}) include_directories("${IPHONE_SDK_ROOT}/usr/include") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1/i686-apple-darwin10") link_directories("${IPHONE_SDK_ROOT}/usr/lib") link_directories("${IPHONE_SDK_ROOT}/usr/lib/system") set(IPHONE_BUILD TRUE) set(CMAKE_CROSSCOMPILING TRUE) set(OCIO_BUILD_SHARED FALSE) set(OCIO_BUILD_STATIC TRUE) set(OCIO_BUILD_TRUELIGHT FALSE) set(OCIO_BUILD_APPS FALSE) set(OCIO_BUILD_NUKE FALSE) set(OCIO_BUILD_PYGLUE FALSE) set(OCIO_BUILD_JNIGLUE FALSE) set(OCIO_BUILD_SSE FALSE) opencolorio-1.0.9~dfsg0.orig/share/cmake/FindNuke.cmake0000644000175000017500000000615312225107126021166 0ustar mfvmfv#========== # # Copyright (c) 2010, Dan Bethell. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Dan Bethell nor the names of any # other contributors to this software may be used to endorse or # promote products derived from this software without specific prior # written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #========== # # Variables defined by this module: # Nuke_FOUND # Nuke_INCLUDE_DIR # Nuke_COMPILE_FLAGS # Nuke_LINK_FLAGS # Nuke_LIBRARIES # Nuke_LIBRARY_DIR # # Usage: # FIND_PACKAGE( Nuke ) # FIND_PACKAGE( Nuke REQUIRED ) # # Note: # You can tell the module where Nuke is installed by setting # the NUKE_INSTALL_PATH (or setting the NDK_PATH environment # variable before calling FIND_PACKAGE. # # E.g. # SET( NUKE_INSTALL_PATH "/usr/local/Nuke5.2v3" ) # FIND_PACKAGE( Nuke REQUIRED ) # #========== # our includes FIND_PATH( Nuke_INCLUDE_DIR DDImage/Op.h $ENV{NDK_PATH}/include ${NUKE_INSTALL_PATH}/include ) # our library FIND_LIBRARY( Nuke_LIBRARIES DDImage $ENV{NDK_PATH} ${NUKE_INSTALL_PATH} ) SET( Nuke_COMPILE_FLAGS "" ) SET( Nuke_LINK_FLAGS "" ) IF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) SET( Nuke_COMPILE_FLAGS "-arch i386" ) SET( Nuke_LINK_FLAGS "-arch i386" ) ENDIF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) # our library path GET_FILENAME_COMPONENT( Nuke_LIBRARY_DIR ${Nuke_LIBRARIES} PATH ) # did we find everything? INCLUDE( FindPackageHandleStandardArgs ) FIND_PACKAGE_HANDLE_STANDARD_ARGS( "Nuke" DEFAULT_MSG Nuke_INCLUDE_DIR Nuke_LIBRARIES Nuke_LIBRARY_DIR ) SET( Nuke_API_VERSION "" ) IF( NUKE_FOUND ) TRY_RUN(NUKE_VERSION_EXITCODE NUKE_VERSION_COMPILED ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH}/TestForDDImageVersion.cxx COMPILE_DEFINITIONS "-I${Nuke_INCLUDE_DIR}" RUN_OUTPUT_VARIABLE Nuke_API_VERSION) message(STATUS "Nuke_API_VERSION: --${Nuke_API_VERSION}--") ENDIF() opencolorio-1.0.9~dfsg0.orig/share/cmake/ParseArguments.cmake0000644000175000017500000000514012225107126022416 0ustar mfvmfv#------------------------------------------------------------------------------- # The PARSE_ARGUMENTS macro will take the arguments of another macro and define # several variables. The first argument to PARSE_ARGUMENTS is a prefix to put # on all variables it creates. The second argument is a list of names, and the # third argument is a list of options. Both of these lists should be quoted. # The rest of the PARSE_ARGUMENTS args are arguments from another macro to be # parsed. # # PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...) # # For each item in options, PARSE_ARGUMENTS will create a variable with that # name, prefixed with prefix_. So, for example, if prefix is MY_MACRO and # options is OPTION1;OPTION2, then PARSE_ARGUMENTS will create the variables # MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables will be set to true if # the option exists in the command line or false otherwise. # # For each item in arg_names, PARSE_ARGUMENTS will create a variable with that # name, prefixed with prefix_. Each variable will be filled with the arguments # that occur after the given arg_name is encountered up to the next arg_name or # the end of the arguments. All options are removed from these lists. # PARSE_ARGUMENTS also creates a prefix_DEFAULT_ARGS variable containing the # list of all arguments up to the first arg_name encountered. # # Downloaded from: http://www.itk.org/Wiki/CMakeMacroParseArguments # cmake_minimum_required(VERSION 2.4.7) MACRO(PARSE_ARGUMENTS prefix arg_names option_names) SET(DEFAULT_ARGS) FOREACH(arg_name ${arg_names}) SET(${prefix}_${arg_name}) ENDFOREACH(arg_name) FOREACH(option ${option_names}) SET(${prefix}_${option} FALSE) ENDFOREACH(option) SET(current_arg_name DEFAULT_ARGS) SET(current_arg_list) FOREACH(arg ${ARGN}) SET(larg_names ${arg_names}) LIST(FIND larg_names "${arg}" is_arg_name) IF (is_arg_name GREATER -1) SET(${prefix}_${current_arg_name} ${current_arg_list}) SET(current_arg_name ${arg}) SET(current_arg_list) ELSE (is_arg_name GREATER -1) SET(loption_names ${option_names}) LIST(FIND loption_names "${arg}" is_option) IF (is_option GREATER -1) SET(${prefix}_${arg} TRUE) ELSE (is_option GREATER -1) SET(current_arg_list ${current_arg_list} ${arg}) ENDIF (is_option GREATER -1) ENDIF (is_arg_name GREATER -1) ENDFOREACH(arg) SET(${prefix}_${current_arg_name} ${current_arg_list}) ENDMACRO(PARSE_ARGUMENTS) opencolorio-1.0.9~dfsg0.orig/share/cmake/iPhone-toolchain.cmake0000644000175000017500000000300212225107126022651 0ustar mfvmfv set(IPHONE_SDK "4.3") set(IPHONE_ROOT "/Developer/Platforms/iPhoneOS.platform/Developer") set(IPHONE_SDK_ROOT "${IPHONE_ROOT}/SDKs/iPhoneOS${IPHONE_SDK}.sdk") set(CMAKE_FIND_ROOT_PATH "${IPHONE_SDK_ROOT}" "${IPHONE_ROOT}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_SYSTEM_NAME "GNU") set(CMAKE_SYSTEM_PROCESSOR armv7) set(CMAKE_OSX_ARCHITECTURES armv7) set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) set(CMAKE_C_COMPILER gcc-4.2) set(CMAKE_CXX_COMPILER g++-4.2) add_definitions("-D__IPHONE__") add_definitions("-arch armv7 -pipe -no-cpp-precomp --sysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK}") set(CMAKE_C_LINK_FLAGS "-arch armv7 --isysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK} -L${IPHONE_SDK_ROOT}/usr/lib -L${IPHONE_SDK_ROOT}/usr/lib/system") set(CMAKE_CXX_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}) include_directories("${IPHONE_SDK_ROOT}/usr/include") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1") include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1/armv7-apple-darwin10") link_directories("${IPHONE_SDK_ROOT}/usr/lib") link_directories("${IPHONE_SDK_ROOT}/usr/lib/system") set(CMAKE_CROSSCOMPILING TRUE) set(IPHONE TRUE) set(OCIO_BUILD_SHARED FALSE) set(OCIO_BUILD_STATIC TRUE) set(OCIO_BUILD_TRUELIGHT FALSE) set(OCIO_BUILD_APPS FALSE) set(OCIO_BUILD_NUKE FALSE) set(OCIO_BUILD_PYGLUE FALSE) set(OCIO_BUILD_JNIGLUE FALSE) set(OCIO_BUILD_SSE FALSE) opencolorio-1.0.9~dfsg0.orig/share/cmake/andriod-toolchain.cmake0000644000175000017500000000436212225107126023061 0ustar mfvmfv set(NDK /Applications/android-ndk-r5b) set(NDK_LEVEL 9) set(NDK_ARCH arm) set(NDK_CPU_ABI armeabi-v7a) # armeabi, armeabi-v7a, x86 set(NDK_SYSROOT ${NDK}/platforms/android-${NDK_LEVEL}/arch-${NDK_ARCH}) set(NDK_TOOLCHAIN_PREFIX arm-linux-androideabi) set(NDK_TOOLCHAIN_NAME ${NDK_TOOLCHAIN_PREFIX}-4.4.3) set(NDK_TOOLCHAIN_SYSTEM darwin-x86) set(NDK_TOOLCHAIN ${NDK}/toolchains/${NDK_TOOLCHAIN_NAME}/prebuilt/${NDK_TOOLCHAIN_SYSTEM}) set(CMAKE_FIND_ROOT_PATH "${NDK_TOOLCHAIN}" "${NDK_SYSROOT}" "${NDK}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_SYSTEM_NAME GNU) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR armv7-a) set(CMAKE_OSX_ARCHITECTURES armv7-a) set(CMAKE_C_COMPILER ${NDK_TOOLCHAIN_PREFIX}-gcc) set(CMAKE_CXX_COMPILER ${NDK_TOOLCHAIN_PREFIX}-g++) include_directories("${NDK}/sources/cxx-stl/gnu-libstdc++/libs/${NDK_CPU_ABI}/include") include_directories("${NDK}/sources/cxx-stl/gnu-libstdc++/include") include_directories("${NDK_SYSROOT}/usr/include") # TODO: work out if we need any of these compile flags # -DNDEBUG -MMD -MP -MF -fpic -ffunction-sections -funwind-tables # -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ # -D__ARM_ARCH_5TE__ -mtune=xscale -msoft-float -mthumb # -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wno-psabi # -Wa,--noexecstack -Os -O2 -g set(NDK_COMPILE_FLAGS "-DANDROID -march=${CMAKE_SYSTEM_PROCESSOR} -mfloat-abi=softfp") # TODO: work out if we need any of these link flags # -Wl,--gc-sections -Wl,-z,nocopyreloc -Wl,--no-undefined -Wl,-z,noexecstack # -Wl,-rpath-link=${NDK_PLATFORM_ROOT}/usr/lib") set(NDK_LINK_FLAGS "-Wl,--fix-cortex-a8 --sysroot=${NDK_SYSROOT} -L${NDK_SYSROOT}/usr/lib -lsupc++ -lstdc++ -lm -lc -ldl") add_definitions(${NDK_COMPILE_FLAGS}) set(CMAKE_C_LINK_FLAGS ${NDK_LINK_FLAGS}) set(CMAKE_CXX_LINK_FLAGS ${NDK_LINK_FLAGS}) set(CMAKE_CROSSCOMPILING TRUE) set(ANDROID TRUE) set(OCIO_BUILD_SHARED TRUE) set(OCIO_BUILD_STATIC FALSE) set(OCIO_BUILD_UNITTESTS FALSE) set(OCIO_BUILD_TRUELIGHT FALSE) set(OCIO_BUILD_TESTBED FALSE) set(OCIO_BUILD_APPS FALSE) set(OCIO_BUILD_NUKE FALSE) set(OCIO_BUILD_PYGLUE FALSE) set(OCIO_BUILD_JNIGLUE TRUE) set(OCIO_BUILD_SSE FALSE) opencolorio-1.0.9~dfsg0.orig/share/ocio/0000755000175000017500000000000012225107126016325 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/ocio/setup_ocio.sh.in0000644000175000017500000000076212225107126021444 0ustar mfvmfv#!/bin/sh OCIO_ROOT="@CMAKE_INSTALL_PREFIX@" OCIO_EXECROOT="@CMAKE_INSTALL_EXEC_PREFIX@" # For OS X export DYLD_LIBRARY_PATH="${OCIO_EXECROOT}/lib:${DYLD_LIBRARY_PATH}" # For Linux export LD_LIBRARY_PATH="${OCIO_EXECROOT}/lib:${LD_LIBRARY_PATH}" export PATH="${OCIO_EXECROOT}/bin:${PATH}" export PYTHONPATH="${OCIO_EXECROOT}/@PYTHON_VARIANT_PATH@:${PYTHONPATH}" export NUKE_PATH="${OCIO_EXECROOT}/lib/nuke@Nuke_API_VERSION@:${NUKE_PATH}" export NUKE_PATH="${OCIO_ROOT}/share/nuke:${NUKE_PATH}"; opencolorio-1.0.9~dfsg0.orig/share/sphinx/0000755000175000017500000000000012225107126016705 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/share/sphinx/ExtractRstFromSourceSimple.py0000755000175000017500000000577712225107126024564 0ustar mfvmfv#!/usr/bin/python """ Small Script to extract reStructuredText from OCIO headers - http://sphinx.pocoo.org/rest.html - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html This looks for the tokens: /*+doc and puts everything inside of them */ //+doc in the RST file. """ RUNTEST = False import sys, os, string # Remove the specified number of whitespace from the start of the string # If non-whitespace text is encountered in the 'indent' area, it is preserved def _RemoveIndent(s, indent): firstcharindex = s.find(s.strip()) startindex = min(firstcharindex, indent) return s[startindex:] def ExtractRst(inputstr, ofile): inMultiline = False onelineDocTag = '//+doc' multilineDocTag = '/*+doc' multilineEndTag = '*/' multilineStartIndent = 0 newOutputFile = False for line in inputstr.splitlines(): if inMultiline: if multilineEndTag in line: data = line[:line.index(multilineEndTag)] ofile.write(_RemoveIndent(data, multilineStartIndent) + '\n\n') inMultiline = False multilineStartIndent = 0 else: ofile.write(_RemoveIndent(line, multilineStartIndent) + '\n') elif onelineDocTag in line: docstring = line.split('//+doc', 1)[1] # TODO: Add this part to the CPP extracting script if "*New File*" in docstring: filename = line.split('*New File*', 1)[1].strip() # Make sure that the file name is valid here if newOutputFile: ofile.close() ofile = file(filename, 'w') newOutputFile = True ofile.write(docstring.strip() + '\n') else: if multilineDocTag in line: multilineStartIndent = line.index(multilineDocTag) inMultiline = True # TODO: Handle code after the multiline start tag? if __name__ == "__main__": if not RUNTEST: if len(sys.argv) <= 2: sys.stderr.write("\nYou need to specify an input and output file\n\n") sys.exit(1) src = open(sys.argv[1]).read() output = file(sys.argv[2], 'w') ExtractRst(src, output) output.close() elif RUNTEST: #print _RemoveIndent('',4) #print _RemoveIndent('sfdfsd',4) #print _RemoveIndent(' sfdfsd',4) #print _RemoveIndent(' sfdfsd',4) testdata = """ #include <...> void Random C++ Code //+doc Some one-line doc. Everything on the line after the onelineDocTag gets added. /*+doc What should this do? !rst::This is a multi-line rst text there is a blank line above this this is before the final endtag */ class TestClass /*+doc What should this do? !rst::additional rst indented code more indented code This is left indented This is original indent This is indented 4 spaces */ """ ExtractRst(testdata, sys.stdout) opencolorio-1.0.9~dfsg0.orig/share/sphinx/ExtractRstFromSourceCPP.py0000755000175000017500000002160512225107126023741 0ustar mfvmfv#!/usr/bin/python """ Small Script to extract reStructuredText from OCIO headers - http://sphinx.pocoo.org/rest.html - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html """ # TODO: extract void foo() { blah = 0 }; signatures correctly # TODO: handle typedef and enums better # TODO: handle OCIOEXPORT macro better # TODO: handle thow() funcs better RUNTEST = False import re, sys single_rst_comment = r"//(?P(!cpp:|!rst::).*\n)" block_rst_comment = r"/\*(?P(!cpp:|!rst::)([^*]*\*+)+?/)" rst_comment_regex = re.compile(r"(%s)|(%s)" % (single_rst_comment, block_rst_comment), re.MULTILINE) func_signature_regex = re.compile(r"(?P[^ ]*\(.*\))") rst_types = ["!rst::", "!cpp:class::", "!cpp:function::", "!cpp:member::", "!cpp:type::"] def getRstType(string): for rtype in rst_types: if string[0 : len(rtype)] == rtype: return rtype[1:] return None def getNextCodeLine(string, rst_type, from_pos): end = from_pos signature = "" if rst_type == "rst::": return signature, end if rst_type == "cpp:class::": class_open = False # first non-blank line that starts with 'class' found_signature = False # loop till the end of the class '};' ## skip other open/close '{' '}' skip_close = False x = end while x < len(string): if string[x] != '\n' and not found_signature: signature += string[x] if string[x] == '\n' and not found_signature: signature = signature.strip() if signature != '': found_signature = True signature = signature.replace("class", "") # TODO: this seem a bit dirty signature = signature.replace("OCIOEXPORT ", "") signature = signature.strip() signature = signature.split(' ', 1)[0] if string[x] == '{' and not class_open: class_open = True elif string[x] == '{' and class_open: skip_close = True elif string[x] == '}' and skip_close: skip_close = False elif string[x] == '}': end = x break x += 1 return signature, end # else skip = False while string[end] != ";": if string[end] != ' ' and skip: skip = False signature += ' ' if string[end] == '\n': skip = True if not skip: signature += string[end] end += 1 signature += string[end] # TODO: this seem a bit dirty signature = signature.replace("OCIOEXPORT ", "") signature = signature.replace(" throw()", "") signature = signature.strip() if signature[len(signature)-1] == ';': signature = signature[:len(signature)-1] # hack hack hack if rst_type == "cpp:type::": if signature[:7] == "typedef": bits = signature.split() signature = bits[len(bits)-1] if signature[:4] == "enum": bits = signature.split() signature = bits[1] return signature, end def getNextCommentLine(string, from_pos, buffer = ""): end = from_pos tmp = "" while string[end] != "\n": tmp += string[end] end += 1 tmp += string[end] if tmp.lstrip()[:2] == "//": if tmp.lstrip()[2:][0] == " ": buffer += tmp.lstrip()[3:] else: buffer += tmp.lstrip()[2:] buffer, end = getNextCommentLine(string, end+1, buffer) else: end = from_pos return buffer, end class Comment: def __init__(self, comment, start, end): self.comment = comment self.start = start self.end = end def getRstType(self): return getRstType(self.comment) def __str__(self): buffer = self.comment for rtype in rst_types: if buffer[0 : len(rtype)] == rtype: buffer = buffer[len(rtype):] buffer_lines = buffer.splitlines() buffer_lines[0] = buffer_lines[0].strip() if self.getRstType() == "rst::": buffer_lines.append('') buffer = '\n'.join(buffer_lines) return buffer if buffer_lines[0] != '': buffer_lines.insert(0, '') for x in xrange(0, len(buffer_lines)): buffer_lines[x] = " %s" % buffer_lines[x] buffer_lines.append('') buffer = '\n'.join(buffer_lines) return buffer def ExtractRst(string, fileh): items = [] for item in rst_comment_regex.finditer(string): start, end = item.span() itemdict = item.groupdict() if itemdict["single_comment"] != None: ## buf = itemdict["single_comment"] comment, end = getNextCommentLine(string, end) buf += comment ## items.append(Comment(buf, start, end)) elif itemdict["block_comment"] != None: ## itemdict["block_comment"] = \ itemdict["block_comment"][:len(itemdict["block_comment"])-2] buf_lines = itemdict["block_comment"].splitlines() indent = 0 if len(buf_lines) > 1: for char in buf_lines[1]: if char != ' ': break indent += 1 # remove indent bufa = [buf_lines[0]] for x in xrange(1, len(buf_lines)): bufa.append(buf_lines[x][indent:]) buf = '\n'.join(bufa) + '\n' ## items.append(Comment(buf, start, end)) ## fileh.write('\n') namespaces = [] for thing in items: rst_type = thing.getRstType() # .. cpp:function:: SomeClass::func2(const char * filename, std::istream& foo) # this is some of the documentation # for this function signature, end = getNextCodeLine(string, rst_type, thing.end) # if we are a class work out the begining and end so we can # give function signatures the correct namespace if rst_type == "cpp:class::": tmp = { 'name': signature, 'start': thing.end, 'end': end } namespaces.append(tmp) fileh.write(".. %s %s\n" % (rst_type, signature) ) elif rst_type != "rst::": for namespace in namespaces: if end > namespace['start'] and end < namespace['end']: func = func_signature_regex.search(signature) funcpart = str(func.groupdict()["sig_name"]) signature = signature.replace(funcpart, "%s::%s" % (namespace['name'], funcpart)) break fileh.write(".. %s %s\n" % (rst_type, signature) ) fileh.write(str(thing)) fileh.write('\n') fileh.flush() if __name__ == "__main__": if not RUNTEST: if len(sys.argv) <= 2: sys.stderr.write("\nYou need to specify an input and output file\n\n") sys.exit(1) src = open(sys.argv[1]).read() output = file(sys.argv[2], 'w') ExtractRst(src, output) output.close() elif RUNTEST: testdata = """ //!rst:: ------------- // this comment should be ignored //!rst:: foobar // this is apart of the same // comment // this is also ignored /* this is a block comment which is ignored */ //!cpp:class:: // this is a comment about the class class FooBar : public std::exception { ... }; /*!cpp:class:: this is also a comment about this class */ class FooBar2 : public std::exception { ... }; /*!cpp:class:: this is also a comment about this class with no new line */ class FooBar3 : public std::exception { ... }; //!cpp:class:: class SomeClass { public: //!cpp:function:: // this is some cool function for // some purpose // this line is indented static fooPtr func1(); /*!cpp:function:: this is a much better func for some other purpose this is also indented */ static barPtr func2(); /*!cpp:function:: this func wraps over two lines which needs to be caught */ static weePtr func2(const char * filename, std::istream& foo); }; //!cpp:function:: the class namespace should still get set correctly void foobar1(); //!cpp:class:: this is some super informative // docs class SomeClass { public: //!cpp:function:: the class namespace should still get set correctly void foobar2(); }; //!cpp:function:: the class namespace should still get set correctly void foobar3(); /*!rst:: this is a rst block **comment which needs** to be supported */ """ ExtractRst(testdata) opencolorio-1.0.9~dfsg0.orig/ChangeLog0000644000175000017500000002726612225107126016061 0ustar mfvmfv**Version 1.0.9 (Sep 2 2013):** * CDL cccid supports both named id and index lookups * ociobakelut / ocioconvert updates * FreeBSD compile dixes * FileTransform disk cache allows concurrent disk lookups * CSP windows fix * Python 3 support * Fix envvar abs/relative path testing * Can explicitly declare config envvars * gcc44 compile warning fixes **Version 1.0.8 (Dec 11 2012):** * After Effects plugin * Core increased precision for matrix inversion * Core md5 symbols no longer leaked * CMake compatibility with OIIO 1.0 namespacing * Cmake option to control python soname * Nuke register_viewers defaults OCIODisplay to "all" * Nuke ColorLookup <-> spi1d lut examples * Windows uses boost shared_ptr by default * Windows fixed csp writing * Windows build fixes * ociobakelut supports looks **Version 1.0.7 (April 17 2012):** * IRIDAS .look support * ociolutimage utility added (handles image <-> 3dlut) * CMake build allows optional reliance on system libraries * CMake layout changes for python and nuke installs * Bumped internals to yaml 0.3.0, pystring 1.1.2 * Optimized internal handling of Matrix / Exponent Ops * Added INTERP_BEST interpolation option * Python config.clearLooks() added * Python docs revamp * Nuke config-dependent knob values now baked into .nk scripts * Nuke OCIOLookTransform gets reload button * Nuke nodes get updated help text **Version 1.0.6 (March 12 2012):** * JNI (Java) updates * ocioconvert arbitrary attr support **Version 1.0.5 (Feb 22 2012):** * Internal optimization framework added * SetLoggingLevel(..) bugfix * Python API Documentation / website updates * Clang compilation fix **Version 1.0.4 (Jan 25 2012):** * ocio2icc deprecated (functionality merged into ociobakelut) * rv integration (beta) * nuke: updated channel handling * Documentation / website updates **Version 1.0.3 (Dec 21 2011):** * Tetrahedral 3dlut interpolation (CPU only) * ociocheck and Config.sanityCheck() have improved validation * Mari: updated examples * Makefile: misc updates to match distro library conventions **Version 1.0.2 (Nov 30 2011):** * 3D lut processing (cpu) is resiliant to nans * Nuke OCIOFileTransform gains Reload buttons * Installation on multi-lib *nix systems improved * Installation handling of soversion for C++/python improved * ociobakelut improvements * Initial version of Java bindings (alpha) **Version 1.0.1 (Oct 31 2011):** * Luts with incorrect extension are properly loaded * ocio2icc / ociobakelut get --lut option (no longer requires ocio config) * DisplayTransform looks do not apply to 'data' passes. **Version 1.0.0 (Oct 3 2011):** * ABI Lockoff for 1.0 branch * General API Cleanup (removed deprecated / unnecessary functions) * New features can be added, but the ABI will only be extended in a binary compatible manner. Profiles written from 1.0 will always be readable in future versions. * Fixed Truelight Reading Bug * ocio2icc no longer requires ocio config (can provide raw lut(s) ------------------------------------------------------------------------------- **Version 0.8.7 (Oct 3 2011):** * Fixed Truelight Reading Bug **Version 0.8.6 (Sept 7 2011):** * Updated .ocio config reading / writing to be forwards compatibile with 1.0 (Profiles written in 0.8.6+ will be 1.0 compatible. Compatibility from prior versions is likely, though not guaranteed.) * Better logging * Added ColorSpace.equalitygroup (makes ColorSpace equality explicit) * Substantial Nuke node updates * Added support for Iridas .itx read/write * Windows Build Support **Version 0.8.5 (Aug 2 2011):** * Nuke OCIODisplay fixed (bug from 0.8.4) * Updated Houdini HDL Reader / Writer **Version 0.8.4 (July 25 2011):** * Native Look Support * Core / Nuke OCIODisplay supports alpha viewing * Added Houdini (.lut) writing * Added Pandora (.mga,.m3d) reading * Additional internal bug fixes **Version 0.8.3 (June 27 2011):** * OCIO::Config symlink resolution fixed (bugfix) * Nuke OCIODisplay knobs use string storage (bugfix) * Makefile cleanup * Documentation cleanup **Version 0.8.2 (June 7 2011):** * Numerous Windows compatibility fixes * Python binding improvements * OCIO::Baker / ociobakelut improvements * Lut1D/3D do not crash on nans (bugfix) * Nuke UI doesnt crash in known corner case (bugfix) **Version 0.8.1 (May 9 2011):** * New roles: TEXTURE_PAINT + MATTE_PAINT * Mari API Example (src/mari) * FileFormat registry updated to allow Windows + Debug support * boost_ptr build compatibility option **Version 0.8.0 (Apr 19 2011):** * ABI Lockoff for stable 0.8 branch New features can be added, but the ABI will only be extended in a binary compatible manner * Otherwise identical to 0.7.9 ------------------------------------------------------------------------------- **Version 0.7.9 (Apr 18 2011):** * Added support for .vf luts * Misc. Nuke enhancements * Adds optional boost ptr support (backwards compatibility) * Makefile enhancements (Nuke / CMAKE_INSTALL_EXEC_PREFIX) * cdlTransform.setXML crash fix **Version 0.7.8 (March 31 2011):** * Iridas lut (.cube) bugfix, DOMAIN_MIN / DOMAIN_MAX now obeyed * Exposed GPU functions in python (needed for Mari) * Nuke OCIODisplay cleanup: Fixed knob names and added envvar support * ociobaker cleanup * tinyxml ABI visibility cleaned up * Removed Boost dependency, tr1::shared_ptr now used instead **Version 0.7.7 (March 1 2011):** * Lut baking API + standalone app * Truelight runtime support (optional) * Cinespace (3d) lut writing * CSP prelut support * Boost argparse dependency removed * SanityCheck is more exhaustive * FileTransform supports relative path dirs * Python enhancements (transform kwarg support) * Makefile enhancements (OIIO Path) * Processor API update (code compatible, binary incompatible) **Version 0.7.6 (Feb 1 2011):** * Updated Config Display API (.ocio config format updated) * Added ocio2icc app (ICC Profile Generation) * Revamp of ASC CDL, added .cc and .ccc support * Documentation Improvements * Makefile enhancements (Boost_INCLUDE_DIR, etc) **Version 0.7.5 (Jan 13 2011):** * ociodisplay enhancements * gpu display bugfix (glsl profile 1.0 only) * Makefile enhancements * Nuke installation cleanup * Doc generation using sphinx (html + pdf) **Version 0.7.4 (Jan 4 2011):** * Added 'Context', allowing for 'per-shot' Transforms * Misc API Cleanup: removed old functions + fixed const-ness * Added config.sanityCheck() for validation * Additional Makefile configuration options, SONAME, etc. **Version 0.7.3 (Dec 16 2010):** * Added example applications: ociodisplay, ocioconvert * Makefile: Add boost header dependency * Makefile: Nuke plugins are now version specific * Fixed bug in GLSL MatrixOp **Version 0.7.2 (Dec 9 2010):** * GPUAllocation refactor (API tweak) * Added AllocationTransform * Added LogTransform * Removed CineonLogToLinTransform * A few bug fixes **Version 0.7.1 (Nov 15 2010):** * Additional 3d lut formats: Truelight .cub + Iridas .cube * FileTransform supports envvars and search paths * Added Nuke plugins: LogConvert + FileTransform * Improved OCIO profile formatting * GCC visibility used (when available) to hide private symbols * A few bug fixes **Version 0.7.0 (Oct 21 2010):** * Switched file format from XML to Yaml ------------------------------------------------------------------------------- **Version 0.6.1 (Oct 5 2010):** * Exposed ExponentTransform * Added CineonLogToLinTransform - a simple 'straight-line' negative linearization. Not strictly needed (could be done previously with LUTs) but often convenient to have. * Added DisplayTransform.displayCC for post display lut CC. * Many python improvements * A few bug fixes * A few Makefile enhancements **Version 0.6.0 (Sept 21 2010):** * Start of 0.6, "stable" branch All 0.6.x builds will be ABI compatible (forward only). New features (even experimental ones) will be added to the 0.6 branch, as long as binary and source compatibility is maintained. Once this no longer is possible, a 0.7 "dev" branch will be forked. * Split public header into 3 parts for improved readability (you still only import though) * Added MatrixTransform * Refactored internal unit testing * Fixed many compile warnings ------------------------------------------------------------------------------- **Version 0.5.16 (Sept 16 2010):** * PyTransforms now use native python class inheritance * OCIO namespace can now be configured at build time (for distribution in commercial apps) * Updated make install behavior * DisplayTransform accepts generic cc operators (instead of CDL only) * A few bug fixes / compile warning fixes **Version 0.5.15 (Sept 8 2010):** * OCIO is well behaved when $OCIO is unset, allowing un-color-managed use. * Color Transforms can be applied in python config->getProcessor * Simplification of API (getColorSpace allows cs name, role names, and cs objects) * Makefile enhancements (courtesy Malcolm Humphreys) * A bunch of bug fixes **Version 0.5.14 (Sept 1 2010):** * Python binding enhancements * Simplified class implmentations (reduced internal header count) **Version 0.5.13 (Aug 24 2010):** * GPU Processing now supports High Dynamic Range color spaces * Added log processing operator * Numerous bug fixes * Numerous enhancements to python glue * Exposed PyOpenColorIO header, for use in apps that require custom python glue * Matrix op is optimized for diagonal-only subcases * Numerous changes to Nuke Plugin (now with an addition node, OCIODisplay) **Version 0.5.12 (Aug 18 2010):** * Additional DisplayTransform improvements * Additional GPU Improvements * Added op hashing (processor->getGPULut3DCacheID) **Version 0.5.11 (Aug 11 2010):** * Initial DisplayTransform implementation * ASC CDL Support * Config Luma coefficients **Version 0.5.10 (July 22 2010):** * Updated Nuke Plugin, now works in OSX * Fixed misc. build warnings. * Continued GPU progress (still under development) **Version 0.5.9 (June 28 2010):** * Renamed project, classes, namespaces to OpenColorIO (OCIO) * Added single-pixel processor path * Improved python path makefile detection * Continued GPU progress (still under development) **Version 0.5.8 (June 22 2010):** * Support for .3dl * Support for matrix ops * Code refactor (added Processors) to support gpu/cpu model * Much better error checking * Compilation support for python 2.5 * Compilation support for OSX **Version 0.5.7 (June 14 2010):** * Python API is much more fleshed out * Improved public C++ header **Version 0.5.6 (June 8 2010):** * PyConfig stub implementation * Dropped ImageDesc.init; added PlanarImageDesc / PackedImageDesc * Dropped tr1::shared_ptr; added boost::shared_ptr **Version 0.5.5 (June 4 2010):** * .ocio supports path references * Switch config envvar to $OCIO * Added 3D lut processing ops **Version 0.5.4 (June 1 2010):** * Initial Release * CMake linux support * XML OCIO format parsing / saving * Example colorspace configuration with a few 'trivial' colorspaces * Mutable colorspace configuration API * Support for 1D lut processing * Support for SPI 1D fileformats. * Nuke plugin opencolorio-1.0.9~dfsg0.orig/src/0000755000175000017500000000000012225107126015061 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/0000755000175000017500000000000012225107126016023 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLogConvert/0000755000175000017500000000000012225107126020557 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLogConvert/OCIOLogConvert.h0000644000175000017500000000622212225107126023466 0ustar mfvmfv#ifndef INCLUDED_OCIO_NUKE_LOGCONVERT_H_ #define INCLUDED_OCIO_NUKE_LOGCONVERT_H_ // Include these early, for Nuke's headers under gcc 4.4.2. #include #include #include #include #include #include namespace OCIO = OCIO_NAMESPACE; /*! * Iop that uses OpenColorIO to perform colorspace conversions */ class OCIOLogConvert : public DD::Image::PixelIop { protected: int modeindex; OCIO::ConstProcessorRcPtr processor; public: static const char* modes[]; OCIOLogConvert(Node *node); virtual ~OCIOLogConvert(); static const DD::Image::Op::Description description; /*! Return the command name that will be stored in Nuke scripts. */ virtual const char *Class() const; /*! * Return a name for this class that will be shown to the user. The * default implementation returns Class(). You can return a different * (ie more user-friendly) name instead here, and there is no need for * this to be unique. * * Nuke currently will remove any trailing digits and underscores from * this and add a new number to make a unique name for the new node. * * \return "OCIOLogConvert" */ virtual const char *displayName() const; /*! * Return help information for this node. This information is in the * pop-up window that the user gets when they hit the [?] button in * the lower-left corner of the control panel. */ virtual const char *node_help() const; /*! * Define the knobs that will be presented in the control panel. */ virtual void knobs(DD::Image::Knob_Callback f); /*! * Specify the channels required from input n to produce the channels * in mask by modifying mask in-place. (At least one channel in the * input is assumed.) * * Since OCIOLogConvert conversions can have channel cross-talk, any rgb * output channel requires all its rgb bretheren. (Non-rgb * are passed through.) */ virtual void in_channels(int n, DD::Image::ChannelSet& mask) const; /*! * Calculate the output pixel data. * \param rowY vertical line number * \param rowX inclusive left bound * \param rowXBound exclusive right bound * \param outputChannels a subset of out_channels(), the required channels to be produced */ virtual void pixel_engine( const DD::Image::Row& in, int rowY, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out); protected: /*! * Check that colorspaces are available, and that the transform * is not a noop. (As OCIO whether a given transform is a noop, since it * can do more analysis than just name matching.) */ virtual void _validate(bool for_real); }; static DD::Image::Op* build(Node *node); #endif // INCLUDED_OCIO_NUKE_LOGCONVERT_H_ opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLogConvert/OCIOLogConvert.cpp0000644000175000017500000001105012225107126024014 0ustar mfvmfv/** * OpenColorIO LogConvert Iop. */ #include "OCIOLogConvert.h" namespace OCIO = OCIO_NAMESPACE; #include #include #include #include #include #include #include #include const char* OCIOLogConvert::modes[] = { "log to lin", "lin to log", 0 }; OCIOLogConvert::OCIOLogConvert(Node *n) : DD::Image::PixelIop(n) { modeindex = 0; } OCIOLogConvert::~OCIOLogConvert() { } void OCIOLogConvert::knobs(DD::Image::Knob_Callback f) { Enumeration_knob(f, &modeindex, modes, "operation", "operation"); DD::Image::SetFlags(f, DD::Image::Knob::ALWAYS_SAVE); } void OCIOLogConvert::_validate(bool for_real) { try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); const char * src = 0; const char * dst = 0; if(modeindex == 0) { src = OCIO::ROLE_COMPOSITING_LOG; dst = OCIO::ROLE_SCENE_LINEAR; } else { src = OCIO::ROLE_SCENE_LINEAR; dst = OCIO::ROLE_COMPOSITING_LOG; } processor = config->getProcessor(src, dst); } catch(OCIO::Exception &e) { error(e.what()); return; } if(processor->isNoOp()) { set_out_channels(DD::Image::Mask_None); // prevents engine() from being called } else { set_out_channels(DD::Image::Mask_All); } DD::Image::PixelIop::_validate(for_real); } // Note that this is copied by others (OCIODisplay) void OCIOLogConvert::in_channels(int /* n unused */, DD::Image::ChannelSet& mask) const { DD::Image::ChannelSet done; foreach(c, mask) { if (DD::Image::colourIndex(c) < 3 && !(done & c)) { done.addBrothers(c, 3); } } mask += done; } // See Saturation::pixel_engine for a well-commented example. // Note that this is copied by others (OCIODisplay) void OCIOLogConvert::pixel_engine( const DD::Image::Row& in, int /* rowY unused */, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out) { int rowWidth = rowXBound - rowX; DD::Image::ChannelSet done; foreach (requestedChannel, outputChannels) { // Skip channels which had their trios processed already, if (done & requestedChannel) { continue; } // Pass through channels which are not selected for processing // and non-rgb channels. if (colourIndex(requestedChannel) >= 3) { out.copy(in, requestedChannel, rowX, rowXBound); continue; } DD::Image::Channel rChannel = DD::Image::brother(requestedChannel, 0); DD::Image::Channel gChannel = DD::Image::brother(requestedChannel, 1); DD::Image::Channel bChannel = DD::Image::brother(requestedChannel, 2); done += rChannel; done += gChannel; done += bChannel; const float *rIn = in[rChannel] + rowX; const float *gIn = in[gChannel] + rowX; const float *bIn = in[bChannel] + rowX; float *rOut = out.writable(rChannel) + rowX; float *gOut = out.writable(gChannel) + rowX; float *bOut = out.writable(bChannel) + rowX; // OCIO modifies in-place // Note: xOut can equal xIn in some circumstances, such as when the // 'Black' (throwaway) scanline is uses. We thus must guard memcpy, // which does not allow for overlapping regions. if (rOut != rIn) memcpy(rOut, rIn, sizeof(float)*rowWidth); if (gOut != gIn) memcpy(gOut, gIn, sizeof(float)*rowWidth); if (bOut != bIn) memcpy(bOut, bIn, sizeof(float)*rowWidth); try { OCIO::PlanarImageDesc img(rOut, gOut, bOut, NULL, rowWidth, /*height*/ 1); processor->apply(img); } catch(OCIO::Exception &e) { error(e.what()); } } } const DD::Image::Op::Description OCIOLogConvert::description("OCIOLogConvert", build); const char* OCIOLogConvert::Class() const { return description.name; } const char* OCIOLogConvert::displayName() const { return description.name; } const char* OCIOLogConvert::node_help() const { // TODO more detailed help text return "Use OpenColorIO to convert from SCENE_LINEAR to COMPOSITING_LOG (or back)."; } DD::Image::Op* build(Node *node) { DD::Image::NukeWrapper *op = new DD::Image::NukeWrapper(new OCIOLogConvert(node)); op->channels(DD::Image::Mask_RGB); return op; } opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIODisplay/0000755000175000017500000000000012225107126020102 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/OCIODisplay/OCIODisplay.h0000644000175000017500000001100712225107126022331 0ustar mfvmfv#ifndef INCLUDED_OCIO_NUKE_DISPLAY_H_ #define INCLUDED_OCIO_NUKE_DISPLAY_H_ // Include these early, for Nuke's headers under gcc 4.4.2. #include #include #include #include #include #include namespace OCIO = OCIO_NAMESPACE; /*! * Use OpenColorIO to convert for display output. */ class OCIODisplay : public DD::Image::PixelIop { protected: bool m_hasLists; //!< Were colorspaces, OCIODisplay devices, and transform names found? If not, always error. DD::Image::ChannelSet m_layersToProcess; //!< layers (rgb channel groups) to process int m_colorSpaceIndex; //!< index of colorspace selection from the pulldown list knob int m_displayIndex, m_viewIndex; std::vector m_colorSpaceNames; //!< list of colorspace names (memory for const char* s below) std::vector m_displayNames, m_viewNames; std::vector m_colorSpaceCstrNames; //!< list for the pulldown list knob (used raw) std::vector m_displayCstrNames, m_viewCstrNames; float m_gain; float m_gamma; int m_channel; std::string m_contextKey1; std::string m_contextValue1; std::string m_contextKey2; std::string m_contextValue2; std::string m_contextKey3; std::string m_contextValue3; std::string m_contextKey4; std::string m_contextValue4; OCIO::ConstContextRcPtr getLocalContext(); OCIO::DisplayTransformRcPtr m_transform; OCIO::ConstProcessorRcPtr m_processor; DD::Image::Knob *m_displayKnob, *m_viewKnob; void refreshDisplayTransforms(); public: OCIODisplay(Node *node); virtual ~OCIODisplay(); static const DD::Image::Op::Description description; /*! Return the command name that will be stored in Nuke scripts. */ virtual const char *Class() const; /*! * Return a name for this class that will be shown to the user. The * default implementation returns Class(). You can return a different * (ie more user-friendly) name instead here, and there is no need for * this to be unique. * * Nuke currently will remove any trailing digits and underscores from * this and add a new number to make a unique name for the new node. * * \return "OCIODisplay" */ virtual const char *displayName() const; /*! * Return help information for this node. This information is in the * pop-up window that the user gets when they hit the [?] button in * the lower-left corner of the control panel. */ virtual const char *node_help() const; /*! * Define the knobs that will be presented in the control panel. */ virtual void knobs(DD::Image::Knob_Callback f); /*! * Specify the channels required from input n to produce the channels * in mask by modifying mask in-place. (At least one channel in the * input is assumed.) * * Since colorspace conversions can have channel cross-talk, any rgb * output channel requires all its rgb bretheren. (Non-rgb * are passed through.) */ virtual void in_channels(int n, DD::Image::ChannelSet& mask) const; /*! * Calculate the output pixel data. * \param rowY vertical line number * \param rowX inclusive left bound * \param rowXBound exclusive right bound * \param outputChannels a subset of out_channels(), the required channels to be produced */ virtual void pixel_engine( const DD::Image::Row& in, int rowY, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out); /*! * When the display device changes, * regenerate the display transform list. */ virtual int knob_changed(DD::Image::Knob *k); virtual void append(DD::Image::Hash& hash); protected: /*! * Check that colorspaces are available, and that the transform * is not a noop. (As OCIO whether a given transform is a noop, since it * can do more analysis than just name matching.) */ virtual void _validate(bool for_real); }; static DD::Image::Op* build(Node *node); #endif // INCLUDED_OCIO_NUKE_DISPLAY_H_ opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIODisplay/OCIODisplay.cpp0000644000175000017500000004301512225107126022670 0ustar mfvmfv/** * OpenColorIO Display Iop. */ #include "OCIODisplay.h" namespace OCIO = OCIO_NAMESPACE; #include #include #include #include #include #include #include #include #include #include #include // Should we use cascasing ColorSpace menus #if defined kDDImageVersionInteger && (kDDImageVersionInteger>=62300) #define OCIO_CASCADE #endif OCIODisplay::OCIODisplay(Node *n) : DD::Image::PixelIop(n) { m_layersToProcess = DD::Image::Mask_RGBA; m_hasLists = false; m_colorSpaceIndex = m_displayIndex = m_viewIndex = 0; m_displayKnob = m_viewKnob = NULL; m_gain = 1.0; m_gamma = 1.0; m_channel = 2; m_transform = OCIO::DisplayTransform::Create(); try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); OCIO::ConstColorSpaceRcPtr defaultcs = config->getColorSpace(OCIO::ROLE_SCENE_LINEAR); if(!defaultcs) throw std::runtime_error("ROLE_SCENE_LINEAR not defined."); std::string defaultColorSpaceName = defaultcs->getName(); for(int i=0; igetNumColorSpaces(); ++i) { std::string csname = config->getColorSpaceNameByIndex(i); #ifdef OCIO_CASCADE std::string family = config->getColorSpace(csname.c_str())->getFamily(); if(family.empty()) m_colorSpaceNames.push_back(csname.c_str()); else m_colorSpaceNames.push_back(family + "/" + csname); #else m_colorSpaceNames.push_back(csname); #endif if(defaultColorSpaceName == csname) { m_colorSpaceIndex = i; } } std::string defaultDisplay = config->getDefaultDisplay(); for(int i=0; igetNumDisplays(); ++i) { std::string display = config->getDisplay(i); m_displayNames.push_back(display); if(display == defaultDisplay) { m_displayIndex = i; } } } catch(OCIO::Exception& e) { std::cerr << "OCIODisplay: " << e.what() << std::endl; } catch(...) { std::cerr << "OCIODisplay: Unknown exception during OCIO setup." << std::endl; } // Build the cstr vectors on our second pass for(unsigned int i=0; igetCurrentContext(); OCIO::ContextRcPtr mutableContext; if(!m_contextKey1.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey1.c_str(), m_contextValue1.c_str()); } if(!m_contextKey2.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey2.c_str(), m_contextValue2.c_str()); } if(!m_contextKey3.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey3.c_str(), m_contextValue3.c_str()); } if(!m_contextKey4.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey4.c_str(), m_contextValue4.c_str()); } if(mutableContext) context = mutableContext; return context; } void OCIODisplay::append(DD::Image::Hash& localhash) { // TODO: Hang onto the context, what if getting it // (and querying getCacheID) is expensive? try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); OCIO::ConstContextRcPtr context = getLocalContext(); std::string configCacheID = config->getCacheID(context); localhash.append(configCacheID); // This is required due to our custom channel overlay mode post-processing localhash.append(m_channel); } catch(OCIO::Exception &e) { error(e.what()); return; } } void OCIODisplay::_validate(bool for_real) { input0().validate(for_real); if(!m_hasLists) { error("Missing one or more of colorspaces, display devices, or display transforms."); return; } int nColorSpaces = static_cast(m_colorSpaceNames.size()); if(m_colorSpaceIndex < 0 || m_colorSpaceIndex >= nColorSpaces) { std::ostringstream err; err << "ColorSpace index (" << m_colorSpaceIndex << ") out of range."; error(err.str().c_str()); return; } try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); m_transform->setInputColorSpaceName(config->getColorSpaceNameByIndex(m_colorSpaceIndex)); m_transform->setDisplay(m_displayCstrNames[m_displayIndex]); m_transform->setView(m_viewCstrNames[m_viewIndex]); // Specify an (optional) linear color correction { float m44[16]; float offset4[4]; const float slope4f[] = { m_gain, m_gain, m_gain, m_gain }; OCIO::MatrixTransform::Scale(m44, offset4, slope4f); OCIO::MatrixTransformRcPtr mtx = OCIO::MatrixTransform::Create(); mtx->setValue(m44, offset4); m_transform->setLinearCC(mtx); } // Specify an (optional) post-display transform. { float exponent = 1.0f/std::max(1e-6f, m_gamma); const float exponent4f[] = { exponent, exponent, exponent, exponent }; OCIO::ExponentTransformRcPtr cc = OCIO::ExponentTransform::Create(); cc->setValue(exponent4f); m_transform->setDisplayCC(cc); } // Add Channel swizzling { int channelHot[4] = { 0, 0, 0, 0}; switch(m_channel) { case 0: // Luma channelHot[0] = 1; channelHot[1] = 1; channelHot[2] = 1; break; case 1: // Channel overlay mode. Do rgb, and then swizzle later channelHot[0] = 1; channelHot[1] = 1; channelHot[2] = 1; channelHot[3] = 1; break; case 2: // RGB channelHot[0] = 1; channelHot[1] = 1; channelHot[2] = 1; channelHot[3] = 1; break; case 3: // R channelHot[0] = 1; break; case 4: // G channelHot[1] = 1; break; case 5: // B channelHot[2] = 1; break; case 6: // A channelHot[3] = 1; break; default: break; } float lumacoef[3]; config->getDefaultLumaCoefs(lumacoef); float m44[16]; float offset[4]; OCIO::MatrixTransform::View(m44, offset, channelHot, lumacoef); OCIO::MatrixTransformRcPtr swizzle = OCIO::MatrixTransform::Create(); swizzle->setValue(m44, offset); m_transform->setChannelView(swizzle); } OCIO::ConstContextRcPtr context = getLocalContext(); m_processor = config->getProcessor(context, m_transform, OCIO::TRANSFORM_DIR_FORWARD); } catch(OCIO::Exception &e) { error(e.what()); return; } if(m_processor->isNoOp()) { set_out_channels(DD::Image::Mask_None); // prevents engine() from being called } else { set_out_channels(DD::Image::Mask_All); } DD::Image::PixelIop::_validate(for_real); } // Note: Same as OCIO ColorSpace::in_channels. void OCIODisplay::in_channels(int /* n unused */, DD::Image::ChannelSet& mask) const { DD::Image::ChannelSet done; foreach(c, mask) { if ((m_layersToProcess & c) && DD::Image::colourIndex(c) < 4 && !(done & c)) { done.addBrothers(c, 4); } } mask += done; } // Note: Same as OCIO ColorSpace::pixel_engine. void OCIODisplay::pixel_engine( const DD::Image::Row& in, int /* rowY unused */, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out) { int rowWidth = rowXBound - rowX; DD::Image::ChannelSet done; foreach (requestedChannel, outputChannels) { // Skip channels which had their trios processed already, if (done & requestedChannel) { continue; } // Pass through channels which are not selected for processing // and non-rgb channels. if (!(m_layersToProcess & requestedChannel)) { out.copy(in, requestedChannel, rowX, rowXBound); continue; } DD::Image::Channel rChannel = DD::Image::brother(requestedChannel, 0); DD::Image::Channel gChannel = DD::Image::brother(requestedChannel, 1); DD::Image::Channel bChannel = DD::Image::brother(requestedChannel, 2); DD::Image::Channel aChannel = outputChannels.next(bChannel); done += rChannel; done += gChannel; done += bChannel; done += aChannel; const float *rIn = in[rChannel] + rowX; const float *gIn = in[gChannel] + rowX; const float *bIn = in[bChannel] + rowX; const float *aIn = in[aChannel] + rowX; float *rOut = out.writable(rChannel) + rowX; float *gOut = out.writable(gChannel) + rowX; float *bOut = out.writable(bChannel) + rowX; float *aOut = out.writable(aChannel) + rowX; // OCIO modifies in-place // Note: xOut can equal xIn in some circumstances, such as when the // 'Black' (throwaway) scanline is uses. We thus must guard memcpy, // which does not allow for overlapping regions. if (rOut != rIn) memcpy(rOut, rIn, sizeof(float)*rowWidth); if (gOut != gIn) memcpy(gOut, gIn, sizeof(float)*rowWidth); if (bOut != bIn) memcpy(bOut, bIn, sizeof(float)*rowWidth); if (aOut != aIn) memcpy(aOut, aIn, sizeof(float)*rowWidth); try { OCIO::PlanarImageDesc img(rOut, gOut, bOut, aOut, rowWidth, /*height*/ 1); m_processor->apply(img); } catch(OCIO::Exception &e) { error(e.what()); } // Hack to emulate Channel overlay mode if(m_channel == 1) { for(int i=0; i= static_cast(m_displayNames.size())) { std::ostringstream err; err << "No or invalid display specified (index " << m_displayIndex << ")."; std::cerr << err.str(); // This can't set an error, as it's called in the constructor return; } const char * display = m_displayCstrNames[m_displayIndex]; int numViews = config->getNumViews(display); std::string defaultViewName = config->getDefaultView(display); // Try to maintain an old transform name, or use the default. bool hasOldViewName = false; std::string oldViewName = ""; if (m_viewIndex >= 0 && m_viewIndex < static_cast(m_viewNames.size())) { hasOldViewName = true; oldViewName = m_viewNames[m_viewIndex]; } int defaultViewIndex = 0, newViewIndex = -1; m_viewCstrNames.clear(); m_viewNames.clear(); for(int i = 0; i < numViews; i++) { std::string view = config->getView(display, i); m_viewNames.push_back(view); if (hasOldViewName && view == oldViewName) { newViewIndex = i; } if (view == defaultViewName) { defaultViewIndex = i; } } for(unsigned int i=0; ienumerationKnob(); enumKnob->menu(m_viewNames); m_viewKnob->set_value(newViewIndex); } } int OCIODisplay::knob_changed(DD::Image::Knob *k) { if (k == m_displayKnob && m_displayKnob != NULL) { refreshDisplayTransforms(); return 1; } else { return 0; } } const DD::Image::Op::Description OCIODisplay::description("OCIODisplay", build); const char* OCIODisplay::Class() const { return description.name; } const char* OCIODisplay::displayName() const { return description.name; } const char* OCIODisplay::node_help() const { // TODO more detailed help text return "Use OpenColorIO to convert for a display device."; } DD::Image::Op* build(Node *node) { DD::Image::NukeWrapper *op = new DD::Image::NukeWrapper(new OCIODisplay(node)); op->noMix(); op->noMask(); op->noChannels(); // prefer our own channels control without checkboxes / alpha op->noUnpremult(); return op; } opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOColorSpace/0000755000175000017500000000000012225107126020527 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOColorSpace/OCIOColorSpace.cpp0000644000175000017500000002756712225107126023760 0ustar mfvmfv/** * OpenColorIO ColorSpace Iop. */ #include "OCIOColorSpace.h" namespace OCIO = OCIO_NAMESPACE; #include #include #include #include #include #include #include #include #include // Should we use cascasing ColorSpace menus #if defined kDDImageVersionInteger && (kDDImageVersionInteger>=62300) #define OCIO_CASCADE #endif OCIOColorSpace::OCIOColorSpace(Node *n) : DD::Image::PixelIop(n) { m_hasColorSpaces = false; m_inputColorSpaceIndex = 0; m_outputColorSpaceIndex = 0; // Query the color space names from the current config // TODO (when to) re-grab the list of available color spaces? How to save/load? try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); OCIO::ConstColorSpaceRcPtr defaultcs = config->getColorSpace(OCIO::ROLE_SCENE_LINEAR); if(!defaultcs) throw std::runtime_error("ROLE_SCENE_LINEAR not defined."); std::string defaultColorSpaceName = defaultcs->getName(); for(int i = 0; i < config->getNumColorSpaces(); i++) { std::string csname = config->getColorSpaceNameByIndex(i); #ifdef OCIO_CASCADE std::string family = config->getColorSpace(csname.c_str())->getFamily(); if(family.empty()) m_colorSpaceNames.push_back(csname.c_str()); else m_colorSpaceNames.push_back(family + "/" + csname); #else m_colorSpaceNames.push_back(csname); #endif if(csname == defaultColorSpaceName) { m_inputColorSpaceIndex = i; m_outputColorSpaceIndex = i; } } } catch (OCIO::Exception& e) { std::cerr << "OCIOColorSpace: " << e.what() << std::endl; } catch (...) { std::cerr << "OCIOColorSpace: Unknown exception during OCIO setup." << std::endl; } // Then, create a cstr array for passing to Nuke // This must be done in a second pass, lest the original m_colorSpaceNames // std::string be reallocated in the interim for(unsigned int i=0; igetCurrentContext(); OCIO::ContextRcPtr mutableContext; if(!m_contextKey1.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey1.c_str(), m_contextValue1.c_str()); } if(!m_contextKey2.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey2.c_str(), m_contextValue2.c_str()); } if(!m_contextKey3.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey3.c_str(), m_contextValue3.c_str()); } if(!m_contextKey4.empty()) { if(!mutableContext) mutableContext = context->createEditableCopy(); mutableContext->setStringVar(m_contextKey4.c_str(), m_contextValue4.c_str()); } if(mutableContext) context = mutableContext; return context; } void OCIOColorSpace::append(DD::Image::Hash& localhash) { // TODO: Hang onto the context, what if getting it // (and querying getCacheID) is expensive? try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); OCIO::ConstContextRcPtr context = getLocalContext(); std::string configCacheID = config->getCacheID(context); localhash.append(configCacheID); } catch(OCIO::Exception &e) { error(e.what()); return; } } void OCIOColorSpace::_validate(bool for_real) { if(!m_hasColorSpaces) { error("No color spaces available for input and/or output."); return; } int inputColorSpaceCount = static_cast(m_inputColorSpaceCstrNames.size()) - 1; if(m_inputColorSpaceIndex < 0 || m_inputColorSpaceIndex >= inputColorSpaceCount) { std::ostringstream err; err << "Input color space index (" << m_inputColorSpaceIndex << ") out of range."; error(err.str().c_str()); return; } int outputColorSpaceCount = static_cast(m_outputColorSpaceCstrNames.size()) - 1; if(m_outputColorSpaceIndex < 0 || m_outputColorSpaceIndex >= outputColorSpaceCount) { std::ostringstream err; err << "Output color space index (" << m_outputColorSpaceIndex << ") out of range."; error(err.str().c_str()); return; } try { OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig(); const char * inputName = config->getColorSpaceNameByIndex(m_inputColorSpaceIndex); const char * outputName = config->getColorSpaceNameByIndex(m_outputColorSpaceIndex); OCIO::ConstContextRcPtr context = getLocalContext(); m_processor = config->getProcessor(context, inputName, outputName); } catch(OCIO::Exception &e) { error(e.what()); return; } if(m_processor->isNoOp()) { set_out_channels(DD::Image::Mask_None); // prevents engine() from being called } else { set_out_channels(DD::Image::Mask_All); } DD::Image::PixelIop::_validate(for_real); } // Note that this is copied by others (OCIODisplay) void OCIOColorSpace::in_channels(int /* n unused */, DD::Image::ChannelSet& mask) const { DD::Image::ChannelSet done; foreach(c, mask) { if (DD::Image::colourIndex(c) < 3 && !(done & c)) { done.addBrothers(c, 3); } } mask += done; } // See Saturation::pixel_engine for a well-commented example. // Note that this is copied by others (OCIODisplay) void OCIOColorSpace::pixel_engine( const DD::Image::Row& in, int /* rowY unused */, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out) { int rowWidth = rowXBound - rowX; DD::Image::ChannelSet done; foreach (requestedChannel, outputChannels) { // Skip channels which had their trios processed already, if (done & requestedChannel) { continue; } // Pass through channels which are not selected for processing // and non-rgb channels. if (colourIndex(requestedChannel) >= 3) { out.copy(in, requestedChannel, rowX, rowXBound); continue; } DD::Image::Channel rChannel = DD::Image::brother(requestedChannel, 0); DD::Image::Channel gChannel = DD::Image::brother(requestedChannel, 1); DD::Image::Channel bChannel = DD::Image::brother(requestedChannel, 2); done += rChannel; done += gChannel; done += bChannel; const float *rIn = in[rChannel] + rowX; const float *gIn = in[gChannel] + rowX; const float *bIn = in[bChannel] + rowX; float *rOut = out.writable(rChannel) + rowX; float *gOut = out.writable(gChannel) + rowX; float *bOut = out.writable(bChannel) + rowX; // OCIO modifies in-place // Note: xOut can equal xIn in some circumstances, such as when the // 'Black' (throwaway) scanline is uses. We thus must guard memcpy, // which does not allow for overlapping regions. if (rOut != rIn) memcpy(rOut, rIn, sizeof(float)*rowWidth); if (gOut != gIn) memcpy(gOut, gIn, sizeof(float)*rowWidth); if (bOut != bIn) memcpy(bOut, bIn, sizeof(float)*rowWidth); try { OCIO::PlanarImageDesc img(rOut, gOut, bOut, NULL, rowWidth, /*height*/ 1); m_processor->apply(img); } catch(OCIO::Exception &e) { error(e.what()); } } } const DD::Image::Op::Description OCIOColorSpace::description("OCIOColorSpace", build); const char* OCIOColorSpace::Class() const { return description.name; } const char* OCIOColorSpace::displayName() const { return description.name; } const char* OCIOColorSpace::node_help() const { // TODO more detailed help text return "Use OpenColorIO to convert from one color space to another."; } // This class is necessary in order to call knobsAtTheEnd(). Otherwise, the NukeWrapper knobs // will be added to the Context tab instead of the primary tab. class OCIOColorSpaceNukeWrapper : public DD::Image::NukeWrapper { public: OCIOColorSpaceNukeWrapper(DD::Image::PixelIop* op) : DD::Image::NukeWrapper(op) { } virtual void attach() { wrapped_iop()->attach(); } virtual void detach() { wrapped_iop()->detach(); } virtual void knobs(DD::Image::Knob_Callback f) { OCIOColorSpace* csIop = dynamic_cast(wrapped_iop()); if(!csIop) return; DD::Image::NukeWrapper::knobs(f); DD::Image::Tab_knob(f, "Context"); { DD::Image::String_knob(f, &csIop->m_contextKey1, "key1"); DD::Image::Spacer(f, 10); DD::Image::String_knob(f, &csIop->m_contextValue1, "value1"); DD::Image::ClearFlags(f, DD::Image::Knob::STARTLINE); DD::Image::String_knob(f, &csIop->m_contextKey2, "key2"); DD::Image::Spacer(f, 10); DD::Image::String_knob(f, &csIop->m_contextValue2, "value2"); DD::Image::ClearFlags(f, DD::Image::Knob::STARTLINE); DD::Image::String_knob(f, &csIop->m_contextKey3, "key3"); DD::Image::Spacer(f, 10); DD::Image::String_knob(f, &csIop->m_contextValue3, "value3"); DD::Image::ClearFlags(f, DD::Image::Knob::STARTLINE); DD::Image::String_knob(f, &csIop->m_contextKey4, "key4"); DD::Image::Spacer(f, 10); DD::Image::String_knob(f, &csIop->m_contextValue4, "value4"); DD::Image::ClearFlags(f, DD::Image::Knob::STARTLINE); } } }; static DD::Image::Op* build(Node *node) { DD::Image::NukeWrapper *op = (new OCIOColorSpaceNukeWrapper(new OCIOColorSpace(node))); op->channels(DD::Image::Mask_RGB); return op; } opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOColorSpace/OCIOColorSpace.h0000644000175000017500000001024312225107126023404 0ustar mfvmfv#ifndef INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ #define INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ // Include these early, for Nuke's headers under gcc 4.4.2. #include #include #include #include #include #include namespace OCIO = OCIO_NAMESPACE; /*! * Iop that uses OpenColorIO to perform colorspace conversions */ class OCIOColorSpace : public DD::Image::PixelIop { protected: bool m_hasColorSpaces; //!< Were colorspaces found for both input and output? If not, always error. int m_inputColorSpaceIndex; //!< index of input colorspace selection from the pulldown list knob int m_outputColorSpaceIndex; std::vector m_colorSpaceNames; //!< list of input and output colorspace names (memory for const char* s below) std::vector m_inputColorSpaceCstrNames; //!< list for the pulldown list knob (used raw) std::vector m_outputColorSpaceCstrNames; OCIO::ConstContextRcPtr getLocalContext(); OCIO::ConstProcessorRcPtr m_processor; public: OCIOColorSpace(Node *node); virtual ~OCIOColorSpace(); // These are public so the nuke wrapper can introspect into it // TODO: use 'friend' instead std::string m_contextKey1; std::string m_contextValue1; std::string m_contextKey2; std::string m_contextValue2; std::string m_contextKey3; std::string m_contextValue3; std::string m_contextKey4; std::string m_contextValue4; static const DD::Image::Op::Description description; /*! Return the command name that will be stored in Nuke scripts. */ virtual const char *Class() const; /*! * Return a name for this class that will be shown to the user. The * default implementation returns Class(). You can return a different * (ie more user-friendly) name instead here, and there is no need for * this to be unique. * * Nuke currently will remove any trailing digits and underscores from * this and add a new number to make a unique name for the new node. * * \return "OCIOColorSpace" */ virtual const char *displayName() const; /*! * Return help information for this node. This information is in the * pop-up window that the user gets when they hit the [?] button in * the lower-left corner of the control panel. */ virtual const char *node_help() const; /*! * Define the knobs that will be presented in the control panel. */ virtual void knobs(DD::Image::Knob_Callback f); /*! * Specify the channels required from input n to produce the channels * in mask by modifying mask in-place. (At least one channel in the * input is assumed.) * * Since colorspace conversions can have channel cross-talk, any rgb * output channel requires all its rgb bretheren. (Non-rgb * are passed through.) */ virtual void in_channels(int n, DD::Image::ChannelSet& mask) const; /*! * Calculate the output pixel data. * \param rowY vertical line number * \param rowX inclusive left bound * \param rowXBound exclusive right bound * \param outputChannels a subset of out_channels(), the required channels to be produced */ virtual void pixel_engine( const DD::Image::Row& in, int rowY, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out); virtual void append(DD::Image::Hash& hash); protected: /*! * Check that colorspaces are available, and that the transform * is not a noop. (As OCIO whether a given transform is a noop, since it * can do more analysis than just name matching.) */ virtual void _validate(bool for_real); }; static DD::Image::Op* build(Node *node); #endif // INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLookTransform/0000755000175000017500000000000012225107126021275 5ustar mfvmfvopencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLookTransform/OCIOLookTransform.h0000644000175000017500000001120412225107126024716 0ustar mfvmfv#ifndef INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ #define INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ // Include these early, for Nuke's headers under gcc 4.4.2. #include #include #include #include #include #include namespace OCIO = OCIO_NAMESPACE; /*! * Iop that uses OpenColorIO to perform colorspace conversions */ class OCIOLookTransform : public DD::Image::PixelIop { protected: bool m_hasColorSpaces; //!< Were colorspaces found for both input and output? If not, always error. std::string m_look; std::string m_lookhelp; int m_dirIndex; int m_inputColorSpaceIndex; int m_outputColorSpaceIndex; std::vector m_colorSpaceNames; //!< list of input and output colorspace names (memory for const char* s below) std::vector m_inputColorSpaceCstrNames; //!< list for the pulldown list knob (used raw) std::vector m_outputColorSpaceCstrNames; bool m_ignoreErrors; OCIO::ConstContextRcPtr getLocalContext(); OCIO::ConstProcessorRcPtr m_processor; /*! Controlled by hidden "version" knob, incremented to redraw image */ int m_reload_version; public: OCIOLookTransform(Node *node); virtual ~OCIOLookTransform(); // These are public so the nuke wrapper can introspect into it // TODO: use 'friend' instead std::string m_contextKey1; std::string m_contextValue1; std::string m_contextKey2; std::string m_contextValue2; std::string m_contextKey3; std::string m_contextValue3; std::string m_contextKey4; std::string m_contextValue4; static const DD::Image::Op::Description description; /*! Return the command name that will be stored in Nuke scripts. */ virtual const char *Class() const; /*! * Return a name for this class that will be shown to the user. The * default implementation returns Class(). You can return a different * (ie more user-friendly) name instead here, and there is no need for * this to be unique. * * Nuke currently will remove any trailing digits and underscores from * this and add a new number to make a unique name for the new node. * * \return "OCIOLookTransform" */ virtual const char *displayName() const; /*! * Return help information for this node. This information is in the * pop-up window that the user gets when they hit the [?] button in * the lower-left corner of the control panel. */ virtual const char *node_help() const; /*! * Define the knobs that will be presented in the control panel. */ virtual void knobs(DD::Image::Knob_Callback f); /*! * Specify the channels required from input n to produce the channels * in mask by modifying mask in-place. (At least one channel in the * input is assumed.) * * Since colorspace conversions can have channel cross-talk, any rgb * output channel requires all its rgb bretheren. (Non-rgb * are passed through.) */ virtual void in_channels(int n, DD::Image::ChannelSet& mask) const; /*! * Calculate the output pixel data. * \param rowY vertical line number * \param rowX inclusive left bound * \param rowXBound exclusive right bound * \param outputChannels a subset of out_channels(), the required channels to be produced */ virtual void pixel_engine( const DD::Image::Row& in, int rowY, int rowX, int rowXBound, DD::Image::ChannelMask outputChannels, DD::Image::Row& out); protected: /*! * Check that colorspaces are available, and that the transform * is not a noop. (As OCIO whether a given transform is a noop, since it * can do more analysis than just name matching.) */ virtual void _validate(bool for_real); /*! * Ensure Node hash is reflects all parameters */ virtual void append(DD::Image::Hash& nodehash); /*! * Hide and show UI elements based on other parameters. Also handles reload button */ virtual int knob_changed(DD::Image::Knob* k); }; static DD::Image::Op* build(Node *node); #endif // INCLUDED_OCIO_NUKE_COLORSPACECONVERSION_H_ opencolorio-1.0.9~dfsg0.orig/src/nuke/OCIOLookTransform/OCIOLookTransform.cpp0000644000175000017500000004250212225107126025256 0ustar mfvmfv/** * OpenColorIO ColorSpace Iop. */ #include "OCIOLookTransform.h" namespace OCIO = OCIO_NAMESPACE; #include #include #include #include #include #include #include #include #include // Should we use cascasing ColorSpace menus #if defined kDDImageVersionInteger && (kDDImageVersionInteger>=62300) #define OCIO_CASCADE #endif OCIOLookTransform::OCIOLookTransform(Node *n) : DD::Image::PixelIop(n) { m_hasColorSpaces = false; m_inputColorSpaceIndex = 0; m_outputColorSpaceIndex = 0; m_dirIndex = 0; m_ignoreErrors = false; m_reload_version = 1; // Query the colorspace names from the current config // TODO (when to) re-grab the list of available colorspaces? How to save/load? OCIO::ConstConfigRcPtr config; std::string linear; try { config = OCIO::GetCurrentConfig(); OCIO::ConstColorSpaceRcPtr linearcs = config->getColorSpace(OCIO::ROLE_SCENE_LINEAR); if(!linearcs) throw std::runtime_error("ROLE_SCENE_LINEAR not defined."); linear = linearcs->getName(); if(config->getNumLooks()>0) { m_look = config->getLookNameByIndex(0); } std::ostringstream os; os << "Specify the look(s) to apply, as predefined in the OpenColorIO "; os << "configuration. This may be the name of a single look, or a "; os << "combination of looks using the 'look syntax' (outlined below)\n\n"; std::string firstlook = "a"; std::string secondlook = "b"; if(config->getNumLooks()>0) { os << "Looks: "; for(int i = 0; igetNumLooks(); ++i) { if(i!=0) os << ", "; const char * lookname = config->getLookNameByIndex(i); os << lookname; if(i==0) firstlook = lookname; if(i==1) secondlook = lookname; } os << "\n\n"; } else { os << "NO LOOKS DEFINED -- "; os << "This node cannot be used until looks are added to the OCIO Configuration. "; os << "See opencolorio.org for examples.\n\n"; } os << "Look Syntax:\n"; os << "Multiple looks are combined with commas: '"; os << firstlook << ", " << secondlook << "'\n"; os << "Direction is specified with +/- prefixes: '"; os << "+" << firstlook << ", -" << secondlook << "'\n"; os << "Missing look 'fallbacks' specified with |: '"; os << firstlook << ", -" << secondlook << " | -" << secondlook << "'"; m_lookhelp = os.str(); } catch (const OCIO::Exception& e) { std::cerr << "OCIOLookTransform: " << e.what() << std::endl; } catch (...) { std::cerr << "OCIOLookTransform: Unknown exception during OCIO setup." << std::endl; } if(!config) { m_hasColorSpaces = false; return; } for(int i = 0; i < config->getNumColorSpaces(); i++) { std::string csname = config->getColorSpaceNameByIndex(i); #ifdef OCIO_CASCADE std::string family = config->getColorSpace(csname.c_str())->getFamily(); if(family.empty()) m_colorSpaceNames.push_back(csname.c_str()); else m_colorSpaceNames.push_back(family + "/" + csname); #else m_colorSpaceNames.push_back(csname); #endif if(csname == linear) { m_inputColorSpaceIndex = i; m_outputColorSpaceIndex = i; } } // Step 2: Create a cstr array for passing to Nuke // (This must be done in a second pass, lest the original strings be reallocated) for(unsigned int i=0; i