diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-29 03:24:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-29 03:24:34 +0400 |
commit | 0e01fa4863a301f9776b8a6b5459493fc8830008 (patch) | |
tree | 9c9adc39b0f6acaaf8f3835ecc554ee7538f83dc /source/blender/render/extern/include | |
parent | c31b776dc9a914f0fcf1b988edb448f12ed4eb64 (diff) |
patch [#28355] Better Environment Map scripting
from Tom Edwards (artfunkel), with minor edits.
This patch makes the following improvements to environment map scripting:
* Adds a "is_valid" RNA property to envmaps. True if the map is ready for use, False if it needs rendering.
* Adds a "clear" RNA function to envmaps. Deletes any envmap image data.
* Adds a "save" RNA function to envmaps. Writes the envmap to disc with a configurable layout. (Defaults to the current hard-coded layout.)
* Updates bpy.ops.texture.envmap_save with configurable layout support as above.
These changes, particularly configurable layouts, make exporting envmaps to other software much easier.
Diffstat (limited to 'source/blender/render/extern/include')
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index d9ed83a00b2..0736bed4faf 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -51,6 +51,7 @@ struct ReportList; struct ReportList; struct Scene; struct SceneRenderLayer; +struct EnvMap; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* this include is what is exposed of render to outside world */ @@ -230,6 +231,9 @@ void RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode); void RE_WriteRenderResult(RenderResult *rr, const char *filename, int compress); struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty); +extern const float default_envmap_layout[]; +int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, int imtype, float layout[12]); + /* do a full sample buffer compo */ void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce, struct bNodeTree *ntree); |