Skip to content

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

@shidarin

Description

@shidarin

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions