Fix T58032: particle children 'Use Clump Curve' crash
Maniphest Tasks: T58032 Differential Revision: https://developer.blender.org/D3988
This commit is contained in:
@@ -3246,6 +3246,8 @@ void BKE_particlesettings_clump_curve_init(ParticleSettings *part)
|
||||
cumap->cm[0].curve[1].x = 1.0f;
|
||||
cumap->cm[0].curve[1].y = 1.0f;
|
||||
|
||||
curvemapping_initialize(cumap);
|
||||
|
||||
part->clumpcurve = cumap;
|
||||
}
|
||||
|
||||
@@ -3258,6 +3260,8 @@ void BKE_particlesettings_rough_curve_init(ParticleSettings *part)
|
||||
cumap->cm[0].curve[1].x = 1.0f;
|
||||
cumap->cm[0].curve[1].y = 1.0f;
|
||||
|
||||
curvemapping_initialize(cumap);
|
||||
|
||||
part->roughcurve = cumap;
|
||||
}
|
||||
|
||||
@@ -3270,6 +3274,8 @@ void BKE_particlesettings_twist_curve_init(ParticleSettings *part)
|
||||
cumap->cm[0].curve[1].x = 1.0f;
|
||||
cumap->cm[0].curve[1].y = 1.0f;
|
||||
|
||||
curvemapping_initialize(cumap);
|
||||
|
||||
part->twistcurve = cumap;
|
||||
}
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, i
|
||||
}
|
||||
#endif
|
||||
|
||||
BLI_assert(rng_skip_tot > 0); /* should never be below zero */
|
||||
BLI_assert(rng_skip_tot >= 0); /* should never be below zero */
|
||||
if (rng_skip_tot > 0) {
|
||||
BLI_rng_skip(thread->rng, rng_skip_tot);
|
||||
}
|
||||
@@ -531,7 +531,7 @@ static void distribute_from_faces_exec(ParticleTask *thread, ParticleData *pa, i
|
||||
}
|
||||
pa->foffset= 0.0f;
|
||||
|
||||
BLI_assert(rng_skip_tot > 0); /* should never be below zero */
|
||||
BLI_assert(rng_skip_tot >= 0); /* should never be below zero */
|
||||
if (rng_skip_tot > 0) {
|
||||
BLI_rng_skip(thread->rng, rng_skip_tot);
|
||||
}
|
||||
@@ -628,7 +628,7 @@ static void distribute_from_volume_exec(ParticleTask *thread, ParticleData *pa,
|
||||
}
|
||||
}
|
||||
|
||||
BLI_assert(rng_skip_tot > 0); /* should never be below zero */
|
||||
BLI_assert(rng_skip_tot >= 0); /* should never be below zero */
|
||||
if (rng_skip_tot > 0) {
|
||||
BLI_rng_skip(thread->rng, rng_skip_tot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user