Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-26 17:41:43 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-26 17:41:43 +0300
commit8e0eb4125d46458a59cbf44613ee79ee2f7df71a (patch)
tree80de4100177709e45c21360b9f22e22dcc8cf014 /release/scripts/startup/bl_ui/properties_particle.py
parent32c9b3a0ff0c433adc4c9e5caa7f4eb487673146 (diff)
Fix T62626: Python errors when pinning particle settings.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_particle.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index e2504ba39ef..0667bff8177 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -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