Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-11 23:18:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-11 23:18:09 +0300
commit09aa799e5331a9da666f8a6325b038a866b1f35d (patch)
treeccff0086f70ea7929554a7e4c90bd1182f125ba6 /intern
parente3c85aaca74fc7bd2a9da43a0396a886363bc93d (diff)
PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information. - Avoids using ordered-dict metaclass. Properties using regular assignments will print a warning and load, however the order is undefined.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/properties.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 85947b4bd28..51e887d08ca 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -17,12 +17,14 @@
# <pep8 compliant>
import bpy
-from bpy.props import (BoolProperty,
- EnumProperty,
- FloatProperty,
- IntProperty,
- PointerProperty,
- StringProperty)
+from bpy.props import (
+ BoolProperty,
+ EnumProperty,
+ FloatProperty,
+ IntProperty,
+ PointerProperty,
+ StringProperty,
+)
# enums
@@ -1198,12 +1200,14 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
def unregister(cls):
del bpy.types.Scene.cycles_curves
+
def update_render_passes(self, context):
scene = context.scene
rd = scene.render
view_layer = context.view_layer
view_layer.update_render_passes()
+
class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
@classmethod
def register(cls):
@@ -1358,13 +1362,13 @@ class CyclesPreferences(bpy.types.AddonPreferences):
list.append(('OPENCL', "OpenCL", "Use OpenCL for GPU acceleration", 2))
return list
- compute_device_type = EnumProperty(
- name="Compute Device Type",
- description="Device to use for computation (rendering with Cycles)",
- items=get_device_types,
- )
+ compute_device_type: EnumProperty(
+ name="Compute Device Type",
+ description="Device to use for computation (rendering with Cycles)",
+ items=get_device_types,
+ )
- devices = bpy.props.CollectionProperty(type=CyclesDeviceSettings)
+ devices: bpy.props.CollectionProperty(type=CyclesDeviceSettings)
def find_existing_device_entry(self, device):
for device_entry in self.devices: