diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-03 22:35:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-03 22:36:12 +0300 |
commit | f6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1 (patch) | |
tree | 9b23de1f67ec9bcb2ddca6a1f988ca3e52627856 /release/scripts/startup/bl_ui/properties_particle.py | |
parent | d7c2b78822ff20fb78418c43d6badd692fa98784 (diff) |
UI: use subpanel for particle emission source, as an example.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_particle.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_particle.py | 15 |
1 files changed, 13 insertions, 2 deletions
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, |