Revert "Fix hair random rotation limited to 180 degrees"
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Apr 2015 14:16:40 +0000 (19:16 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Apr 2015 14:16:54 +0000 (19:16 +0500)
This reverts commit 176ed5bfe280ef2151f93c0940d54498aaf00d71.

source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenloader/intern/versioning_270.c

index f5e7643085ad583180ec87189843bfd3394e9173..86576f9a11b659d952d7a61d574ec0adb1839624 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         274
-#define BLENDER_SUBVERSION      5
+#define BLENDER_SUBVERSION      4
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   5
index 0e200c739186406ae332c9c79d23f9462dc950cd..6c354c59d7a57723c95977b13f137e47bb04bfce 100644 (file)
@@ -4100,7 +4100,7 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
                        float q_phase[4];
                        float phasefac = psys->part->phasefac;
                        if (psys->part->randphasefac != 0.0f)
-                               phasefac += psys->part->randphasefac * psys_frand(psys, (pa - psys->particles) + 20) * 2.0f;
+                               phasefac += psys->part->randphasefac * psys_frand(psys, (pa - psys->particles) + 20);
                        axis_angle_to_quat(q_phase, vec, phasefac * (float)M_PI);
 
                        mul_qt_v3(q_phase, side);
index 0439e56c29475f041213ebe0f4b41ddeea98cb81..5a263e24fc4adaecdb320a5d81ed0ee85a1af6ca 100644 (file)
@@ -928,7 +928,7 @@ void psys_get_birth_coords(ParticleSimulationData *sim, ParticleData *pa, Partic
                        /* rotation phase */
                        phasefac = part->phasefac;
                        if (part->randphasefac != 0.0f)
-                               phasefac += part->randphasefac * psys_frand(psys, p + 20) * 2.0f;
+                               phasefac += part->randphasefac * psys_frand(psys, p + 20);
                        axis_angle_to_quat( q_phase,x_vec, phasefac*(float)M_PI);
 
                        /* combine base rotation & phase */
index 49e81b1cfff2940fcd4d8d5655d0b7af07db9e38..1b91d3d869e7d778518d19ede97ab77a02c21943 100644 (file)
@@ -799,12 +799,4 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                        }
                }
        }
-
-       if (!MAIN_VERSION_ATLEAST(main, 274, 5)) {
-               /* Particle random phase range doubled. */
-               ParticleSettings *part;
-               for (part = main->particle.first; part; part = part->id.next) {
-                       part->randphasefac *= 0.5f;
-               }
-       }
 }