[Bf-blender-cvs] [8e0eb4125d4] master: Fix T62626: Python errors when pinning particle settings.

Brecht Van Lommel noreply at git.blender.org
Tue Mar 26 15:42:17 CET 2019


Commit: 8e0eb4125d46458a59cbf44613ee79ee2f7df71a
Author: Brecht Van Lommel
Date:   Tue Mar 26 15:41:43 2019 +0100
Branches: master
https://developer.blender.org/rB8e0eb4125d46458a59cbf44613ee79ee2f7df71a

Fix T62626: Python errors when pinning particle settings.

===================================================================

M	release/scripts/startup/bl_ui/properties_particle.py

===================================================================

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



More information about the Bf-blender-cvs mailing list