Fix T64101: Crash entering edit mode with particle system

Explicitly disable particles in edit for now.

Those were not rendered already, but were attempted to be converted
to Cycles structures (if UVs were not needed for hair nothing was
rendered, but if UVs are needed then crash happened).

Would be nice to bring hair in edit mode back, but this is a bit
more involved change, which will be done later.
This commit is contained in:
Sergey Sharybin 2019-05-24 14:52:43 +02:00
parent fae5896249
commit 05a9788b25
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by issue #64101, Crash entering edit mode with particle system
2 changed files with 6 additions and 1 deletions

View File

@ -978,7 +978,7 @@ void BlenderSync::sync_curves(
/* obtain general settings */
const bool use_curves = scene->curve_system_manager->use_curves;
if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) {
if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT && b_ob.mode() != b_ob.mode_EDIT)) {
if (!motion)
mesh->compute_bounds();
return;

View File

@ -534,6 +534,11 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem,
int uv_no,
float r_uv[2])
{
if (modifier->mesh_final == NULL) {
BKE_report(reports, RPT_ERROR, "Object was not yet evaluated");
zero_v2(r_uv);
return;
}
if (!CustomData_has_layer(&modifier->mesh_final->ldata, CD_MLOOPUV)) {
BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
zero_v2(r_uv);