This adds a RenderEngine type to RNA, which can be subclassed in python (c++ will follow once we support subclassing there). It's very basic, but plugs into the pipeline nicely. Two example scripts: http://www.pasteall.org/6635/python http://www.pasteall.org/6636/python Issues: * Render runs in a separate thread, and there is unrestricted access, so it's possible to crash blender with unsafe access. * Save buffers and full sample are not supported yet.
		
			
				
	
	
		
			27 lines
		
	
	
		
			733 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			733 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/usr/bin/python
 | |
| Import ('env')
 | |
| 
 | |
| cflags=''
 | |
| sources = env.Glob('intern/source/*.c')
 | |
| 
 | |
| incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
 | |
| incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
 | |
| incs += ' ../include ../blenloader'
 | |
| 
 | |
| defs = []
 | |
| 
 | |
| if env['WITH_BF_QUICKTIME']:
 | |
|     defs.append('WITH_QUICKTIME')
 | |
|     incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
 | |
| 
 | |
| if env['WITH_BF_FFMPEG']:
 | |
|     defs.append('WITH_FFMPEG')
 | |
| 
 | |
| if env['WITH_BF_OPENEXR']:
 | |
|     defs.append('WITH_OPENEXR')
 | |
| 
 | |
| if env['OURPLATFORM']=='linux2':
 | |
|     cflags='-pthread'
 | |
| 
 | |
| env.BlenderLib ( libname = 'bf_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=145, compileflags=cflags )
 |