Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/properties.py
| Show All 25 Lines | from bpy.props import ( | ||||
| StringProperty, | StringProperty, | ||||
| ) | ) | ||||
| from math import pi | from math import pi | ||||
| # enums | # enums | ||||
| import _cycles | import _cycles | ||||
| import math | |||||
| enum_devices = ( | enum_devices = ( | ||||
| ('CPU', "CPU", "Use CPU for rendering"), | ('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"), | ||||
| ) | ) | ||||
| if _cycles.with_network: | if _cycles.with_network: | ||||
| enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),) | enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),) | ||||
| ▲ Show 20 Lines • Show All 845 Lines • ▼ Show 20 Lines | class CyclesMaterialSettings(bpy.types.PropertyGroup): | ||||
| displacement_method: EnumProperty( | displacement_method: EnumProperty( | ||||
| name="Displacement Method", | name="Displacement Method", | ||||
| description="Method to use for the displacement", | description="Method to use for the displacement", | ||||
| items=enum_displacement_methods, | items=enum_displacement_methods, | ||||
| default='DISPLACEMENT', | default='DISPLACEMENT', | ||||
| ) | ) | ||||
| @classmethod | @classmethod | ||||
| def register(cls): | def register(cls): | ||||
| bpy.types.Material.cycles = PointerProperty( | bpy.types.Material.cycles = PointerProperty( | ||||
| name="Cycles Material Settings", | name="Cycles Material Settings", | ||||
| description="Cycles material settings", | description="Cycles material settings", | ||||
| type=cls, | type=cls, | ||||
| ) | ) | ||||
| Show All 28 Lines | use_multiple_importance_sampling: BoolProperty( | ||||
| default=True, | default=True, | ||||
| ) | ) | ||||
| is_portal: BoolProperty( | is_portal: BoolProperty( | ||||
| name="Is Portal", | name="Is Portal", | ||||
| description="Use this area light to guide sampling of the background, " | description="Use this area light to guide sampling of the background, " | ||||
| "note that this will make the light invisible", | "note that this will make the light invisible", | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| sun_angle = FloatProperty( | |||||
| name="Angle", | |||||
| description="Angular diameter of the Sun as seen from the Earth", | |||||
| min=0.0, max=90.0, | |||||
| subtype='ANGLE', | |||||
| precision=3, | |||||
| default=math.radians(0.526), | |||||
| ) | |||||
| @classmethod | @classmethod | ||||
| def register(cls): | def register(cls): | ||||
| bpy.types.Light.cycles = PointerProperty( | bpy.types.Light.cycles = PointerProperty( | ||||
| name="Cycles Light Settings", | name="Cycles Light Settings", | ||||
| description="Cycles light settings", | description="Cycles light settings", | ||||
| type=cls, | type=cls, | ||||
| ) | ) | ||||
| ▲ Show 20 Lines • Show All 592 Lines • Show Last 20 Lines | |||||