| 34 | import vtkmodules.vtkRenderingOpenGL2 |
| 35 | |
| 36 | def GetProgramParameters(): |
| 37 | import argparse |
| 38 | description = 'Creates a directed graph of the modules and their dependencies.' |
| 39 | epilogue = ''' |
| 40 | This program takes a list of module files and creates a |
| 41 | (possibly disjoint) directed graph of the modules and their |
| 42 | dependencies. Arrows on the directed graph point to the dependent module. |
| 43 | By default, dependencies of a given module are followed to their maximum |
| 44 | depth. However you can restrict the depth by specifying the depth to |
| 45 | which dependent modules are searched. |
| 46 | The moduleList is a comma-separated list of module names with no |
| 47 | spaces between the names. |
| 48 | The treeDepth defaults to 0, this means that for a given module all |
| 49 | dependent modules will be found. If non-zero, then trees will be only |
| 50 | searched to that depth. |
| 51 | ''' |
| 52 | parser = argparse.ArgumentParser(description=description, epilog=epilogue) |
| 53 | parser.add_argument('vtkSourceDir', help='The path to the vtk Source Directory.') |
| 54 | parser.add_argument('moduleList', help='The list of modules.') |
| 55 | parser.add_argument('moduleTreeDepth', help='The depth of the module trees', nargs='?', default=0, type=int) |
| 56 | args = parser.parse_args() |
| 57 | vtkSourceDir = args.vtkSourceDir |
| 58 | moduleList = [x.strip() for x in args.moduleList.split(',')] |
| 59 | moduleTreeDepth = args.moduleTreeDepth |
| 60 | return (vtkSourceDir, moduleList, moduleTreeDepth) |
| 61 | |
| 62 | def FindModuleFiles(path): |
| 63 | ''' |