2.5: Added first particle panel, and an RNA property to retrieve
[blender.git] / release / ui / buttons_particle.py
1
2 import bpy
3
4 class ParticleButtonsPanel(bpy.types.Panel):
5         __space_type__ = "BUTTONS_WINDOW"
6         __region_type__ = "WINDOW"
7         __context__ = "particle"
8
9         def poll(self, context):
10                 ob = context.active_object
11                 return (ob and ob.active_particle_system)
12
13 class PARTICLE_PT_particles(ParticleButtonsPanel):
14         __idname__= "PARTICLE_PT_particles"
15         __label__ = "Particles"
16
17         def draw(self, context):
18                 layout = self.layout
19
20                 psys = context.active_object.active_particle_system
21                 part = psys.settings
22
23                 layout.itemR(part, "amount")
24
25 bpy.types.register(PARTICLE_PT_particles)
26