fix verbose mode
This commit is contained in:
		
							parent
							
								
									a5dae7ee19
								
							
						
					
					
						commit
						2868bad3da
					
				| @ -18,7 +18,7 @@ def remove_stroke_exact_duplications(apply=True, verbose=True): | |||||||
|     # TODO: Add additional check of material (even if unlikely to happen, better to avoid false positive) |     # TODO: Add additional check of material (even if unlikely to happen, better to avoid false positive) | ||||||
|     ct = 0 |     ct = 0 | ||||||
|     if verbose: |     if verbose: | ||||||
|         print('\nRemove redundant strokdes in GP frames:') |         print('\nRemove redundant strokdes in GP frames...') | ||||||
|     gp_datas = [gp for gp in bpy.data.grease_pencils_v3] |     gp_datas = [gp for gp in bpy.data.grease_pencils_v3] | ||||||
|     for gp in gp_datas: |     for gp in gp_datas: | ||||||
|         for l in gp.layers: |         for l in gp.layers: | ||||||
| @ -36,7 +36,8 @@ def remove_stroke_exact_duplications(apply=True, verbose=True): | |||||||
|                  |                  | ||||||
|                 if apply and idx_to_delete: |                 if apply and idx_to_delete: | ||||||
|                     # Remove redundancy (carefull, passing an empty list delete all strokes) |                     # Remove redundancy (carefull, passing an empty list delete all strokes) | ||||||
|                     print(f"{gp.name} > {l.name} > {f_id}: {len(idx_to_delete)} strokes") |                     if verbose: | ||||||
|  |                         print(f"{gp.name} > {l.name} > {f_id}: {len(idx_to_delete)} strokes") | ||||||
|                     f.drawing.remove_strokes(indices=idx_to_delete) |                     f.drawing.remove_strokes(indices=idx_to_delete) | ||||||
|     return ct |     return ct | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user