# import os 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')
# import os 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 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 )
# import os # os.chdir("/Users/Tom/Desktop/Python/nuketests/Tests/Apps/Nuke/TestUnits/CaraVR/Tests") import basicCaraTestClass as BCTC ''' Written by Thomas Rice Research QA - Any Questions Please Ask - [email protected] 27/07/2016 To Do: - Find a way to get into the group and list the nodes ''' 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',
# import os 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, 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 )