[Bf-blender-cvs] [c3b406a7c33] master: Revert recent change to the particles RNA, and only affect the UI.

William Reynish noreply at git.blender.org
Wed Jan 8 20:37:39 CET 2020


Commit: c3b406a7c331e68978eacac543f3be564f7601ac
Author: William Reynish
Date:   Wed Jan 8 20:37:35 2020 +0100
Branches: master
https://developer.blender.org/rBc3b406a7c331e68978eacac543f3be564f7601ac

Revert recent change to the particles RNA, and only affect the UI.

Even though the name change is more correct, we don't want to change the API at this time.

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

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 a9422c67e8b..4dba8ffbe0e 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_diameter());
-        CData->psys_tipradius.push_back_slow(radius * b_part.tip_diameter());
+        CData->psys_rootradius.push_back_slow(radius * b_part.root_radius());
+        CData->psys_tipradius.push_back_slow(radius * b_part.tip_radius());
         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 b83eca1ab74..2028857640e 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_diameter", text="Diameter Root")
-        col.prop(part, "tip_diameter", text="Tip")
+        col.prop(part, "root_radius", text="Diameter Root")
+        col.prop(part, "tip_radius", 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 3193b0341c9..4da42eb6bba 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_diameter", PROP_FLOAT, PROP_DISTANCE);
+  prop = RNA_def_property(srna, "root_radius", 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 diameter width at the root");
+  RNA_def_property_ui_text(prop, "Root Diameter", "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_diameter", PROP_FLOAT, PROP_DISTANCE);
+  prop = RNA_def_property(srna, "tip_radius", 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 diameter width at the tip");
+  RNA_def_property_ui_text(prop, "Tip Diameter", "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