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:
authorPhil Stopford <philstopford>2020-07-02 18:49:15 +0300
committerHans Goudey <h.goudey@me.com>2020-07-02 18:49:15 +0300
commit17b89f6dacba007bf3a2189b36ea335bc389b661 (patch)
tree574e6098bff75730f74c8474f7c03c25af3fcc0d /source/blender/makesrna/intern/rna_modifier.c
parent35481fde40c78e004230d7909e7b7d83438cc64e (diff)
Ocean modifier: Expose eigenvectors for use as map
The eigenvectors in the ocean modifier (plus and minus) can be useful, but are not exposed. Assuming the particle system was capable, the eigenvectors could be used to drive spray emission velocities. This exposes the controls to allow a map to be generated from these eigenvectors. Currently, the values are mapped into a 0-255 range similar to foam. Differential Revision: https://developer.blender.org/D7182
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index e8d5d75097a..fd7b6b3f0d6 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -5587,6 +5587,24 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Generate Foam", "Generate foam mask as a vertex color channel");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
+ prop = RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_SPRAY);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(
+ prop, "Generate Spray Map", "Generate map of spray direction as a vertex color channel");
+ RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
+
+ prop = RNA_def_property(srna, "invert_spray", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_INVERT_SPRAY);
+ RNA_def_property_ui_text(prop, "Invert Spray", "Invert the spray direction map");
+ RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
+
+ prop = RNA_def_property(srna, "spray_layer_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "spraylayername");
+ RNA_def_property_ui_text(
+ prop, "Spray Map", "Name of the vertex color layer used for the spray direction map");
+ RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
+
prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "resolution");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);