예제 #1
0
 def tearDown(self):
     # The system should clean these up automatically,
     # but we'll be neat.
     os.remove(self.filename)
     # We need to clear the ColorCorrection member dictionary so we don't
     # have to worry about non-unique ids.
     cdl_convert.reset_all()
예제 #2
0
 def tearDown(self):
     # The system should clean these up automatically,
     # but we'll be neat.
     os.remove(self.filename)
     # We need to clear the ColorCorrection member dictionary so we don't
     # have to worry about non-unique ids.
     cdl_convert.reset_all()
예제 #3
0
    def testNegativeSlope(self):
        """Tests that a negative slope raises a ValueError"""

        # Build our cc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CC_NEGATIVE_SLOPE))
            self.file = f.name

        cdl_convert.config.HALT_ON_ERROR = True

        self.assertRaises(
            ValueError,
            cdl_convert.parse_cc,
            self.file
        )

        cdl_convert.config.HALT_ON_ERROR = False
        cdl_convert.reset_all()

        cdl = cdl_convert.parse_cc(self.file)

        self.assertEqual(
            decimalize(0.0, 0.678669, 1.0758),
            cdl.slope,
        )
예제 #4
0
 def tearDown(self):
     parse.INPUT_FORMATS = self.inputFormats
     write.OUTPUT_FORMATS = self.outputFormats
     sys.argv = self.sysargv
     sys.stdout = self.stdout
     os.makedirs = self.makedirs
     # We need to clear the ColorCorrection member dictionary so we don't
     # have to worry about non-unique ids.
     cdl_convert.reset_all()
예제 #5
0
 def tearDown(self):
     parse.INPUT_FORMATS = self.inputFormats
     write.OUTPUT_FORMATS = self.outputFormats
     sys.argv = self.sysargv
     sys.stdout = self.stdout
     os.makedirs = self.makedirs
     # We need to clear the ColorCorrection member dictionary so we don't
     # have to worry about non-unique ids.
     cdl_convert.reset_all()
예제 #6
0
    def setUp(self):
        cdl_convert.reset_all()
        self.cdl = cdl_convert.ColorCorrection("burp_200.x15", '')

        self.cdl.sat = 1.0128109381
        self.cdl.sat_node.desc = ['I am a lovely sat node']

        self.target_xml_root = enc(CC_NO_SOP_WRITE)
        self.target_xml = enc('\n'.join(CC_NO_SOP_WRITE.split('\n')[1:]))
예제 #7
0
    def setUp(self):
        cdl_convert.reset_all()
        self.cdl = cdl_convert.ColorCorrection("burp_300.x35", '')

        self.cdl.slope = (1.233321, 0.678669, 1.0758)
        self.cdl.offset = (0.031, 0.128, -0.096)
        self.cdl.power = (1.8, 0.97, 0.961)

        self.target_xml_root = enc(CC_NO_SAT_WRITE)
        self.target_xml = enc('\n'.join(CC_NO_SAT_WRITE.split('\n')[1:]))
예제 #8
0
def convert_cdl(cdlfile,dest):
    cdl_convert.reset_all()
    ccc = cdl_convert.parse_cdl(cdlfile)
    cc = ccc.color_decisions[0].cc
    cc.id=dest['shot']
    destpath=cdl_path.format(**dest)

    if not os.path.exists(destpath):
        os.makedirs(destpath)
    cc.determine_dest('cc',destpath)
    cdl_convert.write_cc(cc)
예제 #9
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CCC_ODD))
            self.filename = f.name

        self.ccc = cdl_convert.parse_ccc(self.filename)

        self.target_xml_root = enc(CCC_ODD_WRITE)
        self.target_xml = enc('\n'.join(CCC_ODD_WRITE.split('\n')[1:]))
예제 #10
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CCC_ODD))
            self.filename = f.name

        self.ccc = cdl_convert.parse_ccc(self.filename)

        self.target_xml_root = enc(CCC_ODD_WRITE)
        self.target_xml = enc('\n'.join(CCC_ODD_WRITE.split('\n')[1:]))
예제 #11
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CDL_FULL))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)
        self.cdl.set_to_ccc()

        self.target_xml_root = enc(CDL_FULL_WRITE_CCC)
        self.target_xml = enc('\n'.join(CDL_FULL_WRITE_CCC.split('\n')[1:]))
예제 #12
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CDL_FULL))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)
        self.cdl.set_to_ccc()

        self.target_xml_root = enc(CDL_FULL_WRITE_CCC)
        self.target_xml = enc('\n'.join(CDL_FULL_WRITE_CCC.split('\n')[1:]))
예제 #13
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CDL_ODD))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)
        cc = cdl_convert.ColorCorrection("missingRef")
        cc.slope = [1.0, 2.0, 1.0]

        self.target_xml_root = enc(CDL_ODD_WRITE_RESOLVED)
        self.target_xml = enc('\n'.join(CDL_ODD_WRITE_RESOLVED.split('\n')[1:]))
예제 #14
0
    def setUp(self):
        cdl_convert.reset_all()

        # Build our ccc
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(CDL_ODD))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)
        cc = cdl_convert.ColorCorrection("missingRef")
        cc.slope = [1.0, 2.0, 1.0]

        self.target_xml_root = enc(CDL_ODD_WRITE_RESOLVED)
        self.target_xml = enc('\n'.join(
            CDL_ODD_WRITE_RESOLVED.split('\n')[1:]))
예제 #15
0
    def setUp(self):
        cdl_convert.reset_all()
        self.cdl = cdl_convert.ColorCorrection("f55.100", '')
        self.cdl.desc = [
            'Raised saturation1 a little!?! ag... \/Offset',
            'Raised saturation2 a little!?! ag... \/Offset',
        ]
        self.cdl.input_desc = 'METAL VIEWER!!! \/\/'
        self.cdl.viewing_desc = 'WOOD VIEWER!? ////'

        self.cdl.slope = (137829.329, 4327890.9833, 3489031.003)
        self.cdl.offset = (-3424.011, -342789423.013, -4238923.11)
        self.cdl.power = (3271893.993, .0000998, 0.0000000000000000113)
        self.cdl.sop_node.desc = [
            'Raised saturation a little!?! ag... \/Offset'
        ]

        self.cdl.sat = 1798787.01
        self.cdl.sat_node.desc = []

        self.target_xml_root = enc(CC_ODD_WRITE)
        self.target_xml = enc('\n'.join(CC_ODD_WRITE.split('\n')[1:]))
예제 #16
0
    def setUp(self):
        cdl_convert.reset_all()
        self.cdl = cdl_convert.ColorCorrection("014_xf_seqGrade_v01", '')
        self.cdl.desc = [
            'CC description 1', 'CC description 2', 'CC description 3',
            'CC description 4', 'CC description 5'
        ]
        self.cdl.input_desc = 'Input Desc Text'
        self.cdl.viewing_desc = 'Viewing Desc Text'

        self.cdl.slope = (1.014, 1.0104, 0.62)
        self.cdl.offset = (-0.00315, -0.00124, 0.3103)
        self.cdl.power = (1.0, 0.9983, 1.0)
        self.cdl.sop_node.desc = [
            'Sop description 1', 'Sop description 2', 'Sop description 3'
        ]

        self.cdl.sat = 1.09
        self.cdl.sat_node.desc = [
            'Sat description 1', 'Sat description 2'
        ]

        self.target_xml_root = enc(CC_FULL_WRITE)
        self.target_xml = enc('\n'.join(CC_FULL_WRITE.split('\n')[1:]))
 def tearDown(self):
     # We need to clear the ColorCorrection member dictionary so we don't
     # have to worry about non-unique ids.
     cdl_convert.reset_all()
예제 #18
0
 def tearDown(self):
     os.remove(self.filename)
     cdl_convert.reset_all()
예제 #19
0
 def tearDown(self):
     parse.INPUT_FORMATS = self.stored_inputs
     cdl_convert.reset_all()
예제 #20
0
 def tearDown(self):
     sys.stdout = self.stdout
     sys.argv = self.sysargv
     cdl_convert.reset_all()
예제 #21
0
 def tearDown(self):
     sys.stdout = self.stdout
     cdl_convert.reset_all()
예제 #22
0
 def tearDown(self):
     cdl_convert.reset_all()
     if self.file:
         os.remove(self.file)
예제 #23
0
 def tearDown(self):
     os.remove(self.filename)
     cdl_convert.reset_all()
예제 #24
0
 def tearDown(self):
     parse.INPUT_FORMATS = self.stored_inputs
     cdl_convert.reset_all()
예제 #25
0
 def tearDown(self):
     sys.stdout = self.stdout
     sys.argv = self.sysargv
     cdl_convert.reset_all()
예제 #26
0
 def tearDown(self):
     sys.stdout = self.stdout
     cdl_convert.reset_all()
예제 #27
0
 def tearDown(self):
     cdl_convert.reset_all()