2009-06-01 11:39:11 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class ParticleButtonsPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
|
|
__region_type__ = "WINDOW"
|
|
|
|
__context__ = "particle"
|
|
|
|
|
|
|
|
def poll(self, context):
|
2009-06-03 00:17:35 +00:00
|
|
|
return (context.particle_system != None)
|
2009-06-01 11:39:11 +00:00
|
|
|
|
|
|
|
class PARTICLE_PT_particles(ParticleButtonsPanel):
|
|
|
|
__idname__= "PARTICLE_PT_particles"
|
|
|
|
__label__ = "Particles"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2009-06-03 00:17:35 +00:00
|
|
|
psys = context.particle_system
|
2009-06-01 11:39:11 +00:00
|
|
|
part = psys.settings
|
|
|
|
|
|
|
|
layout.itemR(part, "amount")
|
|
|
|
|
|
|
|
bpy.types.register(PARTICLE_PT_particles)
|
|
|
|
|