diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-29 12:22:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-30 13:25:20 +0300 |
commit | 2faef3473c061e34a03668905c8d81672a72dd38 (patch) | |
tree | 3557dc200a7cd27d69d11c80513d34cafc5c8467 /intern/cycles/blender/blender_curves.cpp | |
parent | e0e3038b1e7aec26da7161defa5a34b5d9373b5c (diff) |
Cycles: Use new internal hair shape properties.
The do_version actually copy the existing custom properties to the internal
ones, because theses properties are straight port from cycles.
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index f2bb1b0158c..e9270ee5539 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -149,18 +149,16 @@ static bool ObtainCacheParticleData(Mesh *mesh, if(b_part.kink() == BL::ParticleSettings::kink_SPIRAL) ren_step += b_part.kink_extra_steps(); - PointerRNA cpsys = RNA_pointer_get(&b_part.ptr, "cycles"); - CData->psys_firstcurve.push_back_slow(curvenum); CData->psys_curvenum.push_back_slow(totcurves); CData->psys_shader.push_back_slow(shader); - float radius = get_float(cpsys, "radius_scale") * 0.5f; + float radius = b_part.radius_scale() * 0.5f; - CData->psys_rootradius.push_back_slow(radius * get_float(cpsys, "root_width")); - CData->psys_tipradius.push_back_slow(radius * get_float(cpsys, "tip_width")); - CData->psys_shape.push_back_slow(get_float(cpsys, "shape")); - CData->psys_closetip.push_back_slow(get_boolean(cpsys, "use_closetip")); + 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()); int pa_no = 0; if(!(b_part.child_type() == 0) && totchild != 0) |