Fix T68227: Pinning the particles system data-block causes error

The 'Seed' setting is not part of the pinned data-block. When pinning,
the local variable `psys` is `None`, and this wasn't properly checked for
when drawing the 'Seed' setting.
This commit is contained in:
Sybren A. Stüvel 2019-08-06 15:31:39 +02:00
parent 6b0c97466f
commit 88a872dd6e
Notes: blender-bot 2024-01-16 18:05:25 +01:00
Referenced by issue #68290, Baked particles dont render in final frame
Referenced by issue #68265, Incorrect 3D Cursor Movement with Axis Constraint
Referenced by issue #68227, Pinning the particles system data-block causes error
1 changed files with 3 additions and 1 deletions

View File

@ -272,7 +272,9 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
col = layout.column()
col.active = part.emit_from == 'VERT' or part.distribution != 'GRID'
col.prop(part, "count")
col.prop(psys, "seed")
if psys is not None:
col.prop(psys, "seed")
if part.type == 'HAIR':
col.prop(part, "hair_length")