back to tabs for ae keys export
0.9.9 - fix: `Export Camera 2D Position To AE` use tab again instead of space in key clipboard format. otherwise paste doesn't work in After-Effect
This commit is contained in:
		
							parent
							
								
									c5ea98b4d0
								
							
						
					
					
						commit
						4b59adf138
					
				| @ -14,6 +14,10 @@ Activate / deactivate layer opaticty according to prefix | |||||||
| Activate / deactivate all masks using MA layers | Activate / deactivate all masks using MA layers | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
|  | 0.9.9 | ||||||
|  | 
 | ||||||
|  | - fix: `Export Camera 2D Position To AE` use tab again instead of space in key clipboard format. otherwise paste doesn't work in After-Effect | ||||||
|  | 
 | ||||||
| 0.9.8 | 0.9.8 | ||||||
| 
 | 
 | ||||||
| - feat: `Export Camera 2D Position To AE` to export 'anim cam' (or selected cam) frame center pixel coordinate within scene camera. | - feat: `Export Camera 2D Position To AE` to export 'anim cam' (or selected cam) frame center pixel coordinate within scene camera. | ||||||
|  | |||||||
| @ -108,8 +108,7 @@ def export_anim_cam_position(camera=None, context=None): | |||||||
|         scn.frame_set(i) |         scn.frame_set(i) | ||||||
|         center = fn.get_cam_frame_center_world(camera) |         center = fn.get_cam_frame_center_world(camera) | ||||||
|         coord = fn.get_coord_in_cam_space(scn, scn.camera, center, ae=True) |         coord = fn.get_coord_in_cam_space(scn, scn.camera, center, ae=True) | ||||||
|         # text += f'\t{i}\t{coord[0]}\t{coord[1]}\t\n' |         text += f'\t{i}\t{coord[0]}\t{coord[1]}\t\n' | ||||||
|         text += f'    {i}    {coord[0]}    {coord[1]}\n' |  | ||||||
| 
 | 
 | ||||||
|     text += '\n\nEnd of Keyframe Data\n' # Ae Frame ending |     text += '\n\nEnd of Keyframe Data\n' # Ae Frame ending | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ bl_info = { | |||||||
|     "name": "GP Render", |     "name": "GP Render", | ||||||
|     "description": "Organise export of gp layers through compositor output", |     "description": "Organise export of gp layers through compositor output", | ||||||
|     "author": "Samuel Bernou", |     "author": "Samuel Bernou", | ||||||
|     "version": (0, 9, 8), |     "version": (0, 9, 9), | ||||||
|     "blender": (2, 93, 0), |     "blender": (2, 93, 0), | ||||||
|     "location": "View3D", |     "location": "View3D", | ||||||
|     "warning": "", |     "warning": "", | ||||||
|  | |||||||
							
								
								
									
										41
									
								
								fn.py
									
									
									
									
									
								
							
							
						
						
									
										41
									
								
								fn.py
									
									
									
									
									
								
							| @ -1217,20 +1217,37 @@ def get_coord_in_cam_space(scene, cam_ob, co, ae=False): | |||||||
| ## -- After effects exports | ## -- After effects exports | ||||||
| 
 | 
 | ||||||
| def get_ae_keyframe_clipboard_header(scn): | def get_ae_keyframe_clipboard_header(scn): | ||||||
|     import textwrap |     '''Need to use tabs for AE''' | ||||||
|     t = f'''\ |  | ||||||
|         Adobe After Effects 8.0 Keyframe Data |  | ||||||
| 
 | 
 | ||||||
|             Units Per Second    {scn.render.fps} |     ## multiline version, but space instead of tabs break syntax for AE | ||||||
|             Source Width    {scn.render.resolution_x} |     # import textwrap | ||||||
|             Source Height   {scn.render.resolution_y} |     # t = f'''\ | ||||||
|             Source Pixel Aspect Ratio   1 |     #     Adobe After Effects 8.0 Keyframe Data | ||||||
|             Comp Pixel Aspect Ratio     1 |  | ||||||
| 
 | 
 | ||||||
|         Transform   Position |     #         Units Per Second    {scn.render.fps} | ||||||
|             Frame   X pixels    Y pixels    Z pixels |     #         Source Width    {scn.render.resolution_x} | ||||||
|         ''' |     #         Source Height   {scn.render.resolution_y} | ||||||
|     return textwrap.dedent(t) |     #         Source Pixel Aspect Ratio   1 | ||||||
|  |     #         Comp Pixel Aspect Ratio    1 | ||||||
|  | 
 | ||||||
|  |     #     Transform   Position | ||||||
|  |     #         Frame   X pixels    Y pixels    Z pixels | ||||||
|  |     #     ''' | ||||||
|  |     # t = textwrap.dedent(t) | ||||||
|  |     # ## spaces to tab | ||||||
|  |     # t = re.sub(r'\s{3-4}', u'\t', t) # ! Still spaces | ||||||
|  | 
 | ||||||
|  |     ## Direct use of tabs is safer | ||||||
|  |     t = 'Adobe After Effects 8.0 Keyframe Data\n\n' | ||||||
|  |     t += '\tUnits Per Second\t%s\n'%scn.render.fps | ||||||
|  |     t += '\tSource Width\t%s\n'%scn.render.resolution_x | ||||||
|  |     t += '\tSource Height\t%s\n'%scn.render.resolution_y | ||||||
|  |     t += '\tSource Pixel Aspect Ratio\t1\n' | ||||||
|  |     t += '\tComp Pixel Aspect Ratio\t1\n\n' | ||||||
|  |     t += 'Transform\tPosition\n' | ||||||
|  |     t += '\tFrame\tX pixels\tY pixels\tyZ pixels\t\n' | ||||||
|  | 
 | ||||||
|  |     return t | ||||||
| 
 | 
 | ||||||
| ## -- Collection handle | ## -- Collection handle | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user