Skip to content
Snippets Groups Projects
Commit eb1e94df authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Removing lint warnings

parent 67a9ac24
No related branches found
No related tags found
1 merge request!397C++ to python api 12
......@@ -19,12 +19,13 @@ from vtkmodules.vtkRenderingCore import (
vtkRenderWindowInteractor
)
MAX_EXTENT = 10
def main():
colors = vtkNamedColors()
# Create the source
MAX_EXTENT = 10
extent = (-MAX_EXTENT, MAX_EXTENT) * 3
source = vtkSpatioTemporalHarmonicsSource(whole_extent=extent)
......@@ -45,13 +46,13 @@ def main():
# Create a renderer, render window, and interactor.
ren = vtkRenderer(background=colors.GetColor3d('Gray'))
renWin = vtkRenderWindow(size=(600, 600), window_name='SpatioTemporalHarmonicsSource')
renWin.AddRenderer(ren)
iRen = vtkRenderWindowInteractor()
iRen.render_window = renWin
ren_win = vtkRenderWindow(size=(600, 600), window_name='SpatioTemporalHarmonicsSource')
ren_win.AddRenderer(ren)
iren = vtkRenderWindowInteractor()
iren.render_window = ren_win
# Since we import vtkmodules.vtkInteractionStyle we can do this
# because vtkInteractorStyleSwitch is automatically imported:
iRen.interactor_style.SetCurrentStyleToTrackballCamera()
iren.interactor_style.SetCurrentStyleToTrackballCamera()
ren.ResetCamera()
ren.active_camera.position = (50.0, 40.0, 30.0)
......@@ -60,14 +61,14 @@ def main():
# Add the actor, render and interact.
ren.AddActor(actor)
renWin.Render()
ren_win.Render()
cow = vtkCameraOrientationWidget()
cow.SetParentRenderer(ren)
# Enable the widget.
cow.On()
iRen.Start()
iren.Start()
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment