Skip to content

Commit

Permalink
Remove duplicate code (pyvista#551)
Browse files Browse the repository at this point in the history
* Remove duplicate code

* Remove more duplicated code!
  • Loading branch information
banesullivan authored Jan 20, 2020
1 parent fce5954 commit aa29d1f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pyvista/plotting/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,16 +1003,6 @@ def add_mesh(self, mesh, color=None, style=None, scalars=None,
if mesh.n_points < 1:
raise RuntimeError('Empty meshes cannot be plotted. Input mesh has zero points.')

# set main values
self.mesh = mesh
self.mapper = make_mapper(vtk.vtkDataSetMapper)
self.mapper.SetInputData(self.mesh)
if isinstance(scalars, str):
self.mapper.SetArrayName(scalars)

actor, prop = self.add_actor(self.mapper,
reset_camera=reset_camera,
name=name, loc=loc, culling=culling)

# Try to plot something if no preference given
if scalars is None and color is None and texture is None:
Expand Down

0 comments on commit aa29d1f

Please sign in to comment.