parameters: (self, instance, context, asset_type='asset', is_current=True, \
              is_revision=True, snapshot_type="asset", texture_search_type=None)
docstring: retrieve the asset sobject and run the checkin command
docstring_summary: retrieve the asset sobject and run the checkin command
docstring_tokens: retrieve the asset sobject and run the checkin command
function: def _checkin(self, instance, context, asset_type='asset', is_current=True, \
              is_revision=True, snapshot_type="asset", texture_search_type=None):
          '''retrieve the asset sobject and run the checkin command'''
          
          web = WebContainer.get_web()
          namespace, asset_code, instance_name = instance.split("|")
          description = WebContainer.get_web().get_form_value(\
              "%s_description" % instance_name)
  
          # get the sobject from asset_code
          
          self.sobject = Search.get_by_code(self.search_type, asset_code)
          if self.sobject == None:
              raise CommandException("SObject '%s' does not exist'" % asset_code)
          # now checkin the asset
          checkin = None
  
          # we assume asset_type = 'asset' by default
          if asset_type == 'asset':
              checkin = MayaAssetCheckin(self.sobject)
              checkin.set_instance(instance_name)
              checkin.set_option('texture_search_type', texture_search_type)
          elif asset_type =='set':
              checkin = MayaGroupCheckin(self.sobject)
          else:
              raise CommandException('Unknown asset type[%s] found' %asset_type)
          checkin.set_description(description)
          checkin.set_process(self.process)
          checkin.set_context(context)
          checkin.set_current(is_current)
          checkin.set_revision(is_revision)
          use_handoff_dir = web.get_form_value("use_handoff_dir")
          if use_handoff_dir in ['true','on']:
              checkin.set_use_handoff(True)
          if snapshot_type:
              checkin.set_snapshot_type(snapshot_type)
  
          checkin.set_option("unknown_ref", web.get_form_value("unknown_ref"))
          checkin.execute()
  
          snapshot = checkin.get_snapshot()
          version = snapshot.get_version()
          if description == "":
              description = "<No description>"
          self.add_description("Checked in %s '%s', context: %s, v%0.3d, %s" % \
              (asset_type.capitalize(), instance_name, context, version, description))
         
          self.sobjects = [self.sobject]
function_tokens: def _checkin ( self , instance , context , asset_type = 'asset' , is_current = True , is_revision = True , snapshot_type = "asset" , texture_search_type = None ) : web = WebContainer . get_web ( ) namespace , asset_code , instance_name = instance . split ( "|" ) description = WebContainer . get_web ( ) . get_form_value ( "%s_description" % instance_name ) # get the sobject from asset_code self . sobject = Search . get_by_code ( self . search_type , asset_code ) if self . sobject == None : raise CommandException ( "SObject '%s' does not exist'" % asset_code ) # now checkin the asset checkin = None # we assume asset_type = 'asset' by default if asset_type == 'asset' : checkin = MayaAssetCheckin ( self . sobject ) checkin . set_instance ( instance_name ) checkin . set_option ( 'texture_search_type' , texture_search_type ) elif asset_type == 'set' : checkin = MayaGroupCheckin ( self . sobject ) else : raise CommandException ( 'Unknown asset type[%s] found' % asset_type ) checkin . set_description ( description ) checkin . set_process ( self . process ) checkin . set_context ( context ) checkin . set_current ( is_current ) checkin . set_revision ( is_revision ) use_handoff_dir = web . get_form_value ( "use_handoff_dir" ) if use_handoff_dir in [ 'true' , 'on' ] : checkin . set_use_handoff ( True ) if snapshot_type : checkin . set_snapshot_type ( snapshot_type ) checkin . set_option ( "unknown_ref" , web . get_form_value ( "unknown_ref" ) ) checkin . execute ( ) snapshot = checkin . get_snapshot ( ) version = snapshot . get_version ( ) if description == "" : description = "<No description>" self . add_description ( "Checked in %s '%s', context: %s, v%0.3d, %s" % ( asset_type . capitalize ( ) , instance_name , context , version , description ) ) self . sobjects = [ self . sobject ]