From 01744abd8187d1566b336bf38033673aa05b6786 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Fri, 9 Sep 2011 11:55:38 +0000 Subject: GPU: add gpu python module with export_shader() function to export GLSL shader. shader = gpu.export_shader(scene,material) Returns the GLSL shader that blender generates to produce the visual effect of material in scene for the purpose of reusing the shader in an external engine. This function is meant to be used in a material exporter so that the GLSL shader can be exported entirely. The return value is a dictionary containing the shader source code and all associated data. The full documentation is under sphinx. Warning: there has been an API between the patch and this commit: uniform['lamp'] and uniform['image'] now return python reference to ID block instead of ID name as before. The X3D exporter that uses this function must be adapted. --- source/blender/python/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python/SConscript') diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index dec0de4a6ab..9d7928c4432 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -5,7 +5,7 @@ Import ('env') incs = '. ../editors/include ../makesdna ../makesrna ../blenlib ../blenkernel ../nodes' -incs += ' ../imbuf ../blenloader ../render/extern/include ../windowmanager' +incs += ' ../imbuf ../blenloader ../gpu ../render/extern/include ../windowmanager' incs += ' #intern/guardedalloc #intern/memutil #extern/glew/include' incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC'] -- cgit v1.2.3