parameters: (self,obj)
docstring: restore original nodes
docstring_summary: restore original nodes
docstring_tokens: restore original nodes
function: def unloadInventor(self,obj):
  
          "restore original nodes"
  
          if (not hasattr(self,"orig_flatlines")) or (not self.orig_flatlines):
              return
          if (not hasattr(self,"orig_shaded")) or (not self.orig_shaded):
              return
          if (not hasattr(self,"orig_wireframe")) or (not self.orig_wireframe):
              return
  
          # check node contents
          rootnode = obj.ViewObject.RootNode
          if rootnode.getNumChildren() < 3:
              FreeCAD.Console.PrintError("Invalid root node in "+obj.Label+"\n")
              return
          switch = rootnode.getChild(2)
          if switch.getNumChildren() != 4:
              FreeCAD.Console.PrintError("Invalid root node in "+obj.Label+"\n")
              return
  
          # replace root node of object
          switch.replaceChild(0,self.orig_flatlines)
          switch.replaceChild(1,self.orig_shaded)
          switch.replaceChild(2,self.orig_wireframe)
  
          # discard old content
          self.orig_flatlines = None
          self.orig_shaded = None
          self.orig_wireframe = None
function_tokens: def unloadInventor ( self , obj ) : if ( not hasattr ( self , "orig_flatlines" ) ) or ( not self . orig_flatlines ) : return if ( not hasattr ( self , "orig_shaded" ) ) or ( not self . orig_shaded ) : return if ( not hasattr ( self , "orig_wireframe" ) ) or ( not self . orig_wireframe ) : return # check node contents rootnode = obj . ViewObject . RootNode if rootnode . getNumChildren ( ) < 3 : FreeCAD . Console . PrintError ( "Invalid root node in " + obj . Label + "\n" ) return switch = rootnode . getChild ( 2 ) if switch . getNumChildren ( ) != 4 : FreeCAD . Console . PrintError ( "Invalid root node in " + obj . Label + "\n" ) return # replace root node of object switch . replaceChild ( 0 , self . orig_flatlines ) switch . replaceChild ( 1 , self . orig_shaded ) switch . replaceChild ( 2 , self . orig_wireframe ) # discard old content self . orig_flatlines = None self . orig_shaded = None self . orig_wireframe = None