Fix T62626: Python errors when pinning particle settings.
This commit is contained in:
parent
32c9b3a0ff
commit
8e0eb4125d
Notes:
blender-bot
2023-02-14 08:28:46 +01:00
Referenced by issue #62626, pinning particle system panel hides keyed physics/relations section
|
@ -184,8 +184,6 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
|
|||
if psys is None:
|
||||
part = particle_get_settings(context)
|
||||
|
||||
layout.operator("object.particle_system_add", icon='ADD', text="New")
|
||||
|
||||
if part is None:
|
||||
return
|
||||
|
||||
|
@ -678,7 +676,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
|
|||
elif part.physics_type == 'KEYED':
|
||||
|
||||
sub = col.column()
|
||||
sub.active = not psys.use_keyed_timing
|
||||
sub.active = not psys or not psys.use_keyed_timing
|
||||
sub.prop(part, "keyed_loops", text="Loops")
|
||||
if psys:
|
||||
col.prop(psys, "use_keyed_timing", text="Use Timing")
|
||||
|
@ -938,8 +936,9 @@ class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
psys = context.particle_system
|
||||
part = particle_get_settings(context)
|
||||
return part.physics_type in {'KEYED', 'BOIDS'}
|
||||
return psys and part.physics_type in {'KEYED', 'BOIDS'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
|
Loading…
Reference in New Issue