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:
authorMai Lavelle <mai.lavelle@gmail.com>2016-08-24 18:26:19 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2016-08-26 19:14:07 +0300
commit5849651a4650facd6bbf2bc7d13f9bd88dd74120 (patch)
treebcb35a8c6374efb9293dc25b585bf96d8214bcae
parente9c5359f43b8fdc825a6dd55ea41bd1b52216bda (diff)
Cycles: Make UI for subdivision more clear
Users have been getting a bit confused by the way things are worded/arranged in the UI. This patch makes a few changes to the UI to make it more clear how to use subdivision: - make Subdivide UVs option inactive when adaptive subdivision is enabled as UV subdivision is currently unsupported - add "px" to dicing rates in the Geometry Panel - display the final dicing rate in the modifier - reworded "Dicing Rate" in the modifier to "Dicing Scale" to make more clear that this is a multiplier for the scene dicing rate and added a note the the tooltip pointing the user to that setting in the Geometry Panel Reviewed By: brecht Differential Revision: https://developer.blender.org/D2174
-rw-r--r--intern/cycles/blender/addon/properties.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py27
2 files changed, 27 insertions, 6 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 8e82eac2b59..82a18b3f6a9 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -369,12 +369,14 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Size of a micropolygon in pixels",
min=0.1, max=1000.0,
default=1.0,
+ subtype="PIXEL"
)
cls.preview_dicing_rate = FloatProperty(
name="Preview Dicing Rate",
description="Size of a micropolygon in pixels during preview render",
min=0.1, max=1000.0,
default=8.0,
+ subtype="PIXEL"
)
cls.max_subdivisions = IntProperty(
@@ -1007,8 +1009,8 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
)
cls.dicing_rate = FloatProperty(
- name="Dicing Rate",
- description="Multiplier for scene dicing rate",
+ name="Dicing Scale",
+ description="Multiplier for scene dicing rate (located in the Geometry Panel)",
min=0.1, max=1000.0,
default=1.0,
)
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 50221d57b49..84ee06c7d70 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -900,9 +900,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- engine = bpy.context.scene.render.engine
- if engine == "CYCLES" and md == ob.modifiers[-1] and bpy.context.scene.cycles.feature_set == "EXPERIMENTAL":
- col.label(text="Preview:")
+ scene = bpy.context.scene
+ engine = scene.render.engine
+ show_adaptive_options = (engine == "CYCLES" and md == ob.modifiers[-1] and
+ scene.cycles.feature_set == "EXPERIMENTAL")
+
+ if show_adaptive_options:
+ col.label(text="View:")
col.prop(md, "levels", text="Levels")
col.label(text="Render:")
col.prop(ob.cycles, "use_adaptive_subdivision", text="Adaptive")
@@ -917,11 +921,26 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Options:")
- col.prop(md, "use_subsurf_uv")
+
+ sub = col.column()
+ sub.active = (not show_adaptive_options) or (not ob.cycles.use_adaptive_subdivision)
+ sub.prop(md, "use_subsurf_uv")
+
col.prop(md, "show_only_control_edges")
if hasattr(md, "use_opensubdiv"):
col.prop(md, "use_opensubdiv")
+ if show_adaptive_options and ob.cycles.use_adaptive_subdivision:
+ col = layout.column(align=True)
+ col.scale_y = 0.6
+ col.separator()
+ col.label("Final Dicing Rate:")
+ col.separator()
+
+ render = max(scene.cycles.dicing_rate * ob.cycles.dicing_rate, 0.1)
+ preview = max(scene.cycles.preview_dicing_rate * ob.cycles.dicing_rate, 0.1)
+ col.label("Render %.2f px, Preview %.2f px" % (render, preview))
+
def SURFACE(self, layout, ob, md):
layout.label(text="Settings are inside the Physics tab")