parameters: ()
return_statement: return None
docstring: Set the working plane to the selected object's face.
  
      The working plane is only aligned to the face if
      the working plane is `'weak'`.
  
      Returns
      -------
      None
          If more than one object was selected.
          Or if the selected object has many subelements.
          Or if the single subelement is not a `'Face'`.
  
      App::DocumentObject
          The single object that contains a single selected face.
docstring_summary: Set the working plane to the selected object's face.
docstring_tokens: Set the working plane to the selected object s face .
function: def set_working_plane_to_selected_object():
      """Set the working plane to the selected object's face.
  
      The working plane is only aligned to the face if
      the working plane is `'weak'`.
  
      Returns
      -------
      None
          If more than one object was selected.
          Or if the selected object has many subelements.
          Or if the single subelement is not a `'Face'`.
  
      App::DocumentObject
          The single object that contains a single selected face.
      """
      sel = Gui.Selection.getSelectionEx()
      if len(sel) != 1:
          return None
      sel = sel[0]
      if (sel.HasSubObjects
              and len(sel.SubElementNames) == 1
              and "Face" in sel.SubElementNames[0]):
          if App.DraftWorkingPlane.weak:
              App.DraftWorkingPlane.alignToFace(sel.SubObjects[0])
              App.DraftWorkingPlane.weak = True
          return sel.Object
      return None
function_tokens: def set_working_plane_to_selected_object ( ) : sel = Gui . Selection . getSelectionEx ( ) if len ( sel ) != 1 : return None sel = sel [ 0 ] if ( sel . HasSubObjects and len ( sel . SubElementNames ) == 1 and "Face" in sel . SubElementNames [ 0 ] ) : if App . DraftWorkingPlane . weak : App . DraftWorkingPlane . alignToFace ( sel . SubObjects [ 0 ] ) App . DraftWorkingPlane . weak = True return sel . Object return None