[Bf-blender-cvs] [3a35301fd16] master: Fix T70821: Hair Radius Is Actually Hair Diameter

William Reynish noreply at git.blender.org
Mon Jan 6 21:54:58 CET 2020


Commit: 3a35301fd16d9230932a148f0cf64ed6bef9e38b
Author: William Reynish
Date:   Mon Jan 6 21:54:56 2020 +0100
Branches: master
https://developer.blender.org/rB3a35301fd16d9230932a148f0cf64ed6bef9e38b

Fix T70821: Hair Radius Is Actually Hair Diameter

Renamed hair tip and root properties to be called diameter rather than radius. The old name was incorrect.

===================================================================

M	intern/cycles/blender/blender_curves.cpp
M	release/scripts/startup/bl_ui/properties_particle.py
M	source/blender/makesrna/intern/rna_particle.c

===================================================================

diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 4dba8ffbe0e..a9422c67e8b 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -152,8 +152,8 @@ static bool ObtainCacheParticleData(
 
         float radius = b_part.radius_scale() * 0.5f;
 
-        CData->psys_rootradius.push_back_slow(radius * b_part.root_radius());
-        CData->psys_tipradius.push_back_slow(radius * b_part.tip_radius());
+        CData->psys_rootradius.push_back_slow(radius * b_part.root_diameter());
+        CData->psys_tipradius.push_back_slow(radius * b_part.tip_diameter());
         CData->psys_shape.push_back_slow(b_part.shape());
         CData->psys_closetip.push_back_slow(b_part.use_close_tip());
 
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 21abf8bb34c..b83eca1ab74 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -1961,8 +1961,8 @@ class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel):
         layout.prop(part, "shape", text="Strand Shape")
 
         col = layout.column(align=True)
-        col.prop(part, "root_radius", text="Radius Root")
-        col.prop(part, "tip_radius", text="Tip")
+        col.prop(part, "root_diameter", text="Diameter Root")
+        col.prop(part, "tip_diameter", text="Tip")
 
         col = layout.column()
         col.prop(part, "radius_scale")
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index f3ca10e332a..3193b0341c9 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -3415,19 +3415,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
   RNA_def_property_update(
       prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
 
-  prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_DISTANCE);
+  prop = RNA_def_property(srna, "root_diameter", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "rad_root");
   RNA_def_property_range(prop, 0.0f, FLT_MAX);
   RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
-  RNA_def_property_ui_text(prop, "Root", "Strand width at the root");
+  RNA_def_property_ui_text(prop, "Root", "Strand diameter width at the root");
   RNA_def_property_update(
       prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
 
-  prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_DISTANCE);
+  prop = RNA_def_property(srna, "tip_diameter", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "rad_tip");
   RNA_def_property_range(prop, 0.0f, FLT_MAX);
   RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
-  RNA_def_property_ui_text(prop, "Tip", "Strand width at the tip");
+  RNA_def_property_ui_text(prop, "Tip", "Strand diameter width at the tip");
   RNA_def_property_update(
       prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */



More information about the Bf-blender-cvs mailing list