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>2018-02-15 13:22:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-15 14:24:48 +0300
commit6d4022f61980ba46efd391dcfe96dd88a8db8deb (patch)
tree47de0c472537be5d8eb8550135c3c3e039d5a594 /source/blender/makesrna/intern/rna_particle.c
parent5ce6ca05366e653cc576ac6beaed72d07c0e2e6c (diff)
Simple hair children: Make twist affected by texture
This completes twist feature, which is now possible to also control by texture. Since textures can not easily contain negative values as well, same trick with 0.5 neutral as vertex groups is used. All in all, this twist features allows to do following things. Original hair: {F2287535} Hair with scientifically calculated twist value of 0.5: {F2287540} And we can also twist braids in opposite directions dependent on left/right side: {F2287548}
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index caf120e0ea1..2710a184367 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1894,6 +1894,10 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Length", "Affect the child hair length");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ prop = RNA_def_property(srna, "use_map_twist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_TWIST);
+ RNA_def_property_ui_text(prop, "Twist", "Affect the child twist");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* influence factors */
prop = RNA_def_property(srna, "time_factor", PROP_FLOAT, PROP_NONE);
@@ -1975,6 +1979,12 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Rough Factor", "Amount texture affects child roughness");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+
+ prop = RNA_def_property(srna, "twist_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "twistfac");
+ RNA_def_property_ui_range(prop, 0, 1, 10, 3);
+ RNA_def_property_ui_text(prop, "Twist Factor", "Amount texture affects child twist");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
}
static void rna_def_particle_settings(BlenderRNA *brna)