diff --git a/ui/properties_yaf_AA_settings.py b/ui/properties_yaf_AA_settings.py index c0c64c87..bc2a0fa3 100644 --- a/ui/properties_yaf_AA_settings.py +++ b/ui/properties_yaf_AA_settings.py @@ -40,33 +40,31 @@ def draw(self, context): split = layout.split() col = split.column() - spp = col.column() - sub = col.column() - sub.prop(scene, "AA_filter_type") - spp.prop(scene, "AA_min_samples") - sub.prop(scene, "AA_pixelwidth") - spp.enabled = False - if scene.intg_light_method != "SPPM": - sub.enabled = scene.AA_passes > 1 - spp.enabled = True - # fix suggest by 'samo' in http://www.yafaray.org/node/581 + sub_always = col.column() + sub_nosppm = col.column() + sub_nosppm.enabled = scene.intg_light_method != "SPPM" + sub_morethan1pass = col.column() + sub_morethan1pass.enabled = scene.AA_passes > 1 + sub_nosppm_morethan1pass = col.column() + sub_nosppm_morethan1pass.enabled = scene.intg_light_method != "SPPM" and scene.AA_passes > 1 + sub_always.prop(scene, "AA_filter_type") + sub_nosppm.prop(scene, "AA_min_samples") + sub_always.prop(scene, "AA_pixelwidth") + col = split.column() - spp = col.column() - sub = col.column() - spp.enabled = False - if scene.intg_light_method != "SPPM": - sub.enabled = scene.AA_passes > 1 - spp.enabled = True - # - spp.prop(scene, "AA_passes") - spp.prop(scene, "AA_inc_samples") - spp.prop(scene.yafaray.noise_control, "background_resampling") + sub_always = col.column() + sub_nosppm = col.column() + sub_nosppm.enabled = scene.intg_light_method != "SPPM" + sub_morethan1pass = col.column() + sub_morethan1pass.enabled = scene.AA_passes > 1 + sub_nosppm_morethan1pass = col.column() + sub_nosppm_morethan1pass.enabled = scene.intg_light_method != "SPPM" and scene.AA_passes > 1 + sub_nosppm.prop(scene, "AA_passes") + sub_nosppm_morethan1pass.prop(scene, "AA_inc_samples") + sub_nosppm_morethan1pass.prop(scene.yafaray.noise_control, "background_resampling") row = layout.row() - row.enabled = False - - if scene.AA_passes > 1 and scene.intg_light_method != "SPPM": - row.enabled = True + row.enabled = scene.intg_light_method != "SPPM" and scene.AA_passes > 1 row.prop(scene.yafaray.noise_control, "dark_detection_type") col = row.column() @@ -79,18 +77,12 @@ def draw(self, context): col.prop(scene, "AA_threshold") row = layout.row() - row.enabled = False - - if scene.AA_passes > 1 and scene.intg_light_method != "SPPM": - row.enabled = True + row.enabled = scene.intg_light_method != "SPPM" and scene.AA_passes > 1 row.prop(scene.yafaray.noise_control, "detect_color_noise") row = layout.row() - row.enabled = False - - if scene.AA_passes > 1 and scene.intg_light_method != "SPPM": - row.enabled = True + row.enabled = scene.intg_light_method != "SPPM" and scene.AA_passes > 1 col = row.column() col.prop(scene.yafaray.noise_control, "sample_multiplier_factor")