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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-09 19:51:14 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-09 19:51:14 +0400
commitd917bdb095573161522194449fc22f6809e5b5b2 (patch)
tree515874d441bd5547480e1a4714c45c03cb23ed2e /source/blender/makesrna
parent1255b1e82dae4db4cc6f1fab1e80e831cbee583b (diff)
Derivative map baker
Added support for derivative map baking, which is accessable as a dedicated baker type. Works pretty much the same as displacement map baker, but gives you derivative map. In fact, inernally this baker is just a filter which applies on the result of displacement map. Both regular and multires baking are supported. Patch by Morten Mikkelsen and self.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 9414591eaf9..573175e57e5 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -4088,6 +4088,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"},
{RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"},
{RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"},
+ {RE_BAKE_DERIVATIVE, "DERIVATIVE", 0, "Derivative", "Bake derivative map"},
{RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"},
{RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transparency)"},
{RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intensity", "Bake Mirror values"},
@@ -4674,6 +4675,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Bake to vertex colors instead of to a UV-mapped image");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_USERSCALE);
+ RNA_def_property_ui_text(prop, "User scale", "Use a user scale for the derivative map");
+
+ prop = RNA_def_property(srna, "bake_user_scale", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bake_user_scale");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Scale",
+ "Instead of automatically normalizing to 0..1, "
+ "apply a user scale to the derivative map.");
+
/* stamp */
prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);