[Bf-blender-cvs] [f6743fcaa4f] blender2.8: UI: use subpanel for particle emission source, as an example.

Brecht Van Lommel noreply at git.blender.org
Sun Jun 3 21:36:48 CEST 2018


Commit: f6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1
Author: Brecht Van Lommel
Date:   Sun Jun 3 21:35:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf6743fcaa4fbccd4bd8a92c44a3cd4bd2d153fd1

UI: use subpanel for particle emission source, as an example.

===================================================================

M	release/scripts/startup/bl_ui/properties_particle.py

===================================================================

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,



More information about the Bf-blender-cvs mailing list