Revert "Fix hair random rotation limited to 180 degrees"

This reverts commit 176ed5bfe2.
This commit is contained in:
Sergey Sharybin 2015-04-13 19:16:40 +05:00
parent 198ca57ae4
commit 4ce437fff0
4 changed files with 3 additions and 11 deletions

View 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

View 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);

View 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 */

View 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;
}
}
}