2.5: Added first particle panel, and an RNA property to retrieve

the active particle system.
This commit is contained in:
Brecht Van Lommel
2009-06-01 11:39:11 +00:00
parent 41963d9e4e
commit 0e02fef8b4
3 changed files with 41 additions and 2 deletions

View File

@@ -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)