node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
BCTC.setExportOption(node, 3)
BCTC.exportSelection(node)

nodeConnectionSet = set()
#As we create groups of nodes with this operation we will need to go into it to check what's in there.
goIntoGroup = nuke.toNode("RigWorkflow2D")
with goIntoGroup:
    #Get all of the inputs so we can check their connections
    inputGroup = nuke.allNodes('Input')
    for node in inputGroup:
        nodeConnectionSet.update(
            BCTC.checkNodeConnections(node.name(), "Output1"))

# The Format and connections that should be present
originalNodes = set([('AlphaMaskGenerator', 'C_SphericalTransform7',
                      'JoinViews1', 'C_Blender1', 'Output1'),
                     ('AlphaMaskGenerator5', 'C_SphericalTransform5',
                      'JoinViews1', 'C_Blender1', 'Output1'),
                     ('AlphaMaskGenerator4', 'C_SphericalTransform4',
                      'JoinViews1', 'C_Blender1', 'Output1'),
                     ('AlphaMaskGenerator3', 'C_SphericalTransform3',
                      'JoinViews1', 'C_Blender1', 'Output1'),
                     ('AlphaMaskGenerator2', 'C_SphericalTransform2',
                      'JoinViews1', 'C_Blender1', 'Output1'),
                     ('AlphaMaskGenerator1', 'C_SphericalTransform1',
                      'JoinViews1', 'C_Blender1', 'Output1')])
Exemplo n.º 2
0
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Snode = BCTC.createNode('C_Stitcher1_0')
BCTC.setExportOption(Snode, 0)
BCTC.exportSelection(Snode)

nodeConnectionSet = BCTC.checkNodeConnections("C_Stitcher1", "STMap2")

#The Format and connections that should be present
originalNodes = set([('Grade8', 'Exposure1'), ('STMap2', ),
                     ('BlackOutside1', 'STMap2')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    pass
Exemplo n.º 3
0
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
CMnode = BCTC.createNode('C_ColourMatcher1_0')
BCTC.CM_Analyse(CMnode)
BCTC.setExportOption(CMnode, 0)
BCTC.exportSelection(CMnode)

nodeConnectionSet = BCTC.checkNodeConnections("C_ColourMatcher1", "Exposure1")


#The Format and connections that should be present
originalNodes = set([
					('Grade7', 'Exposure1')
					])


result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint('Test failed as the there was a difference in the node connections, they were .. ' , result )
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
Exemplo n.º 4
0
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Snode = BCTC.createNode('C_Stitcher1_0')
BCTC.setExportOption(Snode, 1)
BCTC.exportSelection(Snode)

nodeConnectionSet = BCTC.checkNodeConnections("C_Stitcher1", "JoinViews1")

#The Format and connections that should be present
originalNodes = set([('Grade8', 'Exposure1'), ('BlackOutside1', 'STMap2'),
                     ('OneView1', 'STMap7', 'JoinViews1'),
                     ('OneView2', 'STMap1', 'JoinViews1'),
                     ('OneView3', 'STMap2', 'JoinViews1'),
                     ('OneView4', 'STMap3', 'JoinViews1'),
                     ('OneView5', 'STMap4', 'JoinViews1'),
                     ('OneView6', 'STMap5', 'JoinViews1'),
                     ('OneView7', 'STMap7', 'JoinViews1'),
                     ('OneView8', 'STMap1', 'JoinViews1'),
                     ('OneView9', 'STMap2', 'JoinViews1'),
                     ('OneView10', 'STMap3', 'JoinViews1'),
                     ('OneView11', 'STMap4', 'JoinViews1'),
                     ('OneView12', 'STMap5', 'JoinViews1'),
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Tnode = BCTC.createNode('C_Tracker1_0')
BCTC.setExportOption(Tnode, 0)
BCTC.exportSelection(Tnode)

nodeConnectionSet = BCTC.checkNodeConnections(
    "C_CameraSolver1", "C_SphericalTransform_Stabilize1")

#The Format and connections that should be present
originalNodes = set([('C_SphericalTransform_Stabilize1', ),
                     ('C_Tracker1', 'C_SphericalTransform_Stabilize1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    pass
	Check the amount of read nodes in the scene then add 2 to the number of the c_sphericalTransfrom to avoid any future errors

'''


node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
BCTC.setExportOption(node, 1)
BCTC.exportSelection(node)

#Note that the C_SphericaTransform is 2 number higher than the number of read nodes. 
amountOfReads = len(nuke.allNodes('Read')) + 2
lastNodeinSequence = "C_SphericalTransform{}".format(amountOfReads)
nodeConnectionSet = BCTC.checkNodeConnections("C_CameraSolver1", lastNodeinSequence)

#The Format and connections that should be present
originalNodes =  set([('C_SphericalTransform8',)])


result = nodeConnectionSet.difference(originalNodes)


if result != set([]):
    nuke.tprint('Test failed as the there was a difference in the node connections, they were .. ' , result )
    print 'Test failed as the there was a difference in the node connections, they were .. ' , result 
    # sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    print 'Test passed as there were no differences in the two sets'
Exemplo n.º 7
0
# import os
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
BCTC.setExportOption(node, 0)
BCTC.exportSelection(node)
nodeConnectionSet = BCTC.checkNodeConnections("Axis1", "Scene1")

#The Format and connections that should be present
originalNodes = set([('Camera1', 'Scene1'), ('Camera2', 'Scene1'),
                     ('Camera3', 'Scene1'), ('Camera4', 'Scene1'),
                     ('Camera5', 'Scene1'), ('Camera6', 'Scene1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    pass
    sys.exit(0)
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Snode = BCTC.createNode('C_Stitcher1_0')
BCTC.setExportOption(Snode, 3)
BCTC.exportSelection(Snode)

nodeConnectionSet = BCTC.checkNodeConnections("C_CameraSolver1", "JoinViews1")

originalNodes = set([
    ('OneView9', 'STMap2', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView3', 'STMap2', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('C_Stitcher1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView2', 'STMap1', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView8', 'STMap1', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView12', 'STMap5', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView6', 'STMap5', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView7', 'STMap7', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView4', 'STMap3', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('BlackOutside1', 'Split', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView5', 'STMap4', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView10', 'STMap3', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
    ('OneView1', 'STMap7', 'JoinViews1', 'ShuffleCopy1', 'C_Blender1'),
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Snode = BCTC.createNode('C_Stitcher1_0')
BCTC.setExportOption(Snode, 2)
BCTC.exportSelection(Snode)

nodeConnectionSet = BCTC.checkNodeConnections("C_CameraSolver1", "C_Blender1")

#The Format and connections that should be present
originalNodes = set([('STMap2', 'ShuffleCopy1', 'C_Blender1'),
                     ('BlackOutside1', 'STMap2', 'ShuffleCopy1', 'C_Blender1'),
                     ('C_Stitcher1', 'ShuffleCopy1', 'C_Blender1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
CMnode = BCTC.createNode('C_ColourMatcher1_0')
BCTC.CM_Analyse(CMnode)
BCTC.setExportOption(CMnode, 1)
BCTC.exportSelection(CMnode)

nodeConnectionSet = BCTC.checkNodeConnections("C_ColourMatcher1", "JoinViews1")

#The Format and connections that should be present
originalNodes = set([('Split', 'JoinViews1'),
                     ('OneView6', 'Grade6', 'Exposure1', 'JoinViews1'),
                     ('Grade8', 'Exposure1'),
                     ('OneView1', 'Grade1', 'Exposure1', 'JoinViews1'),
                     ('OneView2', 'Grade2', 'Exposure1', 'JoinViews1'),
                     ('OneView3', 'Grade3', 'Exposure1', 'JoinViews1'),
                     ('OneView4', 'Grade4', 'Exposure1', 'JoinViews1'),
                     ('OneView5', 'Grade5', 'Exposure1', 'JoinViews1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
Exemplo n.º 11
0
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Tnode = BCTC.createNode('C_Tracker1_0')
BCTC.setExportOption(Tnode, 3)
BCTC.exportSelection(Tnode)

nodeConnectionSet = BCTC.checkNodeConnections(
    "C_CameraSolver1", "C_MetaDataTransform_MatchMove1")

#The Format and connections that should be present
originalNodes = set([('C_MetaDataTransform_MatchMove1', ),
                     ('C_Tracker1', 'C_MetaDataTransform_MatchMove1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    pass
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Tnode = BCTC.createNode('C_Tracker1_0')
BCTC.setExportOption(Tnode, 1)
BCTC.exportSelection(Tnode)

nodeConnectionSet = BCTC.checkNodeConnections("C_CameraSolver1", "C_SphericalTransform_MatchMove1")


#The Format and connections that should be present
originalNodes =	set([
					('C_SphericalTransform_MatchMove1',),
					('C_Tracker1', 'C_SphericalTransform_MatchMove1')])



result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint('Test failed as the there was a difference in the node connections, they were .. ' , result )
    sys.exit(1)
else:
Exemplo n.º 13
0
import basicCaraTestClass as BCTC
'''
    Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016
'''

#CameraSolver creation and solve
node = BCTC.createNode('C_CameraSolver1_0')
BCTC.loadImages(node)
BCTC.CS_matchCameras(node)
BCTC.CS_solveCameras(node)
#ColourMatcher creation and solve
Tnode = BCTC.createNode('C_Tracker1_0')
BCTC.setExportOption(Tnode, 2)
BCTC.exportSelection(Tnode)

nodeConnectionSet = BCTC.checkNodeConnections(
    "C_CameraSolver1", "C_MetaDataTransform_Stabilize1")

#The Format and connections that should be present
originalNodes = set([('C_MetaDataTransform_Stabilize1', ),
                     ('C_Tracker1', 'C_MetaDataTransform_Stabilize1')])

result = nodeConnectionSet.difference(originalNodes)

if result != set([]):
    nuke.tprint(
        'Test failed as the there was a difference in the node connections, they were .. ',
        result)
    sys.exit(1)
else:
    nuke.tprint('Test passed as there were no differences in the two sets')
    pass