def add_objects( self, evt ):
   """
   Add objects to selected layer handler
   This only handles the call from the Layers menu at the top of the window.
   The call from the left click menu goes straight to the function
   in utils
   """
   for layer in self.get_selected_layers( ):
     utils.add_to_bake_layer( layer = layer )
 def new_selected( self, layer ):
   """
   Creat a new bake layer and add all selected objects to it
   """
   
   if not len( pmc.ls( sl = True ) ) < 1:
   
     new_layer = pmc.bakeLayer( )
     utils.add_to_bake_layer( layer = new_layer )
     
     self.refresh()
     
   else:
     pmc.error( 'This requires having one or more objects selected' )
     return False