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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-05-29 12:20:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-30 13:25:20 +0300
commite0e3038b1e7aec26da7161defa5a34b5d9373b5c (patch)
tree39fc5c0137fc7ee6bef28eb84ef0d85964ba99a2 /release
parentec6da3d72e61240bfec1c09f1ef75e41873bf6a0 (diff)
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.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py31
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py21
2 files changed, 52 insertions, 0 deletions
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,