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:
authorMiika Hamalainen <blender@miikah.org>2012-01-16 21:18:07 +0400
committerMiika Hamalainen <blender@miikah.org>2012-01-16 21:18:07 +0400
commit4d9197866b40fec9884236c05053d85fe6d0255f (patch)
tree5a7c1bbf49712f9315861eb9b8d35160b5128b10 /source/blender/makesrna/intern/rna_dynamicpaint.c
parente81f2853c8785b0a84ecebf7c4db433af434c5c8 (diff)
Dynamic Paint:
* Added per surface options "influence scale" and "radius scale" for tweaking brush settings individually for each surface. * Added option to completely disable drying. This should be nice for indefinitely spreading paint etc. * Improved paint mixing algorithm. * "Paint effects" now work in relative mesh space instead of global. This means that effect speed remains same for identical shapes regardless of their size. * Complete rewrite of "spread effect" algorithm. It now works much better in all test cases done. Old algo sometimes produced artifacts and stopped spreading too early. * Adjustments / rewrite on some parts of dripping algorithm to make it work better with transparent paint. * Added a new "color dry" setting. It can be used to define wetness level when paint colors start to shift to surface "background". Lower values can be useful to prevent spreading paint from becoming transparent as it dries, while higher (default) values give better results in general. * Fix: If multiple displace/wave surfaces were used simultaneously, displace was applied using wrong normal. Please note that due to these changes in "paint effects" system older save files may require some tweaking to match results from previous versions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_dynamicpaint.c')
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 4886a4f30b1..95770685077 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -395,6 +395,10 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 5, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Approximately in how many frames should dissolve happen");
+
+ prop= RNA_def_property(srna, "use_drying", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_USE_DRYING);
+ RNA_def_property_ui_text(prop, "Dry", "Enable to make surface wetness dry over time");
prop= RNA_def_property(srna, "dry_speed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1.0, 10000.0);
@@ -443,6 +447,20 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Anti-aliasing", "Use 5x multisampling to smoothen paint edges");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
+ prop= RNA_def_property(srna, "brush_influence_scale", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "influence_scale");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Influence Scale", "Adjust influence brush objects have on this surface");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
+
+ prop= RNA_def_property(srna, "brush_radius_scale", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "radius_scale");
+ RNA_def_property_range(prop, 0.0, 10.0);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Radius Scale", "Adjust radius of proximity brushes or particles for this surface");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
+
/*
* Initial Color
*/
@@ -454,6 +472,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_initialcolortype");
prop= RNA_def_property(srna, "init_color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Color", "Initial color of the surface");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
@@ -495,6 +514,12 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Spread Speed", "How fast spread effect moves on the canvas surface");
+ prop= RNA_def_property(srna, "color_dry_threshold", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "color_dry_threshold");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Color Dry", "The wetness level when colors start to shift to the background");
+
prop= RNA_def_property(srna, "color_spread_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "color_spread_speed");
RNA_def_property_range(prop, 0.0, 2.0);