You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							730 B
						
					
					
				
			
		
		
	
	
							25 lines
						
					
					
						
							730 B
						
					
					
				| if (AVLayer.prototype. getPins==null) AVLayer.prototype. getPins=function(){    //Extends the AVLayer class with the getPinsfunctions which returns the Layer's property groups which are pins.
 | |
|     this.selectedPins = [];
 | |
|   for(prop=0;prop<this.selectedProperties.length;prop++){
 | |
|       p= this.selectedProperties[prop];
 | |
|       if(p.matchName=="ADBE FreePin3 PosPin Atom"){
 | |
|       this.selectedPins.push(p);
 | |
|       }
 | |
|       }
 | |
|  return this.selectedPins;
 | |
|  }
 | |
| 
 | |
| function yMkUnique(aString){
 | |
| 	myLayers = app.project.activeItem.layers;
 | |
| 	uniqueness = 1;
 | |
| 	for(i=1;i<=myLayers.length;i++){
 | |
| 		if(aString == myLayers[i].name){
 | |
| 			uniqueness++;
 | |
| 			}
 | |
| 		}
 | |
| 	return(aString+'_'+uniqueness);
 | |
| }
 | |
| s = 'asdas_1';
 | |
| alert(s.length);
 | |
| alert(yMkUnique('apple'))
 |