diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-01 15:39:11 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-01 15:39:11 +0400 |
commit | 0e02fef8b498a7a2905dc8b341f6bebfc3a1e167 (patch) | |
tree | 899dd2bb6cb06ed6ecdf24b14d0b7823ffbc0e75 /release/ui/buttons_particle.py | |
parent | 41963d9e4e04e481aad99a9b24ddebd9a198b30d (diff) |
2.5: Added first particle panel, and an RNA property to retrieve
the active particle system.
Diffstat (limited to 'release/ui/buttons_particle.py')
-rw-r--r-- | release/ui/buttons_particle.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/release/ui/buttons_particle.py b/release/ui/buttons_particle.py new file mode 100644 index 00000000000..52e20b03538 --- /dev/null +++ b/release/ui/buttons_particle.py @@ -0,0 +1,26 @@ + +import bpy + +class ParticleButtonsPanel(bpy.types.Panel): + __space_type__ = "BUTTONS_WINDOW" + __region_type__ = "WINDOW" + __context__ = "particle" + + def poll(self, context): + ob = context.active_object + return (ob and ob.active_particle_system) + +class PARTICLE_PT_particles(ParticleButtonsPanel): + __idname__= "PARTICLE_PT_particles" + __label__ = "Particles" + + def draw(self, context): + layout = self.layout + + psys = context.active_object.active_particle_system + part = psys.settings + + layout.itemR(part, "amount") + +bpy.types.register(PARTICLE_PT_particles) + |