GithubHelp home page GithubHelp logo

cdl_convert's Introduction

CDL Convert

PyPI VersionBuild StatusCoverage StatusCode Health

Introduction

cdl_convert converts between common ASC CDL formats. The American Society of Cinematographers Color Decision List (ASC CDL, or CDL for short) is a schema to simplify the process of interchanging color data between various programs and facilities.

The ASC has defined schemas for including the 10 basic numbers in 5 different formats:

  • Avid Log Exchange (ALE)
  • Film Log EDL Exchange (FLEx)
  • CMX EDL
  • XML Color Correction (cc)
  • XML Color Correction Collection (ccc)
  • XML Color Decision List (cdl)

Unofficial Formats:

  • OCIOCDLTransform, a Foundry Nuke node
  • Space separated CDL, a Rhythm & Hues internal cdl format

It is the purpose of cdl_convert to convert ASC CDL information between these basic formats to further facilitate the ease of exchange of color data within the Film and TV industries.

cdl_convert supports parsing ALE, FLEx, CC, CCC, CDL CMX EDL and RCDL. We can write out CC, CCC, CDL and RCDL.

cdl_convert is not associated with the American Society of Cinematographers

Usage

Most likely you'll use cdl_convert as a script, instead of a python package itself (indeed, even the name is formatted more like a script (with an underscore) than the more common all lowercase of python modules.

For usage as a python module, see the module documentation.

Script Usage

If you just want to convert to a .cc XML file, the only required argument is an input file, like so::

$ cdl_convert ./di_v001.flex

You can override the default .cc output, or provide multiple outputs with the -o flag.:

$ cdl_convert ./di_v001.flex -o cc,cdl

Changelog

New in version 0.9.2:

  • Fixed a bug where ALE's with blank lines would not convert correctly.
  • Fixed a bug that was preventing cdl_convert from being correctly installed in Python 2.6
  • Fixed continuous integration testing.
  • No longer officially supporting Python 3.2, as I've had to remove it from our CI builds. It should still work just fine though, but we won't be running CI against it.

New in version 0.9:

  • Added ability to parse CMX EDLs
  • Fixed a script bug where a collection format containing color decisions will not have those color decisions exported as individual color corrections.
  • Fixed a bug where we weren't reading line endings correctly in certain situations.
  • Added a cdl_convert.py stub file to the package root level, which will allow running of the cdl_convert script without installation. Due to relative imports in the python code, it was no longer possible to call cdl_convert/cdl_convert.py directly.
  • The script, when run directly from cdl_convert.py, will now write errors to stderror correctly, and exit with a status of 1.

New in version 0.8:

  • Added --single flag. When provided with an output collection format, each color correction in the input will be exported to it's own collection.
  • Giving a ColorCorrection a non-duplicate ID now works unless the --halt flag is given. This means that incoming collections that contain duplicate IDs will not fail out.

New in version 0.7.1:

  • Fixed bug where ALE's without 'Scan Filename' fields could not parse correctly.

New in version 0.7:

The biggest change in 0.7 is the addition of collection format support. .ccc, Color Correction Collections, can now be parsed and written. .cdl, Color Decision Lists, can now be parsed and written. .ale and .flex files now return a collection.

  • New script flags:
    • Adds --check flag to script, which checks all parsed ColorCorrects for sane values, and prints warnings to shell
    • Adds -d, --destination flag to the script, which allows user to specify the output directory converted files will be written to.
    • Adds --no-ouput flag to the script, which goes through the entire conversion process but doesn't actually write anything to disk. Useful for troubleshooting, especially when combined with --check
    • Adds --halt flag to the script, which halts on errors that can be resolved safely (such as negative slope or power values)
  • Renames ColorCollectionBase to ColorCollection , since it will be used directly by both ccc and cdl.
  • Adds parse_ccc which returns a ColorCollection .
  • Adds write_ccc which writes a ColorCollection as a ccc file.
  • Adds parse_cdl which returns a ColorCollection .
  • Adds write_cdl which returns a ColorCollection as a cdl file.
  • ColorCollection is now a fully functional container class, with many attributes and methods.
  • Added ColorDecision , which stores either a ColorCorrection or ColorCorrectionRef , and an optional MediaRef
  • Added ColorCorrectionRef , which stores a reference to a ColorCorrection
  • Added parent attribute to ColorCorrection .
  • Calling sop_node or sat_node on a ColorCorrection before attempting to set a SOP or Sat power now works.
  • ColorCorrection cdl_file init argument renamed to input_file, which is now optional and able to be set after init.
  • parse_cc and parse_rnh_cdl now only yield a single ColorCorrection , not a single member list.
  • Added dev-requirements.txt (contains mock)
  • All determine_dest methods now take a second directory argument, which determines the output directory.
  • Adds sanity_check function which prints values which might be unusual to stdout.
  • parse_cdl and write_cdl renamed to parse_rnh_cdl and write_rnh_cdl respectively.
  • member_reset methods:
    • ColorCorrection now has a reset_members method, which resets the class level member's dictionary.
    • MediaRef also has a reset_members method, as does ColorCollection
    • reset_all function calls all of the above reset_members methods at once.
  • Renamed cdl_file argument:
    • parse_cc cdl_file arg renamed to input_file and now accepts a either a raw string or an ElementTree Element as input_file.
    • parse_rnh_cdl cdl_file arg renamed to input_file.
    • parse_ale edl_file arg renamed to input_file.
    • parse_flex edl_file arg renamed to input_file.
  • Python Structure Refactoring
    • Moved HALT_ON_ERROR into the config module, which should now be referenced and set by importing the entire config module, and referencing or setting config.HALT_ON_ERROR
    • Script functionality remains in cdl_convert.cdl_convert, but everything else has been moved out.
    • AscColorSpaceBase , AscDescBase , AscXMLBase and ColorNodeBase now live under cdl_convert.base
    • ColorCollection now lives in cdl_convert.collection
    • ColorCorrection , SatNode and SopNode now live under cdl_convert.correction
    • ColorDecision , ColorCorrectionRef and MediaRef now live under cdl_convert.decision
    • All parse functions now live under cdl_convert.parse
    • All write functions now live under cdl_convert.write
    • sanity_check now live under cdl_convert.utils
    • reset_all now lives under the main module

Installation

Installing is as simple as using pip::

$ pip install cdl_convert

If you don't want to bother with a pip style install, you can alternatively grab the entire cdl_convert directory, then set up a shortcut to call cdl_convert/cdl_convert.py

GitHub, Bug Reporting and Support

At cdl_convert's GitHub page you can browse the code and the history of the project.

Builds can be downloaded from the GitHub page or the PyPI repository entry.

The issues page on GitHub is the best place to report bugs or request support, and while cdl_convert is distributed with no warranty of any kind, issues will be read and helped if able.

Frequently Asked Questions

  • What versions of Python does cdl_convert support?

    cdl_convert works in Python 2.6 through 3.4 and PyPy. A full test suite runs continuous integration through Travis-ci.org, coverage through coveralls.io, and code quality checked with landscape.io. Code is pep 8 compliant, with docstrings following google code docstring standards.

  • Why don't you support format X?

    I either haven't had time to build a parser for the format yet, or I might even be unaware it exists. Perhaps you should drop by the issues page and create a request for the format? If creating a request for a format it helps immensely to have a sample of that format.

  • Why the underscore?

    cdl_convert started as a simple script to convert from one format to another. As such, it wasn't named with the standards that one would usually use for a python module. By the time the project became big enough, was on PyPI, etc, it was too spread out on the web, in too many places to make changing easy. In the end, I opted to keep it. At some point, cdl_convert might migrate into a larger, more generic film & tv python module, which will be named properly.

Contributing

Samples

Please, please, please submit samples of the following formats:

  • FLEx
  • ALE
  • CMX
  • CCC

These are complex formats, and seeing real world samples helps write tests that ensure correct parsing of real world EDLs and CDLs. If you don't even see a format of CDL listed that you know exists, open an issue at the github issues page asking for parse/write support for the format, and include a sample.

Squashing Bugs

Take a look at the issues page and if you see something that you think you can bang out, leave a comment saying you're going to take it on. While many issues are already assigned to the principal authors, just because it's assigned doesn't mean any work has begun.

Submitting Code

Before generating a pull request, make sure to run the test suite::

$ python setup.py test

If the tests fail, note which tests are failing, how they would have been affected by your code. Always assume you broke something rather than that the tests are 'wrong.' If you know you didn't break something, and the tests are simply reporting out of date results based on your changes, change the tests.

If your code fails the tests (Travis-ci.org checks all pull requests when you create them) it will be rejected. If the code style doesn't follow PEP-8, it's not going to be a high priority for integration.

When submitting, you'll be asked to waive copyright to your submitted code to the listed authors. This is so we can keep a tight handle on the code and change the license for future releases if needed.

License

The MIT License (MIT)

cdl_convert
Copyright (c) 2015 Sean Wallitsch
http://github.com/shidarin/cdl_convert/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cdl_convert's People

Contributors

shidarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cdl_convert's Issues

Refactor cdl_convert.py and all tests to be submodules

"cdl_convert is huge. It's longer than I ever thought it could be, since starting the project. While a large amount of this line length is documentation, we still have over 600 lines of code in the cdl_convert module. With docs, we're closing in at 3000 lines.

This makes it more and more difficult to work with the code, and less and less organized. While in general the code is alphabetized within Classes and Functions- class ColorCollection occurs after class ColorCorrection because the collection needs to reference the correction. This just looks sloppy."

From issue 25 we need to bite the bullet and refactor cdl_convert into submodules.

Submodule breakup?:

  • Base Classes
  • Top Level Classes
  • Parsers
  • Writers
  • Script

DaVinci Resolve to Multiple CDLs Request

First, is there a way to export per-shot .cdl files instead of a single CDL bundle when there are multiple entries in the source? I know the cc files can do that, but I get an error in Color Finesse (in AE) with those. Color Finesse can load .cdl files, but only sees the first item if there are many. I ended up cutting and pasting the entries, which worked, but wasn't ideal.

Also, I had s situation with the Resolve ALE export where there were two clips with the same name. The script kinda choked on that. I don't see any reason this needs to be addressed, it's an odd one. Just wanted to mention it.

The only other thing that I had to deal with was path and filenames with spaces in them. I know that's a common issue with utility programs and we should be better about file naming here. Still haven't developed good habits yet.

Generally, I think it's a fantastic tool. Thanks again for developing it.

Add CC ref system

ColorCorrect Ref in the XML spec allows a reference to an existing ColorCorrect via id.

We need:

  • a cls member dict with id as keys and the CCR as values
  • an a attribute to check the ColorCorrection member list to see if the id points to a valid CC
  • an attribute to fetch the linked CC
  • a way to change the reference id (which of course changes the membership dict)
  • inheritance from AscXMLBase so we can build XML elements that represent this.

Parsing a Color Correction node with valid saturation value will sometimes fail

For a sat node that looks like below - which is, admittedly, very dumb looking.

<SatNode>
    <Saturation> 1 </Saturation>
</SatNode>

I get this error:

Error setting saturation with value: " 1 .0". Value is not a number.
Traceback (most recent call last):
  File "/Users/gregcotten/Library/Developer/Xcode/DerivedData/Lattice-hbhjbgnjvczkbcfgkxhrjqvqoaks/Build/Products/Debug-Standalone/Lattice.app/Contents/Resources/cdl_convert/cdl_convert.py", line 294, in <module>
    main()
  File "/Users/gregcotten/Library/Developer/Xcode/DerivedData/Lattice-hbhjbgnjvczkbcfgkxhrjqvqoaks/Build/Products/Debug-Standalone/Lattice.app/Contents/Resources/cdl_convert/cdl_convert.py", line 222, in main
    color_decisions = parse.parse_file(filepath, filetype_in)
  File "cdl_convert/parse.py", line 724, in parse_file
    return INPUT_FORMATS[filetype](filepath)
  File "cdl_convert/parse.py", line 449, in parse_cdl
    if not cdl.parse_xml_color_decisions(root):
  File "cdl_convert/collection.py", line 633, in parse_xml_color_decisions
    color_decision.parse_xml_color_decision(cd_node)
  File "cdl_convert/decision.py", line 581, in parse_xml_color_decision
    if not self.parse_xml_color_correction(xml_element):
  File "cdl_convert/decision.py", line 550, in parse_xml_color_correction
    self.cc = parse.parse_cc(cc_elem)
  File "cdl_convert/parse.py", line 336, in parse_cc
    cdl.sat = find_required(sat_xml, ['Saturation']).text
  File "cdl_convert/correction.py", line 366, in sat
    self.sat_node.sat = sat_value
  File "cdl_convert/correction.py", line 522, in sat
    value = self._check_single_value(value, 'saturation')
  File "cdl_convert/base.py", line 457, in _check_single_value
    value = to_decimal(value, name)
  File "cdl_convert/utils.py", line 186, in to_decimal
    value=value
TypeError: Error setting saturation with value: " 1 .0". Value is not a number.

I think the culprit is this. Probably don't need to be adding '.0' to the value.

if '.' not in value:
     value.strip() += '.0'

Add write_file function

Exact same as parse_file except for writing.

More complicated however, because how we write a file depends on what type of object we're passed.

Add --halt to script

Add a --halt option which triggers the HALT_ON_ERROR global var to True, causing handled exceptions to stop the processing.

Add --no-output to script

Add --no-output to script, which would parse the incoming file but not write it anywhere. Useful for debugging problems in the incoming files.

CDL with color decisions not exporting color corrects

running

cdl_convert /path/to/reference.cdl -d ~/output 

The "reference .cdl" is the valid CDL in the tests. This results in 0 .cc files created but returns normally.

I suspect it is because parsing a CDL doesn't populate color_corrections - just color_decisions.

In the writing process in cdl_convert.py:

# Writing
for ext in args.output:
    if ext in config.SINGLE_FORMATS or args.single:
        if filetype_in in config.COLLECTION_FORMATS:
            for color_correct in color_decisions.color_corrections:
                write_single_file(color_correct, ext)

Perhaps it should also iterate over the color_decisions and find their unique color corrections?

Rename current cdl to rnh_cdl

The cdl in cdl_convert currently is a rhythm and hues specific format and should not be taking up the cdl namespace.

Please support CMX EDL with ASC comments (standard)

Hey there!

I'm surprised the tool doesn't parse CMX EDL files. These files are very common among post-production houses and very standard when sending data across facilities. here is an example:

TITLE: /mnt/Avid02/cdls/20150204/makeup_test_cdl.edl

001 RR0010.bg1.SRC V C 00:00:31:05 00:00:46:09 01:00:00:00 01:00:15:04
*ASC_SOP (1.763262 1.776213 2.034658)(0.064582 -0.026949 -0.091332)(1.191500 1.191500 1.191500)
*ASC_SAT 0.723500

002 BC1010.bg1.SRC V C 00:00:47:14 00:00:57:03 01:00:20:04 01:00:29:17
*ASC_SOP (1.685540 1.464669 1.478464)(0.015455 -0.009279 -0.018970)(1.191500 1.191500 1.191500)
*ASC_SAT 0.687500

003 XA1410.bg1.SRC V C 00:01:02:00 00:01:11:19 01:00:14:17 01:00:14:12
*ASC_SOP (1.698344 1.600991 1.707363)(-0.004576 -0.022940 0.000044)(1.400000 1.400000 1.400000)
*ASC_SAT 0.723500

Bugs while changing ColorCorrection.id

Currently changing ColorCorrection.id field correctly updates the ColorCorrection member's dict, but any ColorDecision's that contain the correction are not updated, nor are any ColorCorrectionReferences that pointed to the correction.

Extract CDLs from an EDL?

Hello friends,
I have a bunch of EDL files. Contained inside of these EDLs are CDL values we are after. They are all laid out, I can copy and paste them..kinda a drag.
Does this tool allow a user to extract each CDL value inside the EDL, and save it individually as a .cdl file? This tool really sounds interesting and useful. Got my hopes up.
I have no experience coding, and stumbled upon this via google. I am interested in this type of extraction, but after reading through the documentation and watching tutorials realized I would need further explanation to even begin. Is it possible to find a user that can demo what this actual does and how it works?
Thanks for your help and advice.
Dupsta

CDX parsing

Need to be able to parse CDX EDLs for CDLs.

Fix setup.py test running each test twice

Right now if python setup.py test is called, each test is run twice. This is because of the way we've setup __init__.py:

from test_cdl_convert import *
from test_classes import *
from test_ale import *
from test_cc import *
from test_ccc import *
from test_cdl import *
from test_flex import *


if __name__ == '__main__':
    unittest.main()

Of course, each of those test modules also has the following at the bottom:

if __name__ == '__main__':
    unittest.main()

I had a brilliant idea on how to fix this the other day, and then I promptly forgot it.

To split or not to split...

cdl_convert is huge. It's longer than I ever thought it could be, since starting the project. While a large amount of this line length is documentation, we still have over 600 lines of code in the cdl_convert module. With docs, we're closing in at 3000 lines.

This makes it more and more difficult to work with the code, and less and less organized. While in general the code is alphabetized within Classes and Functions- class ColorCollection occurs after class ColorCorrection because the collection needs to reference the correction. This just looks sloppy.

But one of the goals of the project, one I still think is important- is to allow people to download a single file (cdl_convert.py), and run it from that single file.

I'll be asking the sys admins and pipeline sups I know to get their feedback on if it's important this all be in a single file, and I'll update this issue accordingly.

If anyone reads this and also has feedback, please post below.

Please do not take it on yourself to fork and split it up. If we split everything up, I'll do it.

More descriptive exceptions

The causes of exceptions can be hard to track down, stuff like ValueError('No id found on ColorCorrection') doesn't actually tell us much about the ColorCorrection that generated the error.

Use unity values when ALE files have missing values

We often come accross ALE files that miss some of the CDL info. Sometimes, it could be clips with empty fields in ASC_SOP or ASC_SAT, some other times it could be either column completely missing from the ALE. Most of the time, we want these missing info to default to unity and convert anyway. That would be useful! You could also add a switch to turn this feature on or off.

Write OCIO CDLs

Need to be able to write OCIO CDL transforms as nuke importable nk files.

Reference ColorCorrections inside of ColorDecisions resolve into full ColorCorrections even if already included

If a child ColorDecision has a CCref that points to a CC that's included as a CC child of the same CCC, it will resolve to the full CC and be included twice:

In [25]: print ccc.xml
<ColorDecisionList xmlns="urn:ASC:CDL:v1.01">
    <ColorDecision>
        <ColorCorrectionRef ref="001"/>
    </ColorDecision>
    <ColorDecision>
        <ColorCorrection id="002">
            <SOPNode>
                <Slope>1.0 2.0 10.0</Slope>
                <Offset>0.0 0.0 0.0</Offset>
                <Power>1.0 1.0 1.0</Power>
            </SOPNode>
        </ColorCorrection>
    </ColorDecision>
    <ColorDecision>
        <ColorCorrection id="001">
            <SOPNode>
                <Slope>2.9 2.9 2.9</Slope>
                <Offset>-0.1 0.9 2.9</Offset>
                <Power>1.0 1.0 1.0</Power>
            </SOPNode>
        </ColorCorrection>
    </ColorDecision>
</ColorDecisionList>


In [26]: ccc.set_to_ccc()

In [27]: print ccc.xml
<ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.01">
    <ColorCorrection id="001">
        <SOPNode>
            <Slope>2.9 2.9 2.9</Slope>
            <Offset>-0.1 0.9 2.9</Offset>
            <Power>1.0 1.0 1.0</Power>
        </SOPNode>
    </ColorCorrection>
    <ColorCorrection id="001">
        <SOPNode>
            <Slope>2.9 2.9 2.9</Slope>
            <Offset>-0.1 0.9 2.9</Offset>
            <Power>1.0 1.0 1.0</Power>
        </SOPNode>
    </ColorCorrection>
    <ColorCorrection id="002">
        <SOPNode>
            <Slope>1.0 2.0 10.0</Slope>
            <Offset>0.0 0.0 0.0</Offset>
            <Power>1.0 1.0 1.0</Power>
        </SOPNode>
    </ColorCorrection>
</ColorCorrectionCollection>

Parsing a .CDL with a ColorCorrection node without an id tag fails

Is this how it should work or can we gracefully generate a unique ID for it instead? Or no ID at all even?

Below is an example export out of Arri's Amira Color Tool. Don't know if they are just exporting it incorrectly or what.

<?xml version="1.0" encoding="UTF-8"?> 
<!-- ASC CDL Parameter written by ARRI Color Tool --> 
<ColorDecisionList xmlns="urn:ASC:CDL:v1.01">
    <InputDescription>Corresponding to Look File</InputDescription>
    <ColorDecision>
        <ColorCorrection>
            <SOPNode>
                <Description>ASC CDL Parameters to be applied to LogC data</Description>
                <Slope> 1 1 1 </Slope>
                <Offset> 0 0 0 </Offset>
                <Power> 1 1 1 </Power>
            </SOPNode>
            <SatNode>
                <Saturation> 1 </Saturation>
            </SatNode>
        </ColorCorrection>
    </ColorDecision>
</ColorDecisionList>

runtime errors on OSX 10.10.5

After installing, CDL_Convert seems to error out upon execution. With the following error:

qc02:test qc2$ cdl_convert -i cdl -o cc --single bla.cdl
Traceback (most recent call last):
  File "/usr/local/bin/cdl_convert", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/cdl_convert/cdl_convert.py", line 222, in main
    color_decisions = parse.parse_file(filepath, filetype_in)
  File "/usr/local/lib/python2.7/site-packages/cdl_convert/parse.py", line 712, in parse_file
    return INPUT_FORMATS[filetype](filepath)
  File "/usr/local/lib/python2.7/site-packages/cdl_convert/parse.py", line 419, in parse_cdl
    root = _remove_xmlns(input_file)
  File "/usr/local/lib/python2.7/site-packages/cdl_convert/parse.py", line 665, in _remove_xmlns
    return ElementTree.fromstring(xml_string)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
qc02:test qc2$

Occurs on multiple machines, all same OS version, and all running python 2.7.10 installed via homebrew.

Add usage_cd (ColorDecision) and usage_mr (MediaRef) docs

We should add usage documentation for ColorDecisions and MediaRefs.

ColorDecisions aren't that complex, but I might have.. overengineered MediaRefs- and there's no point overengineering something if no one knows how to use it.

Refactor cdl_convert main() script function

Too long, too complex. Need to break it down into smaller functions, and especially remove the ColorCorrection and ColorDecision objects having to determine their own filepath.

Pep8 conversion

Convert everything to be pep8 compliant except google code docstrings.

Parse CCC

Need to parse CCC's with native XML, passing CC groups to parse CC.

Add --check to script

Add --check to script to sanity check all incoming values, allowing correct but bad values to be spotted more easily.

Parse cc

We need to parse CCs with native XML.

This needs to be done before CCC support

Full ASC CDL XML schema compliance

We're still a bit off from being fully compliant with the ASC CDL XML schema. We still need to add ColorDecision, ColorDecisionList, ColorCorrectionRef, and ColorCorrectionCollection.

However, the 0.6 release did mark a huge uptick in our compliance rate.

Convert SOP/SAT values to use Decimal

Use of Decimal will provide us with better float support, less rounding, and more accurate output of what we parsed as inputs.

The two biggest changes would be that SOP/SAT would now return a tuple of strings instead of floats, and the test suite would need lots of adjustments.

The former really concerns me, but I suspect this is better. The consumers of the data can decide the level of float accuracy they need, they won't be forced into Python rounding just because of CDL.

We probably need to modify the return string of Decimal before passing it to the consumer to add a .0 on the end of whole integers- Decimal truncates this because they don't understand the concept of significant digits?

  • Modify the setters of SOP/SAT to set with decimal
  • Modify the getters to return a list of strings, add on .0 to ints.
  • Adjust docs
  • Adjust test suite

tests failing on windows 10, py 2..7.6

Hey Sean, I'm working on adding support for Nuke OCIOCDLTransform nodes and I noticed that your test_cdl_convert and test_cdl tests seem to be failing for me.

I am also getting test_classes.TestColorCorrection.testDetermineDest failing for me as well. for the last one, it appears to be the abspath you are doing on line 1917 that is adding my drive letter which is making it different from the actual path. I'm not sure if cc/determine_dest is supposed to be relative or absolute but it currently appears to be relative.

The console is here: http://pastebin.com/psq2whLX

I am sorta new to testing so perhaps I am running these tests from the wrong location (I am running the init.py in tests to start the testing).

If I disable the two modules for testing cdl and fix the test_classes one, everything else seems to work.

Let me know if I am a twit and doing something wrong

  • Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.