From 17b89f6dacba007bf3a2189b36ea335bc389b661 Mon Sep 17 00:00:00 2001 From: Phil Stopford Date: Thu, 2 Jul 2020 11:49:15 -0400 Subject: 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 --- source/blender/makesrna/intern/rna_modifier.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/blender/makesrna/intern/rna_modifier.c') 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); -- cgit v1.2.3