[Bf-blender-cvs] [58555ccc7aa] master: Cleanup: format (with autopep8 line wrapping applied)

Campbell Barton noreply at git.blender.org
Fri May 13 11:23:16 CEST 2022


Commit: 58555ccc7aabecd6349de816af29be33f0fc9941
Author: Campbell Barton
Date:   Fri May 13 19:21:54 2022 +1000
Branches: master
https://developer.blender.org/rB58555ccc7aabecd6349de816af29be33f0fc9941

Cleanup: format (with autopep8 line wrapping applied)

===================================================================

M	intern/cycles/blender/addon/properties.py
M	intern/cycles/blender/addon/ui.py

===================================================================

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 9b4799d252f..9acc9e99ad0 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -24,12 +24,19 @@ from . import camera
 
 enum_devices = (
     ('CPU', "CPU", "Use CPU for rendering"),
-    ('GPU', "GPU Compute", "Use GPU compute device for rendering, configured in the system tab in the user preferences"),
+    ('GPU', "GPU Compute",
+        "Use GPU compute device for rendering, configured in the system tab in the user preferences"),
 )
 
 enum_feature_set = (
-    ('SUPPORTED', "Supported", "Only use finished and supported features"),
-    ('EXPERIMENTAL', "Experimental", "Use experimental and incomplete features that might be broken or change in the future", 'ERROR', 1),
+    ('SUPPORTED',
+     "Supported",
+     "Only use finished and supported features"),
+    ('EXPERIMENTAL',
+     "Experimental",
+     "Use experimental and incomplete features that might be broken or change in the future",
+     'ERROR',
+     1),
 )
 
 enum_displacement_methods = (
@@ -81,9 +88,14 @@ enum_sampling_pattern = (
 )
 
 enum_volume_sampling = (
-    ('DISTANCE', "Distance", "Use distance sampling, best for dense volumes with lights far away"),
-    ('EQUIANGULAR', "Equiangular", "Use equiangular sampling, best for volumes with low density with light inside or near the volume"),
-    ('MULTIPLE_IMPORTANCE', "Multiple Importance",
+    ('DISTANCE',
+     "Distance",
+     "Use distance sampling, best for dense volumes with lights far away"),
+    ('EQUIANGULAR',
+     "Equiangular",
+     "Use equiangular sampling, best for volumes with low density with light inside or near the volume"),
+    ('MULTIPLE_IMPORTANCE',
+     "Multiple Importance",
      "Combine distance and equi-angular sampling for volumes where neither method is ideal"),
 )
 
@@ -93,10 +105,15 @@ enum_volume_interpolation = (
 )
 
 enum_world_mis = (
-    ('NONE', "None", "Don't sample the background, faster but might cause noise for non-solid backgrounds"),
-    ('AUTOMATIC', "Auto", "Automatically try to determine the best setting"),
-    ('MANUAL', "Manual", "Manually set the resolution of the sampling map, higher values are slower and require more memory but reduce noise")
-)
+    ('NONE',
+     "None",
+     "Don't sample the background, faster but might cause noise for non-solid backgrounds"),
+    ('AUTOMATIC',
+     "Auto",
+     "Automatically try to determine the best setting"),
+    ('MANUAL',
+     "Manual",
+     "Manually set the resolution of the sampling map, higher values are slower and require more memory but reduce noise"))
 
 enum_device_type = (
     ('CPU', "CPU", "CPU", 0),
@@ -210,17 +227,33 @@ enum_denoising_input_passes = (
 )
 
 enum_denoising_prefilter = (
-    ('NONE', "None", "No prefiltering, use when guiding passes are noise-free", 1),
-    ('FAST', "Fast", "Denoise color and guiding passes together. Improves quality when guiding passes are noisy using least amount of extra processing time", 2),
-    ('ACCURATE', "Accurate", "Prefilter noisy guiding passes before denoising color. Improves quality when guiding passes are noisy using extra processing time", 3),
+    ('NONE',
+     "None",
+     "No prefiltering, use when guiding passes are noise-free",
+     1),
+    ('FAST',
+     "Fast",
+     "Denoise color and guiding passes together. Improves quality when guiding passes are noisy using least amount of extra processing time",
+     2),
+    ('ACCURATE',
+     "Accurate",
+     "Prefilter noisy guiding passes before denoising color. Improves quality when guiding passes are noisy using extra processing time",
+     3),
 )
 
 enum_direct_light_sampling_type = (
-    ('MULTIPLE_IMPORTANCE_SAMPLING', "Multiple Importance Sampling",
-     "Multiple importance sampling is used to combine direct light contributions from next-event estimation and forward path tracing", 0),
-    ('FORWARD_PATH_TRACING', "Forward Path Tracing", "Direct light contributions are only sampled using forward path tracing", 1),
-    ('NEXT_EVENT_ESTIMATION', "Next-Event Estimation",
-     "Direct light contributions are only sampled using next-event estimation", 2),
+    ('MULTIPLE_IMPORTANCE_SAMPLING',
+     "Multiple Importance Sampling",
+     "Multiple importance sampling is used to combine direct light contributions from next-event estimation and forward path tracing",
+     0),
+    ('FORWARD_PATH_TRACING',
+     "Forward Path Tracing",
+     "Direct light contributions are only sampled using forward path tracing",
+     1),
+    ('NEXT_EVENT_ESTIMATION',
+     "Next-Event Estimation",
+     "Direct light contributions are only sampled using next-event estimation",
+     2),
 )
 
 
@@ -357,7 +390,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     scrambling_distance: FloatProperty(
         name="Scrambling Distance",
         default=1.0,
-        min=0.0, soft_max=1.0,
+        min=0.0,
+        soft_max=1.0,
         description="Reduce randomization between pixels to improve GPU rendering performance, at the cost of possible rendering artifacts if set too low",
     )
     preview_scrambling_distance: BoolProperty(
@@ -383,7 +417,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
         name="Light Sampling Threshold",
         description="Probabilistically terminate light samples when the light contribution is below this threshold (more noise but faster rendering). "
         "Zero disables the test and never ignores lights",
-        min=0.0, max=1.0,
+        min=0.0,
+        max=1.0,
         default=0.01,
     )
 
@@ -395,7 +430,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     adaptive_threshold: FloatProperty(
         name="Adaptive Sampling Threshold",
         description="Noise level step to stop sampling at, lower values reduce noise at the cost of render time. Zero for automatic setting based on number of AA samples",
-        min=0.0, max=1.0,
+        min=0.0,
+        max=1.0,
         soft_min=0.001,
         default=0.01,
         precision=4,
@@ -403,7 +439,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     adaptive_min_samples: IntProperty(
         name="Adaptive Min Samples",
         description="Minimum AA samples for adaptive sampling, to discover noisy features before stopping sampling. Zero for automatic setting based on noise threshold",
-        min=0, max=4096,
+        min=0,
+        max=4096,
         default=0,
     )
 
@@ -415,7 +452,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     preview_adaptive_threshold: FloatProperty(
         name="Adaptive Sampling Threshold",
         description="Noise level step to stop sampling at, lower values reduce noise at the cost of render time. Zero for automatic setting based on number of AA samples, for viewport renders",
-        min=0.0, max=1.0,
+        min=0.0,
+        max=1.0,
         soft_min=0.001,
         default=0.1,
         precision=4,
@@ -423,7 +461,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     preview_adaptive_min_samples: IntProperty(
         name="Adaptive Min Samples",
         description="Minimum AA samples for adaptive sampling, to discover noisy features before stopping sampling. Zero for automatic setting based on noise threshold, for viewport renders",
-        min=0, max=4096,
+        min=0,
+        max=4096,
         default=0,
     )
 
@@ -550,7 +589,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     max_subdivisions: IntProperty(
         name="Max Subdivisions",
         description="Stop subdividing when this level is reached even if the dice rate would produce finer tessellation",
-        min=0, max=16,
+        min=0,
+        max=16,
         default=12,
     )
 
@@ -817,8 +857,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
     debug_use_optix_debug: BoolProperty(
         name="OptiX Module Debug",
         description="Load OptiX module in debug mode: lower logging verbosity level, enable validations, and lower optimization level",
-        default=False
-    )
+        default=False)
 
     @classmethod
     def register(cls):
@@ -1185,7 +1224,8 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
     motion_steps: IntProperty(
         name="Motion Steps",
         description="Control accuracy of motion blur, more steps gives more memory usage (actual number of steps is 2^(steps - 1))",
-        min=1, max=7,
+        min=1,
+        max=7,
         default=1,
     )
 
@@ -1224,7 +1264,8 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
     shadow_terminator_geometry_offset: FloatProperty(
         name="Shadow Terminator Geometry Offset",
         description="Offset rays from the surface to reduce shadow terminator artifact on low poly geometry. Only affects triangles at grazing angles to light",
-        min=0.0, max=1.0,
+        min=0.0,
+        max=1.0,
         default=0.1,
     )
 
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 886f5345020..9d2dbdf6732 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1082,8 +1082,18 @@ class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel):
 
 
 def has_geometry_visibility(ob):
-    return ob and ((ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'LIGHT', 'VOLUME', 'POINTCLOUD', 'CURVES'}) or
-                   (ob.instance_type == 'COLLECTION' and ob.instance_collection))
+    return ob and (
+        (ob.type in {
+            'MESH',
+            'CURVE',
+            'SURFACE',
+            'FONT',
+            'META',
+            'LIGHT',
+            'VOLUME',
+            'POINTCLOUD',
+            'CURVES',
+        }) or (ob.instance_type == 'COLLECTION' and ob.instance_collection))
 
 
 class CYCLES_OBJECT_PT_shading(CyclesButtonsPanel, Panel):



More information about the Bf-blender-cvs mailing list