Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-29 03:24:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-29 03:24:34 +0400
commit0e01fa4863a301f9776b8a6b5459493fc8830008 (patch)
tree9c9adc39b0f6acaaf8f3835ecc554ee7538f83dc /source/blender/makesrna/intern/rna_texture.c
parentc31b776dc9a914f0fcf1b988edb448f12ed4eb64 (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/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 0ecc41d80d8..a1ce77b061d 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -664,6 +664,13 @@ static void rna_def_environment_map(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects.)");
RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, 0);
+ RNA_def_property_boolean_sdna(prop, NULL, "ok", 2);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Validity", "True if this map is ready for use, False if it needs rendering.");
+
+ RNA_api_environment_map(srna);
}
static EnumPropertyItem prop_noise_basis_items[] = {