def addAllToSet(self, name='', quiet=False):
		ourSet = None
		
		# type or select set name if not passed
		if not name:
			# check for selected set
			selected = self.getSelected(_type=FBSet, found=True)
			if selected:
				# test type
				if isinstance(selected, FBSet):
					ourSet = selected
			else:
				# spawn dialogue listing choices
				self.addAllToSetUI()
				return False
		else:
			# check for set existence
			if self.findSet(name=name, quiet=quiet):
				ourSet = self.findSet(name=name, quiet=quiet)
			else:
				# create set
				ourSet = FBSet(name)
			
#		count = 0
#		allItems = []
#		
#		modelSkeletons = self.getAllByType(_type='FBModelSkeleton')
#		allItems.extend(modelSkeletons)
#		
#		models = self.getAllByType(_type='FBModel')
#		allItems.extend(models)
#		
#		modelNulls = self.getAllByType(_type='FBModelNull')
#		allItems.extend(modelNulls)
#		materials = self.getAllByType(_type='FBMaterial')
#		allItems.extend(materials)
#		textures = self.getAllByType(_type='FBTexture')
#		allItems.extend(textures)
#		
#		deformers = self.getAllByType(_type='FBDeformer')
#		allItems.extend(deformers)
#		constraintRelation = self.getAllByType(_type='FBConstraintRelation')
#		allItems.extend(constraintRelation)
#		groups = self.getAllByType(_type='FBGroup')
#		allItems.extend(groups)
#		poses = self.getAllByType(_type='FBPose')
#		allItems.extend(poses)
#		vidClips = self.getAllByType(_type='FBVideoClipImage')
#		allItems.extend(vidClips)
#		characters = self.getAllByType(_type='FBCharacter')
#		allItems.extend(characters)
#		
#		for item in allItems:
#			ourSet.Items.append(item)
#			count+=1
		
		count = 0
		allItems = self.getAllByType(_type='all')
		for item in allItems:
								
			# skip Sets
			if isinstance(item, FBSet):
				continue
				
			# safe to add
			ourSet.Items.append(item)
			count += 1
			
		if not quiet:
			moBuLogger.infoDialog("%d items added to Set '%s'" % (count, ourSet.Name), "Set Created")
		else:
			moBuLogger.info("%d items added to Set '%s'" % (count, ourSet.Name))
		
		return ourSet
finds the set with name
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/moBu/core/moBuSets.py/MoBuSets.addAllToSet