From f6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 3 Jun 2018 21:35:33 +0200 Subject: UI: use subpanel for particle emission source, as an example. --- release/scripts/startup/bl_ui/properties_particle.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 1b1ce9d44a9..fa4d084f17d 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -281,8 +281,18 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): col.prop(part, "lifetime") col.prop(part, "lifetime_random", slider=True, text="Lifetime Randomness") - col.separator() - layout.label(text="Source") + +class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): + bl_label = "Source" + bl_parent_id = "PARTICLE_PT_emission" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + def draw(self, context): + layout = self.layout + + part = particle_get_settings(context) + + layout.use_property_split = True col = layout.column() col.prop(part, "emit_from") @@ -1460,6 +1470,7 @@ classes = ( PARTICLE_UL_particle_systems, PARTICLE_PT_context_particles, PARTICLE_PT_emission, + PARTICLE_PT_emission_source, PARTICLE_PT_hair_dynamics, PARTICLE_PT_cache, PARTICLE_PT_velocity, -- cgit v1.2.3