import pfpym # Import the macro functions. def pfMacroName(): # Essential function - defines the name of the macro as it appears in the app. return 'Track and Solve' def pfMacroNumSelectedNodes(): # Optional function - specifies the number of nodes which must be selected in return 1 # the tree for this macro to be enabled (continued in next function). def pfMacroSelectedNodesType(): # Optional function - specifies a list of the selected node types for this macro return 'Clip Input' # to be enabled. In this example a single clip must be selected in the tree. def main(tree): # Essential function - the macro itself. track= tree.addNode('Auto Match') # Add an auto match node to the tree. Automatically connected to the # selected node, i.e. the clip, and then this node becomes the selected node. solve= tree.addNode('Camera Solver') # Add a camera solver node to the tree. Automatically connected to # the selected node, i.e. the auto tracker above. track.autoMatch() # Run the Auto Match node. solve.solveAll() # Run the Camera Solver.