From e0e3038b1e7aec26da7161defa5a34b5d9373b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 29 May 2018 11:20:37 +0200 Subject: Hair Particles: DNA: Add properties for new GPU hairs. Hair Particles shape properties are ported from cycles. Thoses properties have the same defaults and have a do_version of their own. Cycles will use theses properties instead of its custom ones. Some realtime engine specific settings are also added to scene->r because it's much easier to control as global values. Bumping Version number so cycles can do its own do_version on top of the default settings. --- .../scripts/startup/bl_ui/properties_particle.py | 31 ++++++++++++++++++++++ release/scripts/startup/bl_ui/properties_render.py | 21 +++++++++++++++ 2 files changed, 52 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index b6f7cfe3e84..f470a81dca1 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -1428,6 +1428,36 @@ class PARTICLE_PT_textures(ParticleButtonsPanel, Panel): layout.template_ID(slot, "texture", new="texture.new") +class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel): + bl_label = "Hair Shape" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + if context.particle_system is None: + return False + return particle_panel_poll(cls, context) + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = psys.settings + + row = layout.row() + row.prop(part, "shape", text="Shape") + + layout.label(text="Thickness:") + row = layout.row() + row.prop(part, "root_radius", text="Root") + row.prop(part, "tip_radius", text="Tip") + + row = layout.row() + row.prop(part, "radius_scale", text="Scaling") + row.prop(part, "use_close_tip") + + class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "particle_system.settings" @@ -1449,6 +1479,7 @@ classes = ( PARTICLE_PT_render, PARTICLE_PT_draw, PARTICLE_PT_children, + PARTICLE_PT_hair_shape, PARTICLE_PT_field_weights, PARTICLE_PT_force_fields, PARTICLE_PT_vertexgroups, diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index bccde2da2f4..404e4c4500b 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -710,6 +710,26 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel): col.prop(rd, "alpha_mode", text="Alpha") +class RENDER_PT_hair(RenderButtonsPanel, Panel): + bl_label = "Hair" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + return (context.engine in cls.COMPAT_ENGINES) + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = scene.render + + row = layout.row() + row.prop(rd, "hair_type", expand=True) + + layout.prop(rd, "hair_subdiv") + + classes = ( RENDER_MT_presets, RENDER_MT_ffmpeg_presets, @@ -722,6 +742,7 @@ classes = ( RENDER_PT_encoding, RENDER_UL_renderviews, RENDER_PT_stereoscopy, + RENDER_PT_hair, RENDER_PT_clay_settings, RENDER_PT_eevee_sampling, RENDER_PT_eevee_film, -- cgit v1.2.3