From 5849651a4650facd6bbf2bc7d13f9bd88dd74120 Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Wed, 24 Aug 2016 11:26:19 -0400 Subject: 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 --- .../startup/bl_ui/properties_data_modifier.py | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'release') 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") -- cgit v1.2.3