diff options
Diffstat (limited to 'intern/cycles/blender/addon/properties.py')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 66 |
1 files changed, 50 insertions, 16 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 0b8ca6e0fbe..26fc7a81936 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -25,10 +25,44 @@ from bpy.props import (BoolProperty, IntProperty, PointerProperty) -import math - -from . import enums - +# enums + +enum_devices = ( + ('CPU', "CPU", "Use CPU for rendering"), + ('GPU', "GPU Compute", "Use GPU compute device for rendering, configured in 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"), + ) + +enum_displacement_methods = ( + ('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"), + ('TRUE', "True", "Use true displacement only, requires fine subdivision"), + ('BOTH', "Both", "Combination of displacement and bump mapping"), + ) + +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"), + ) + +enum_aperture_types = ( + ('RADIUS', "Radius", "Directly change the size of the aperture"), + ('FSTOP', "F/stop", "Change the size of the aperture by f/stops"), + ) + +enum_panorama_types = ( + ('EQUIRECTANGULAR', "Equirectangular", "Render the scene with a spherical camera, also known as Lat Long panorama"), + ('FISHEYE_EQUIDISTANT', "Fisheye Equidistant", "Ideal for fulldomes, ignore the sensor dimensions"), + ('FISHEYE_EQUISOLID', "Fisheye Equisolid", + "Similar to most fisheye modern lens, takes sensor dimensions into consideration"), + ) class CyclesRenderSettings(bpy.types.PropertyGroup): @classmethod @@ -41,20 +75,18 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): cls.device = EnumProperty( name="Device", description="Device to use for rendering", - items=enums.devices, + items=enum_devices, default='CPU', ) cls.feature_set = EnumProperty( name="Feature Set", description="Feature set to use for rendering", - items=enums.feature_set, + items=enum_feature_set, default='SUPPORTED', ) - cls.shading_system = EnumProperty( - name="Shading System", - description="Shading system to use for rendering", - items=enums.shading_systems, - default='GPU_COMPATIBLE', + cls.shading_system = BoolProperty( + name="Open Shading Language", + description="Use Open Shading Language (CPU rendering only)", ) cls.progressive = BoolProperty( @@ -212,7 +244,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): cls.filter_type = EnumProperty( name="Filter Type", description="Pixel filter type", - items=enums.filter_types, + items=enum_filter_types, default='GAUSSIAN', ) cls.filter_width = FloatProperty( @@ -275,7 +307,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): cls.debug_bvh_type = EnumProperty( name="Viewport BVH Type", description="Choose between faster updates, or faster render", - items=enums.bvh_types, + items=enum_bvh_types, default='DYNAMIC_BVH', ) cls.debug_use_spatial_splits = BoolProperty( @@ -305,6 +337,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): class CyclesCameraSettings(bpy.types.PropertyGroup): @classmethod def register(cls): + import math + bpy.types.Camera.cycles = PointerProperty( name="Cycles Camera Settings", description="Cycles camera settings", @@ -314,7 +348,7 @@ class CyclesCameraSettings(bpy.types.PropertyGroup): cls.aperture_type = EnumProperty( name="Aperture Type", description="Use F/stop number or aperture radius", - items=enums.aperture_types, + items=enum_aperture_types, default='RADIUS', ) cls.aperture_fstop = FloatProperty( @@ -349,7 +383,7 @@ class CyclesCameraSettings(bpy.types.PropertyGroup): cls.panorama_type = EnumProperty( name="Panorama Type", description="Distortion to use for the calculation", - items=enums.panorama_types, + items=enum_panorama_types, default='FISHEYE_EQUISOLID', ) cls.fisheye_fov = FloatProperty( @@ -518,7 +552,7 @@ class CyclesMeshSettings(bpy.types.PropertyGroup): cls.displacement_method = EnumProperty( name="Displacement Method", description="Method to use for the displacement", - items=enums.displacement_methods, + items=enum_displacement_methods, default='BUMP', ) cls.use_subdivision = BoolProperty( |