[Bf-blender-cvs] [0108ce1fe5b] master: Cleanup: pep8, cycles

Campbell Barton noreply at git.blender.org
Thu Jul 12 11:03:37 CEST 2018


Commit: 0108ce1fe5b9b4f24b5bdce4924e9b058d0edfa3
Author: Campbell Barton
Date:   Thu Jul 12 11:03:13 2018 +0200
Branches: master
https://developer.blender.org/rB0108ce1fe5b9b4f24b5bdce4924e9b058d0edfa3

Cleanup: pep8, cycles

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

M	intern/cycles/blender/addon/__init__.py
M	intern/cycles/blender/addon/engine.py
M	intern/cycles/blender/addon/properties.py
M	intern/cycles/blender/addon/ui.py
M	intern/cycles/blender/addon/version_update.py

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

diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py
index a2d6262fb20..038126278aa 100644
--- a/intern/cycles/blender/addon/__init__.py
+++ b/intern/cycles/blender/addon/__init__.py
@@ -45,9 +45,9 @@ if "bpy" in locals():
 import bpy
 
 from . import (
-        engine,
-        version_update,
-        )
+    engine,
+    version_update,
+)
 
 
 class CyclesRender(bpy.types.RenderEngine):
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 1f97eff9bd0..08c6a65e5ad 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -82,15 +82,17 @@ def _parse_command_line():
         if args.cycles_resumable_current_chunk is not None:
             import _cycles
             _cycles.set_resumable_chunk(
-                    int(args.cycles_resumable_num_chunks),
-                    int(args.cycles_resumable_current_chunk))
+                int(args.cycles_resumable_num_chunks),
+                int(args.cycles_resumable_current_chunk),
+            )
         elif args.cycles_resumable_start_chunk is not None and \
-             args.cycles_resumable_end_chunk:
+                args.cycles_resumable_end_chunk:
             import _cycles
             _cycles.set_resumable_chunk_range(
-                    int(args.cycles_resumable_num_chunks),
-                    int(args.cycles_resumable_start_chunk),
-                    int(args.cycles_resumable_end_chunk))
+                int(args.cycles_resumable_num_chunks),
+                int(args.cycles_resumable_start_chunk),
+                int(args.cycles_resumable_end_chunk),
+            )
 
 
 def init():
@@ -206,6 +208,7 @@ def system_info():
     import _cycles
     return _cycles.system_info()
 
+
 def register_passes(engine, scene, srl):
     engine.register_pass(scene, srl, "Combined", 4, "RGBA", 'COLOR')
 
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 4484dcfbfd7..c97d942af9d 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -31,7 +31,7 @@ import _cycles
 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"),
-    )
+)
 
 if _cycles.with_network:
     enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
@@ -39,34 +39,34 @@ if _cycles.with_network:
 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),
-    )
+)
 
 enum_displacement_methods = (
     ('BUMP', "Bump Only", "Bump mapping to simulate the appearance of displacement"),
     ('DISPLACEMENT', "Displacement Only", "Use true displacement of surface only, requires fine subdivision"),
     ('BOTH', "Displacement and Bump", "Combination of true displacement and bump mapping for finer detail"),
-    )
+)
 
 enum_bvh_layouts = (
     ('BVH2', "BVH2", "", 1),
     ('BVH4', "BVH4", "", 2),
-    )
+)
 
 enum_bvh_types = (
     ('DYNAMIC_BVH', "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"),
     ('STATIC_BVH', "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"),
-    )
+)
 
 enum_filter_types = (
     ('BOX', "Box", "Box filter"),
     ('GAUSSIAN', "Gaussian", "Gaussian filter"),
     ('BLACKMAN_HARRIS', "Blackman-Harris", "Blackman-Harris filter"),
-    )
+)
 
 enum_aperture_types = (
     ('RADIUS', "Radius", "Directly change the size of the aperture"),
     ('FSTOP', "F-stop", "Change the size of the aperture by f-stop"),
-    )
+)
 
 enum_panorama_types = (
     ('EQUIRECTANGULAR', "Equirectangular", "Render the scene with a spherical camera, also known as Lat Long panorama"),
@@ -74,23 +74,23 @@ enum_panorama_types = (
     ('FISHEYE_EQUISOLID', "Fisheye Equisolid",
                           "Similar to most fisheye modern lens, takes sensor dimensions into consideration"),
     ('MIRRORBALL', "Mirror Ball", "Uses the mirror ball mapping"),
-    )
+)
 
 enum_curve_primitives = (
     ('TRIANGLES', "Triangles", "Create triangle geometry around strands"),
     ('LINE_SEGMENTS', "Line Segments", "Use line segment primitives"),
     ('CURVE_SEGMENTS', "Curve Segments", "Use segmented cardinal curve primitives"),
-    )
+)
 
 enum_triangle_curves = (
     ('CAMERA_TRIANGLES', "Planes", "Create individual triangles forming planes that face camera"),
     ('TESSELLATED_TRIANGLES', "Tessellated", "Create mesh surrounding each strand"),
-    )
+)
 
 enum_curve_shape = (
     ('RIBBONS', "Ribbons", "Ignore thickness of each strand"),
     ('THICK', "Thick", "Use thickness of strand when rendering"),
-    )
+)
 
 enum_tile_order = (
     ('CENTER', "Center", "Render from center to the edges"),
@@ -99,46 +99,46 @@ enum_tile_order = (
     ('TOP_TO_BOTTOM', "Top to Bottom", "Render from top to bottom"),
     ('BOTTOM_TO_TOP', "Bottom to Top", "Render from bottom to top"),
     ('HILBERT_SPIRAL', "Hilbert Spiral", "Render in a Hilbert Spiral"),
-    )
+)
 
 enum_use_layer_samples = (
     ('USE', "Use", "Per render layer number of samples override scene samples"),
     ('BOUNDED', "Bounded", "Bound per render layer number of samples by global samples"),
     ('IGNORE', "Ignore", "Ignore per render layer number of samples"),
-    )
+)
 
 enum_sampling_pattern = (
     ('SOBOL', "Sobol", "Use Sobol random sampling pattern"),
     ('CORRELATED_MUTI_JITTER', "Correlated Multi-Jitter", "Use Correlated Multi-Jitter random sampling pattern"),
-    )
+)
 
 enum_integrator = (
     ('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
     ('PATH', "Path Tracing", "Pure path tracing integrator"),
-    )
+)
 
 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", "Combine distance and equi-angular sampling for volumes where neither method is ideal"),
-    )
+)
 
 enum_volume_interpolation = (
     ('LINEAR', "Linear", "Good smoothness and speed"),
     ('CUBIC', "Cubic", "Smoothed high quality interpolation, but slower")
-    )
+)
 
 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")
-    )
+)
 
 enum_device_type = (
     ('CPU', "CPU", "CPU", 0),
     ('CUDA', "CUDA", "CUDA", 1),
     ('OPENCL', "OpenCL", "OpenCL", 2)
-    )
+)
 
 enum_texture_limit = (
     ('OFF', "No Limit", "No texture size limit", 0),
@@ -149,423 +149,424 @@ enum_texture_limit = (
     ('2048', "2048", "Limit texture size to 2048 pixels", 5),
     ('4096', "4096", "Limit texture size to 4096 pixels", 6),
     ('8192', "8192", "Limit texture size to 8192 pixels", 7),
-    )
+)
+
 
 class CyclesRenderSettings(bpy.types.PropertyGroup):
     @classmethod
     def register(cls):
         bpy.types.Scene.cycles = PointerProperty(
-                name="Cycles Render Settings",
-                description="Cycles render settings",
-                type=cls,
-                )
+            name="Cycles Render Settings",
+            description="Cycles render settings",
+            type=cls,
+        )
         cls.device = EnumProperty(
-                name="Device",
-                description="Device to use for rendering",
-                items=enum_devices,
-                default='CPU',
-                )
+            name="Device",
+            description="Device to use for rendering",
+            items=enum_devices,
+            default='CPU',
+        )
         cls.feature_set = EnumProperty(
-                name="Feature Set",
-                description="Feature set to use for rendering",
-                items=enum_feature_set,
-                default='SUPPORTED',
-                )
+            name="Feature Set",
+            description="Feature set to use for rendering",
+            items=enum_feature_set,
+            default='SUPPORTED',
+        )
         cls.shading_system = BoolProperty(
-                name="Open Shading Language",
-                description="Use Open Shading Language (CPU rendering only)",
-                )
+            name="Open Shading Language",
+            description="Use Open Shading Language (CPU rendering only)",
+        )
 
         cls.progressive = EnumProperty(
-                name="Integrator",
-                description="Method to sample lights and materials",
-                items=enum_integrator,
-                default='PATH',
-                )
+            name="Integrator",
+            description="Method to sample lights and materials",
+            items=enum_integrator,
+            default='PATH',
+        )
 
         cls.use_square_samples = BoolProperty(
-                name="Square Samples",
-                description="Square sampling values for easier artist control",
-                default=False,
-                )
+            name="Square Samples",
+            description="Square sampling values for easier artist control",
+            default=False,
+        )
 
         cls.samples = IntProperty(
-                name="Samples",
-                description="Number of samples to render for each pixel",
-                min=1, max=2147483647,
-                default=128,
-                )
+            name="Samples",
+            description="Number of samples to render for each pixel",
+            min=1, max=2147483647,
+            default=128,
+        )
        

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list