[FEM] importVTKResults: assure user gets a visible object
- on importing a .vtu/.vtk file the new created should be a visible one. Therefore set its display to surface like we do when a new pipeline is created from within FC by the user
This commit is contained in:
@@ -134,6 +134,9 @@ def importVtkVtkResult(
|
||||
):
|
||||
vtk_result_obj = FreeCAD.ActiveDocument.addObject("Fem::FemPostPipeline", resultname)
|
||||
vtk_result_obj.read(filename)
|
||||
# set display mode to "Surface" like for any other new pipeline to assure the user sees
|
||||
# something after the import was done
|
||||
vtk_result_obj.ViewObject.DisplayMode = "Surface"
|
||||
vtk_result_obj.touch()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
return vtk_result_obj
|
||||
|
||||
Reference in New Issue
Block a user