Fix T43859: Texture baking crashes blender

The issue was caused by particles using billboard distribution, which
requires either object to be specified or camera in the scene to be
existing.

This commit prevents backing from crash, but bake result might not be
totally expected because of the thing mentioned above.
This commit is contained in:
2015-03-02 16:06:42 +05:00
parent 4c723eb80e
commit bc20a745be

View File

@@ -1321,6 +1321,9 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if ((re->r.scemode & R_VIEWPORT_PREVIEW) && (ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
if (part->ren_as == PART_DRAW_BB && part->bb_ob == NULL && RE_GetCamera(re) == NULL)
return 0;
/* 2. start initializing things */
/* last possibility to bail out! */