[Bf-committers] Proposal: better envmap scripting

Tom Edwards contact at steamreview.org
Wed Jul 20 15:47:07 CEST 2011


Hello all. I'm currently writing an add-on to ease the export of renders 
and environment maps to the Source game engine, and I'm finding my 
options when it comes to envmaps extremely limited. I'd like to add the 
following functions:

bpy.types.EnvironmentMap.save( filename, layout=( 
(0,0),(0,1),(0,2),(1,0),(1,1),(1,2) ) )

Saves the envmap with the scene render settings. "layout" determines the 
location of each face in the output image; 1 == EnvironmentMap.resolution.

bpy.types.EnvironmentMap.render(ignore_cache=False)

Renders the envmap if it is stale. Ignores the camera and indeed goes 
ahead without one. Might render other envmaps for recursion. 
"ignore_cache" bypasses the normal envmap cache checks.

bpy.types.EnvironmentMap.clear()

Same as bpy.ops.texture.envmap_clear(), but without the overhead of 
setting up then reverting the context.


Is there any reason why the above couldn't be added to trunk?


More information about the Bf-committers mailing list