From 9e612235e2d3aa35ab693a7ab45a8eb919bec284 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 14 Jan 2013 13:05:01 +0000 Subject: [PATCH] Fix cycles hair in a dupligroup not showing in the correct location for viewport rendering. --- source/blender/makesrna/intern/rna_particle.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 4a520cdc729..d8884654435 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -349,8 +349,11 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o /*strands key loop data stored in cache + step->co*/ if (path_nbr) { if (step >= 0 && step <= path_nbr) { - if (step <= max_k) + if (step <= max_k) { copy_v3_v3(n_co, (cache + step)->co); + mul_m4_v3(particlesystem->imat, n_co); + mul_m4_v3(object->obmat, n_co); + } } } @@ -1246,10 +1249,10 @@ static void rna_def_particle_hair_key(BlenderRNA *brna) RNA_def_property_float_funcs(prop, "rna_ParticleHairKey_location_object_get", "rna_ParticleHairKey_location_object_set", NULL); - prop = RNA_def_property(srna, "co_hair_space", PROP_FLOAT, PROP_TRANSLATION); + prop = RNA_def_property(srna, "co_local", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "co"); RNA_def_property_ui_text(prop, "Location", - "Location of the hair key in its internal coordinate system, " + "Location of the hair key in its local coordinate system, " "relative to the emitting face"); /* Aided co func */