Welcome to mirror list, hosted at ThFree Co, Russian Federation.

buttons_particle.py « ui « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52e20b03538f982cfd97f01019fcdc0b1771ee1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)