Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 12 Jul 2018 09:04:53 +0000 (11:04 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 12 Jul 2018 09:10:25 +0000 (11:10 +0200)
1  2 
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/addon/version_update.py

Simple merge
index 51e887d08cade52db46d029483966cbd353da4bc,c97d942af9df8870dcf50b42afa011f469b0db90..7f0cb7e875f60bc15f3e2ebde6799343e74129ef
@@@ -157,283 -156,289 +158,283 @@@ class CyclesRenderSettings(bpy.types.Pr
      @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,
+         )
          cls.preview_samples = IntProperty(
-                 name="Preview Samples",
-                 description="Number of samples to render in the viewport, unlimited if 0",
-                 min=0, max=2147483647,
-                 default=32,
-                 )
+             name="Preview Samples",
+             description="Number of samples to render in the viewport, unlimited if 0",
+             min=0, max=2147483647,
+             default=32,
+         )
          cls.preview_pause = BoolProperty(
-                 name="Pause Preview",
-                 description="Pause all viewport preview renders",
-                 default=False,
-                 )
+             name="Pause Preview",
+             description="Pause all viewport preview renders",
+             default=False,
+         )
 -        cls.preview_active_layer = BoolProperty(
 -            name="Preview Active Layer",
 -            description="Preview active render layer in viewport",
 -            default=False,
 -        )
 -
          cls.aa_samples = IntProperty(
-                 name="AA Samples",
-                 description="Number of antialiasing samples to render for each pixel",
-                 min=1, max=2097151,
-                 default=128,
-                 )
+             name="AA Samples",
+             description="Number of antialiasing samples to render for each pixel",
+             min=1, max=2097151,
+             default=128,
+         )
          cls.preview_aa_samples = IntProperty(
-                 name="AA Samples",
-                 description="Number of antialiasing samples to render in the viewport, unlimited if 0",
-                 min=0, max=2097151,
-                 default=32,
-                 )
+             name="AA Samples",
+             description="Number of antialiasing samples to render in the viewport, unlimited if 0",
+             min=0, max=2097151,
+             default=32,
+         )
          cls.diffuse_samples = IntProperty(
-                 name="Diffuse Samples",
-                 description="Number of diffuse bounce samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Diffuse Samples",
+             description="Number of diffuse bounce samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
          cls.glossy_samples = IntProperty(
-                 name="Glossy Samples",
-                 description="Number of glossy bounce samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Glossy Samples",
+             description="Number of glossy bounce samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
          cls.transmission_samples = IntProperty(
-                 name="Transmission Samples",
-                 description="Number of transmission bounce samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Transmission Samples",
+             description="Number of transmission bounce samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
          cls.ao_samples = IntProperty(
-                 name="Ambient Occlusion Samples",
-                 description="Number of ambient occlusion samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Ambient Occlusion Samples",
+             description="Number of ambient occlusion samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
          cls.mesh_light_samples = IntProperty(
-                 name="Mesh Light Samples",
-                 description="Number of mesh emission light samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Mesh Light Samples",
+             description="Number of mesh emission light samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
  
          cls.subsurface_samples = IntProperty(
-                 name="Subsurface Samples",
-                 description="Number of subsurface scattering samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Subsurface Samples",
+             description="Number of subsurface scattering samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
  
          cls.volume_samples = IntProperty(
-                 name="Volume Samples",
-                 description="Number of volume scattering samples to render for each AA sample",
-                 min=1, max=1024,
-                 default=1,
-                 )
+             name="Volume Samples",
+             description="Number of volume scattering samples to render for each AA sample",
+             min=1, max=1024,
+             default=1,
+         )
  
          cls.sampling_pattern = EnumProperty(
-                 name="Sampling Pattern",
-                 description="Random sampling pattern used by the integrator",
-                 items=enum_sampling_pattern,
-                 default='SOBOL',
-                 )
+             name="Sampling Pattern",
+             description="Random sampling pattern used by the integrator",
+             items=enum_sampling_pattern,
+             default='SOBOL',
+         )
  
          cls.use_layer_samples = EnumProperty(
-                 name="Layer Samples",
-                 description="How to use per render layer sample settings",
-                 items=enum_use_layer_samples,
-                 default='USE',
-                 )
+             name="Layer Samples",
+             description="How to use per render layer sample settings",
+             items=enum_use_layer_samples,
+             default='USE',
+         )
  
          cls.sample_all_lights_direct = BoolProperty(
-                 name="Sample All Direct Lights",
-                 description="Sample all lights (for direct samples), rather than randomly picking one",
-                 default=True,
-                 )
+             name="Sample All Direct Lights",
+             description="Sample all lights (for direct samples), rather than randomly picking one",
+             default=True,
+         )
  
          cls.sample_all_lights_indirect = BoolProperty(
-                 name="Sample All Indirect Lights",
-                 description="Sample all lights (for indirect samples), rather than randomly picking one",
-                 default=True,
-                 )
+             name="Sample All Indirect Lights",
+             description="Sample all lights (for indirect samples), rather than randomly picking one",
+             default=True,
+         )
          cls.light_sampling_threshold = FloatProperty(
-                 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,
-                 default=0.01,
-                 )
+             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,
+             default=0.01,
+         )
  
          cls.caustics_reflective = BoolProperty(
-                 name="Reflective Caustics",
-                 description="Use reflective caustics, resulting in a brighter image (more noise but added realism)",
-                 default=True,
-                 )
+             name="Reflective Caustics",
+             description="Use reflective caustics, resulting in a brighter image (more noise but added realism)",
+             default=True,
+         )
  
          cls.caustics_refractive = BoolProperty(
-                 name="Refractive Caustics",
-                 description="Use refractive caustics, resulting in a brighter image (more noise but added realism)",
-                 default=True,
-                 )
+             name="Refractive Caustics",
+             description="Use refractive caustics, resulting in a brighter image (more noise but added realism)",
+             default=True,
+         )
  
          cls.blur_glossy = FloatProperty(
-                 name="Filter Glossy",
-                 description="Adaptively blur glossy shaders after blurry bounces, "
-                             "to reduce noise at the cost of accuracy",
-                 min=0.0, max=10.0,
-                 default=1.0,
-                 )
+             name="Filter Glossy",
+             description="Adaptively blur glossy shaders after blurry bounces, "
+             "to reduce noise at the cost of accuracy",
+             min=0.0, max=10.0,
+             default=1.0,
+         )
  
          cls.max_bounces = IntProperty(
-                 name="Max Bounces",
-                 description="Total maximum number of bounces",
-                 min=0, max=1024,
-                 default=12,
-                 )
+             name="Max Bounces",
+             description="Total maximum number of bounces",
+             min=0, max=1024,
+             default=12,
+         )
  
          cls.diffuse_bounces = IntProperty(
-                 name="Diffuse Bounces",
-                 description="Maximum number of diffuse reflection bounces, bounded by total maximum",
-                 min=0, max=1024,
-                 default=4,
-                 )
+             name="Diffuse Bounces",
+             description="Maximum number of diffuse reflection bounces, bounded by total maximum",
+             min=0, max=1024,
+             default=4,
+         )
          cls.glossy_bounces = IntProperty(
-                 name="Glossy Bounces",
-                 description="Maximum number of glossy reflection bounces, bounded by total maximum",
-                 min=0, max=1024,
-                 default=4,
-                 )
+             name="Glossy Bounces",
+             description="Maximum number of glossy reflection bounces, bounded by total maximum",
+             min=0, max=1024,
+             default=4,
+         )
          cls.transmission_bounces = IntProperty(
-                 name="Transmission Bounces",
-                 description="Maximum number of transmission bounces, bounded by total maximum",
-                 min=0, max=1024,
-                 default=12,
-                 )
+             name="Transmission Bounces",
+             description="Maximum number of transmission bounces, bounded by total maximum",
+             min=0, max=1024,
+             default=12,
+         )
          cls.volume_bounces = IntProperty(
-                 name="Volume Bounces",
-                 description="Maximum number of volumetric scattering events",
-                 min=0, max=1024,
-                 default=0,
-                 )
+             name="Volume Bounces",
+             description="Maximum number of volumetric scattering events",
+             min=0, max=1024,
+             default=0,
+         )
  
          cls.transparent_max_bounces = IntProperty(
-                 name="Transparent Max Bounces",
-                 description="Maximum number of transparent bounces",
-                 min=0, max=1024,
-                 default=8,
-                 )
+             name="Transparent Max Bounces",
+             description="Maximum number of transparent bounces",
+             min=0, max=1024,
+             default=8,
+         )
  
          cls.volume_step_size = FloatProperty(
-                 name="Step Size",
-                 description="Distance between volume shader samples when rendering the volume "
-                             "(lower values give more accurate and detailed results, but also increased render time)",
-                 default=0.1,
-                 min=0.0000001, max=100000.0, soft_min=0.01, soft_max=1.0, precision=4
-                 )
+             name="Step Size",
+             description="Distance between volume shader samples when rendering the volume "
+             "(lower values give more accurate and detailed results, but also increased render time)",
+             default=0.1,
+             min=0.0000001, max=100000.0, soft_min=0.01, soft_max=1.0, precision=4
+         )
  
          cls.volume_max_steps = IntProperty(
-                 name="Max Steps",
-                 description="Maximum number of steps through the volume before giving up, "
-                             "to avoid extremely long render times with big objects or small step sizes",
-                 default=1024,
-                 min=2, max=65536
-                 )
+             name="Max Steps",
+             description="Maximum number of steps through the volume before giving up, "
+             "to avoid extremely long render times with big objects or small step sizes",
+             default=1024,
+             min=2, max=65536
+         )
  
          cls.dicing_rate = FloatProperty(
-                 name="Dicing Rate",
-                 description="Size of a micropolygon in pixels",
-                 min=0.1, max=1000.0, soft_min=0.5,
-                 default=1.0,
-                 subtype="PIXEL"
-                 )
+             name="Dicing Rate",
+             description="Size of a micropolygon in pixels",
+             min=0.1, max=1000.0, soft_min=0.5,
+             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, soft_min=0.5,
-                 default=8.0,
-                 subtype="PIXEL"
-                 )
+             name="Preview Dicing Rate",
+             description="Size of a micropolygon in pixels during preview render",
+             min=0.1, max=1000.0, soft_min=0.5,
+             default=8.0,
+             subtype="PIXEL"
+         )
  
          cls.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,
-                 default=12,
-                 )
+             name="Max Subdivisions",
+             description="Stop subdividing when this level is reached even if the dice rate would produce finer tessellation",
+             min=0, max=16,
+             default=12,
+         )
  
          cls.dicing_camera = PointerProperty(
-                 name="Dicing Camera",
-                 description="Camera to use as reference point when subdividing geometry, useful to avoid crawling "
-                             "artifacts in animations when the scene camera is moving",
-                 type=bpy.types.Object,
-                 poll=lambda self, obj: obj.type == 'CAMERA',
-                 )
+             name="Dicing Camera",
+             description="Camera to use as reference point when subdividing geometry, useful to avoid crawling "
+             "artifacts in animations when the scene camera is moving",
+             type=bpy.types.Object,
+             poll=lambda self, obj: obj.type == 'CAMERA',
+         )
          cls.offscreen_dicing_scale = FloatProperty(
-                 name="Offscreen Dicing Scale",
-                 description="Multiplier for dicing rate of geometry outside of the camera view. The dicing rate "
-                             "of objects is gradually increased the further they are outside the camera view. "
-                             "Lower values provide higher quality reflections and shadows for off screen objects, "
-                             "while higher values use less memory",
-                 min=1.0, soft_max=25.0,
-                 default=4.0,
-                 )
+             name="Offscreen Dicing Scale",
+             description="Multiplier for dicing rate of geometry outside of the camera view. The dicing rate "
+             "of objects is gradually increased the further they are outside the camera view. "
+             "Lower values provide higher quality reflections and shadows for off screen objects, "
+             "while higher values use less memory",
+             min=1.0, soft_max=25.0,
+             default=4.0,
+         )
  
          cls.film_exposure = FloatProperty(
-                 name="Exposure",
-                 description="Image brightness scale",
-                 min=0.0, max=10.0,
-                 default=1.0,
-                 )
+             name="Exposure",
+             description="Image brightness scale",
+             min=0.0, max=10.0,
+             default=1.0,
+         )
          cls.film_transparent = BoolProperty(
-                 name="Transparent",
-                 description="World background is transparent, for compositing the render over another background",
-                 default=False,
-                 )
+             name="Transparent",
+             description="World background is transparent, for compositing the render over another background",
+             default=False,
+         )
          cls.film_transparent_glass = BoolProperty(
-                 name="Transparent Glass",
-                 description="Render transmissive surfaces as transparent, for compositing glass over another background",
-                 default=False,
-                 )
+             name="Transparent Glass",
+             description="Render transmissive surfaces as transparent, for compositing glass over another background",
+             default=False,
+         )
          cls.film_transparent_roughness = FloatProperty(
-                 name="Transparent Roughness Threshold",
-                 description="For transparent transmission, keep surfaces with roughness above the threshold opaque",
-                 min=0.0, max=1.0,
-                 default=0.1,
-                 )
+             name="Transparent Roughness Threshold",
+             description="For transparent transmission, keep surfaces with roughness above the threshold opaque",
+             min=0.0, max=1.0,
+             default=0.1,
+         )
  
          # Really annoyingly, we have to keep it around for a few releases,
          # otherwise forward compatibility breaks in really bad manner: CRASH!
@@@ -889,43 -894,43 +890,43 @@@ class CyclesMaterialSettings(bpy.types.
          del bpy.types.Material.cycles
  
  
 -class CyclesLampSettings(bpy.types.PropertyGroup):
 +class CyclesLightSettings(bpy.types.PropertyGroup):
      @classmethod
      def register(cls):
 -        bpy.types.Lamp.cycles = PointerProperty(
 -            name="Cycles Lamp Settings",
 -            description="Cycles lamp settings",
 +        bpy.types.Light.cycles = PointerProperty(
-                 name="Cycles Light Settings",
-                 description="Cycles light settings",
-                 type=cls,
-                 )
++            name="Cycles Light Settings",
++            description="Cycles light settings",
+             type=cls,
+         )
          cls.cast_shadow = BoolProperty(
-                 name="Cast Shadow",
-                 description="Light casts shadows",
-                 default=True,
-                 )
+             name="Cast Shadow",
 -            description="Lamp casts shadows",
++            description="Light casts shadows",
+             default=True,
+         )
          cls.samples = IntProperty(
-                 name="Samples",
-                 description="Number of light samples to render for each AA sample",
-                 min=1, max=10000,
-                 default=1,
-                 )
+             name="Samples",
+             description="Number of light samples to render for each AA sample",
+             min=1, max=10000,
+             default=1,
+         )
          cls.max_bounces = IntProperty(
-                 name="Max Bounces",
-                 description="Maximum number of bounces the light will contribute to the render",
-                 min=0, max=1024,
-                 default=1024,
-                 )
+             name="Max Bounces",
+             description="Maximum number of bounces the light will contribute to the render",
+             min=0, max=1024,
+             default=1024,
+         )
          cls.use_multiple_importance_sampling = BoolProperty(
-                 name="Multiple Importance Sample",
-                 description="Use multiple importance sampling for the light, "
-                             "reduces noise for area lights and sharp glossy materials",
-                 default=True,
-                 )
+             name="Multiple Importance Sample",
 -            description="Use multiple importance sampling for the lamp, "
 -            "reduces noise for area lamps and sharp glossy materials",
++            description="Use multiple importance sampling for the light, "
++            "reduces noise for area lights and sharp glossy materials",
+             default=True,
+         )
          cls.is_portal = BoolProperty(
-                 name="Is Portal",
-                 description="Use this area light to guide sampling of the background, "
-                             "note that this will make the light invisible",
-                 default=False,
-                 )
+             name="Is Portal",
 -            description="Use this area lamp to guide sampling of the background, "
 -            "note that this will make the lamp invisible",
++            description="Use this area light to guide sampling of the background, "
++            "note that this will make the light invisible",
+             default=False,
+         )
  
      @classmethod
      def unregister(cls):
@@@ -1145,56 -1149,56 +1145,56 @@@ class CyclesCurveRenderSettings(bpy.typ
      @classmethod
      def register(cls):
          bpy.types.Scene.cycles_curves = PointerProperty(
-                 name="Cycles Hair Rendering Settings",
-                 description="Cycles hair rendering settings",
-                 type=cls,
-                 )
+             name="Cycles Hair Rendering Settings",
+             description="Cycles hair rendering settings",
+             type=cls,
+         )
          cls.primitive = EnumProperty(
-                 name="Primitive",
-                 description="Type of primitive used for hair rendering",
-                 items=enum_curve_primitives,
-                 default='LINE_SEGMENTS',
-                 )
+             name="Primitive",
+             description="Type of primitive used for hair rendering",
+             items=enum_curve_primitives,
+             default='LINE_SEGMENTS',
+         )
          cls.shape = EnumProperty(
-                 name="Shape",
-                 description="Form of hair",
-                 items=enum_curve_shape,
-                 default='THICK',
-                 )
+             name="Shape",
+             description="Form of hair",
+             items=enum_curve_shape,
+             default='THICK',
+         )
          cls.cull_backfacing = BoolProperty(
-                 name="Cull Back-faces",
-                 description="Do not test the back-face of each strand",
-                 default=True,
-                 )
 -            name="Cull back-faces",
++            name="Cull Back-faces",
+             description="Do not test the back-face of each strand",
+             default=True,
+         )
          cls.use_curves = BoolProperty(
-                 name="Use Cycles Hair Rendering",
-                 description="Activate Cycles hair rendering for particle system",
-                 default=True,
-                 )
+             name="Use Cycles Hair Rendering",
+             description="Activate Cycles hair rendering for particle system",
+             default=True,
+         )
          cls.resolution = IntProperty(
-                 name="Resolution",
-                 description="Resolution of generated mesh",
-                 min=3, max=64,
-                 default=3,
-                 )
+             name="Resolution",
+             description="Resolution of generated mesh",
+             min=3, max=64,
+             default=3,
+         )
          cls.minimum_width = FloatProperty(
-                 name="Minimal width",
-                 description="Minimal pixel width for strands (0 - deactivated)",
-                 min=0.0, max=100.0,
-                 default=0.0,
-                 )
+             name="Minimal width",
+             description="Minimal pixel width for strands (0 - deactivated)",
+             min=0.0, max=100.0,
+             default=0.0,
+         )
          cls.maximum_width = FloatProperty(
-                 name="Maximal width",
-                 description="Maximum extension that strand radius can be increased by",
-                 min=0.0, max=100.0,
-                 default=0.1,
-                 )
+             name="Maximal width",
+             description="Maximum extension that strand radius can be increased by",
+             min=0.0, max=100.0,
+             default=0.1,
+         )
          cls.subdivisions = IntProperty(
-                 name="Subdivisions",
-                 description="Number of subdivisions used in Cardinal curve intersection (power of 2)",
-                 min=0, max=24,
-                 default=4,
-                 )
+             name="Subdivisions",
+             description="Number of subdivisions used in Cardinal curve intersection (power of 2)",
+             min=0, max=24,
+             default=4,
+         )
  
      @classmethod
      def unregister(cls):
@@@ -1211,128 -1215,128 +1211,128 @@@ def update_render_passes(self, context)
  class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
      @classmethod
      def register(cls):
 -        bpy.types.SceneRenderLayer.cycles = PointerProperty(
 -            name="Cycles SceneRenderLayer Settings",
 -            description="Cycles SceneRenderLayer Settings",
 +        bpy.types.ViewLayer.cycles = PointerProperty(
-                 name="Cycles ViewLayer Settings",
-                 description="Cycles ViewLayer Settings",
-                 type=cls,
-                 )
++            name="Cycles ViewLayer Settings",
++            description="Cycles ViewLayer Settings",
+             type=cls,
+         )
          cls.pass_debug_bvh_traversed_nodes = BoolProperty(
-                 name="Debug BVH Traversed Nodes",
-                 description="Store Debug BVH Traversed Nodes pass",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Debug BVH Traversed Nodes",
+             description="Store Debug BVH Traversed Nodes pass",
+             default=False,
+             update=update_render_passes,
+         )
          cls.pass_debug_bvh_traversed_instances = BoolProperty(
-                 name="Debug BVH Traversed Instances",
-                 description="Store Debug BVH Traversed Instances pass",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Debug BVH Traversed Instances",
+             description="Store Debug BVH Traversed Instances pass",
+             default=False,
+             update=update_render_passes,
+         )
          cls.pass_debug_bvh_intersections = BoolProperty(
-                 name="Debug BVH Intersections",
-                 description="Store Debug BVH Intersections",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Debug BVH Intersections",
+             description="Store Debug BVH Intersections",
+             default=False,
+             update=update_render_passes,
+         )
          cls.pass_debug_ray_bounces = BoolProperty(
-                 name="Debug Ray Bounces",
-                 description="Store Debug Ray Bounces pass",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Debug Ray Bounces",
+             description="Store Debug Ray Bounces pass",
+             default=False,
+             update=update_render_passes,
+         )
          cls.pass_debug_render_time = BoolProperty(
-                 name="Debug Render Time",
-                 description="Render time in milliseconds per sample and pixel",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Debug Render Time",
+             description="Render time in milliseconds per sample and pixel",
+             default=False,
+             update=update_render_passes,
+         )
          cls.use_pass_volume_direct = BoolProperty(
-                 name="Volume Direct",
-                 description="Deliver direct volumetric scattering pass",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Volume Direct",
+             description="Deliver direct volumetric scattering pass",
+             default=False,
+             update=update_render_passes,
+         )
          cls.use_pass_volume_indirect = BoolProperty(
-                 name="Volume Indirect",
-                 description="Deliver indirect volumetric scattering pass",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Volume Indirect",
+             description="Deliver indirect volumetric scattering pass",
+             default=False,
+             update=update_render_passes,
+         )
  
          cls.use_denoising = BoolProperty(
-                 name="Use Denoising",
-                 description="Denoise the rendered image",
-                 default=False,
-                 update=update_render_passes,
-                 )
+             name="Use Denoising",
+             description="Denoise the rendered image",
+             default=False,
+             update=update_render_passes,
+         )
          cls.denoising_diffuse_direct = BoolProperty(
-                 name="Diffuse Direct",
-                 description="Denoise the direct diffuse lighting",
-                 default=True,
-                 )
+             name="Diffuse Direct",
+             description="Denoise the direct diffuse lighting",
+             default=True,
+         )
          cls.denoising_diffuse_indirect = BoolProperty(
-                 name="Diffuse Indirect",
-                 description="Denoise the indirect diffuse lighting",
-                 default=True,
-                 )
+             name="Diffuse Indirect",
+             description="Denoise the indirect diffuse lighting",
+             default=True,
+         )
          cls.denoising_glossy_direct = BoolProperty(
-                 name="Glossy Direct",
-                 description="Denoise the direct glossy lighting",
-                 default=True,
-                 )
+             name="Glossy Direct",
+             description="Denoise the direct glossy lighting",
+             default=True,
+         )
          cls.denoising_glossy_indirect = BoolProperty(
-                 name="Glossy Indirect",
-                 description="Denoise the indirect glossy lighting",
-                 default=True,
-                 )
+             name="Glossy Indirect",
+             description="Denoise the indirect glossy lighting",
+             default=True,
+         )
          cls.denoising_transmission_direct = BoolProperty(
-                 name="Transmission Direct",
-                 description="Denoise the direct transmission lighting",
-                 default=True,
-                 )
+             name="Transmission Direct",
+             description="Denoise the direct transmission lighting",
+             default=True,
+         )
          cls.denoising_transmission_indirect = BoolProperty(
-                 name="Transmission Indirect",
-                 description="Denoise the indirect transmission lighting",
-                 default=True,
-                 )
+             name="Transmission Indirect",
+             description="Denoise the indirect transmission lighting",
+             default=True,
+         )
          cls.denoising_subsurface_direct = BoolProperty(
-                 name="Subsurface Direct",
-                 description="Denoise the direct subsurface lighting",
-                 default=True,
-                 )
+             name="Subsurface Direct",
+             description="Denoise the direct subsurface lighting",
+             default=True,
+         )
          cls.denoising_subsurface_indirect = BoolProperty(
-                 name="Subsurface Indirect",
-                 description="Denoise the indirect subsurface lighting",
-                 default=True,
-                 )
+             name="Subsurface Indirect",
+             description="Denoise the indirect subsurface lighting",
+             default=True,
+         )
          cls.denoising_strength = FloatProperty(
-                 name="Denoising Strength",
-                 description="Controls neighbor pixel weighting for the denoising filter (lower values preserve more detail, but aren't as smooth)",
-                 min=0.0, max=1.0,
-                 default=0.5,
-                 )
+             name="Denoising Strength",
+             description="Controls neighbor pixel weighting for the denoising filter (lower values preserve more detail, but aren't as smooth)",
+             min=0.0, max=1.0,
+             default=0.5,
+         )
          cls.denoising_feature_strength = FloatProperty(
-                 name="Denoising Feature Strength",
-                 description="Controls removal of noisy image feature passes (lower values preserve more detail, but aren't as smooth)",
-                 min=0.0, max=1.0,
-                 default=0.5,
-                 )
+             name="Denoising Feature Strength",
+             description="Controls removal of noisy image feature passes (lower values preserve more detail, but aren't as smooth)",
+             min=0.0, max=1.0,
+             default=0.5,
+         )
          cls.denoising_radius = IntProperty(
-                 name="Denoising Radius",
-                 description="Size of the image area that's used to denoise a pixel (higher values are smoother, but might lose detail and are slower)",
-                 min=1, max=25,
-                 default=8,
+             name="Denoising Radius",
+             description="Size of the image area that's used to denoise a pixel (higher values are smoother, but might lose detail and are slower)",
+             min=1, max=25,
+             default=8,
          )
          cls.denoising_relative_pca = BoolProperty(
-                 name="Relative filter",
-                 description="When removing pixels that don't carry information, use a relative threshold instead of an absolute one (can help to reduce artifacts, but might cause detail loss around edges)",
-                 default=False,
+             name="Relative filter",
+             description="When removing pixels that don't carry information, use a relative threshold instead of an absolute one (can help to reduce artifacts, but might cause detail loss around edges)",
+             default=False,
          )
          cls.denoising_store_passes = BoolProperty(
-                 name="Store denoising passes",
-                 description="Store the denoising feature passes and the noisy image",
-                 default=False,
-                 update=update_render_passes,
+             name="Store denoising passes",
+             description="Store the denoising feature passes and the noisy image",
+             default=False,
+             update=update_render_passes,
          )
  
      @classmethod
index 03ce3835365b5602fca5dd44c5d7b20c2c6c64ac,5edbcb1967276f44f5e6a99c16caf9e478ca8eba..6e56e42f9b24f385e0aa2fe364de8283b4f2679e
@@@ -1168,8 -1034,8 +1168,8 @@@ class CYCLES_LIGHT_PT_nodes(CyclesButto
  
      @classmethod
      def poll(cls, context):
 -        return context.lamp and not (context.lamp.type == 'AREA' and
 -                                     context.lamp.cycles.is_portal) and \
 +        return context.light and not (context.light.type == 'AREA' and
-                                      context.light.cycles.is_portal) and \
++                                      context.light.cycles.is_portal) and \
              CyclesButtonsPanel.poll(context)
  
      def draw(self, context):
@@@ -1342,28 -1210,14 +1342,29 @@@ class CYCLES_WORLD_PT_settings(CyclesBu
          cworld = world.cycles
          # cscene = context.scene.cycles
  
 -        split = layout.split()
 +        col = layout.column()
  
 -        col = split.column()
 -        col.label(text="Surface:")
 +class CYCLES_WORLD_PT_settings_surface(CyclesButtonsPanel, Panel):
 +    bl_label = "Surface"
 +    bl_parent_id = "CYCLES_WORLD_PT_settings"
 +    bl_context = "world"
 +
 +    @classmethod
 +    def poll(cls, context):
 +        return context.world and CyclesButtonsPanel.poll(context)
 +
 +    def draw(self, context):
 +        layout = self.layout
 +        layout.use_property_split = True
 +
 +        world = context.world
 +        cworld = world.cycles
 +
 +        col = layout.column()
          col.prop(cworld, "sampling_method", text="Sampling")
  
 -        sub = col.column(align=True)
 +        sub = col.column()
          sub.active = cworld.sampling_method != 'NONE'
          subsub = sub.row(align=True)
          subsub.active = cworld.sampling_method == 'MANUAL'
@@@ -1515,21 -1509,25 +1516,19 @@@ class CYCLES_MATERIAL_PT_settings_volum
  
      def draw(self, context):
          layout = self.layout
 +        layout.use_property_split = True
  
 -        psys = context.particle_system
 -        part = psys.settings
 -
 -        row = layout.row()
 -        row.template_list("TEXTURE_UL_texslots", "", part, "texture_slots", part, "active_texture_index", rows=2)
 -
 -        col = row.column(align=True)
 -        col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
 -        col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
 -        col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
 +        mat = context.material
 +        cmat = mat.cycles
  
 -        if not part.active_texture:
 -            layout.template_ID(part, "active_texture", new="texture.new")
 -        else:
 -            slot = part.texture_slots[part.active_texture_index]
 -            layout.template_ID(slot, "texture", new="texture.new")
 +        col = layout.column()
 +        sub = col.column()
 +        sub.active = use_cpu(context)
 +        sub.prop(cmat, "volume_sampling", text="Sampling")
 +        col.prop(cmat, "volume_interpolation", text="Interpolation")
 +        col.prop(cmat, "homogeneous_volume", text="Homogeneous")
  
  
  class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
      bl_label = "Bake"
      bl_context = "render"
index 679c3e6a4372bde488802fd69821628f5a9cd049,f14fe9abc3d9e11c6883693f0273964c7fdeb691..0564f2a745632642d27164906b46a47df00c1243
@@@ -35,20 -74,26 +35,26 @@@ def foreach_notree_node(nodetree, callb
  def foreach_cycles_node(callback):
      traversed = set()
      for material in bpy.data.materials:
 -        if check_is_new_shading_material(material):
 +        if material.node_tree:
-             foreach_notree_node(material.node_tree,
-                                 callback,
-                                 traversed)
+             foreach_notree_node(
+                 material.node_tree,
+                 callback,
+                 traversed,
+             )
      for world in bpy.data.worlds:
 -        if check_is_new_shading_world(world):
 +        if world.node_tree:
-             foreach_notree_node(world.node_tree,
-                                 callback,
-                                 traversed)
+             foreach_notree_node(
+                 world.node_tree,
+                 callback,
+                 traversed,
+             )
 -    for lamp in bpy.data.lamps:
 -        if check_is_new_shading_world(lamp):
 +    for light in bpy.data.lights:
 +        if light.node_tree:
-             foreach_notree_node(light.node_tree,
-                                 callback,
-                                 traversed)
+             foreach_notree_node(
 -                lamp.node_tree,
++                light.node_tree,
+                 callback,
+                 traversed,
+             )
  
  
  def displacement_node_insert(material, nodetree, traversed):
      # Gather links to replace
      displacement_links = []
      for link in nodetree.links:
-         if link.to_node.bl_idname == 'ShaderNodeOutputMaterial' and \
-            link.from_node.bl_idname != 'ShaderNodeDisplacement' and \
-            link.to_socket.identifier == 'Displacement':
-            displacement_links.append(link)
+         if (
 -           link.to_node.bl_idname == 'ShaderNodeOutputMaterial' and
 -           link.from_node.bl_idname != 'ShaderNodeDisplacement' and
 -           link.to_socket.identifier == 'Displacement'
 -           ):
++                link.to_node.bl_idname == 'ShaderNodeOutputMaterial' and
++                link.from_node.bl_idname != 'ShaderNodeDisplacement' and
++                link.to_socket.identifier == 'Displacement'
++        ):
+             displacement_links.append(link)
  
      # Replace links with displacement node
      for link in displacement_links:
  def displacement_nodes_insert():
      traversed = set()
      for material in bpy.data.materials:
 -        if check_is_new_shading_material(material):
 +        if material.node_tree:
              displacement_node_insert(material, material.node_tree, traversed)
  
  def displacement_principled_nodes(node):
      if node.bl_idname == 'ShaderNodeDisplacement':
          if node.space != 'WORLD':
@@@ -296,9 -348,11 +309,9 @@@ def do_versions(self)
          for scene in bpy.data.scenes:
              cscene = scene.cycles
              sample_clamp = cscene.get("sample_clamp", False)
 -            if (
 -                sample_clamp and
 +            if (sample_clamp and
                  not cscene.is_property_set("sample_clamp_direct") and
-                 not cscene.is_property_set("sample_clamp_indirect")):
 -                    not cscene.is_property_set("sample_clamp_indirect")
 -            ):
++                    not cscene.is_property_set("sample_clamp_indirect")):
  
                  cscene.sample_clamp_direct = sample_clamp
                  cscene.sample_clamp_indirect = sample_clamp
      if bpy.data.version <= (2, 72, 0):
          for scene in bpy.data.scenes:
              cscene = scene.cycles
 -            if (
 -                cscene.get("no_caustics", False) and
 +            if (cscene.get("no_caustics", False) and
                  not cscene.is_property_set("caustics_reflective") and
-                 not cscene.is_property_set("caustics_refractive")):
 -                not cscene.is_property_set("caustics_refractive")
 -            ):
++                    not cscene.is_property_set("caustics_refractive")):
 +
                  cscene.caustics_reflective = False
                  cscene.caustics_refractive = False