2011-04-27 11:58:34 +00:00
#
2013-08-18 14:16:15 +00:00
# Copyright 2011-2013 Blender Foundation
2011-04-27 11:58:34 +00:00
#
2013-08-18 14:16:15 +00:00
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
2011-04-27 11:58:34 +00:00
#
2013-08-18 14:16:15 +00:00
# http://www.apache.org/licenses/LICENSE-2.0
2011-04-27 11:58:34 +00:00
#
2013-08-18 14:16:15 +00:00
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
2011-04-27 11:58:34 +00:00
#
2011-11-15 02:58:01 +00:00
# <pep8 compliant>
2011-04-27 11:58:34 +00:00
import bpy
2011-11-24 21:14:48 +00:00
from bpy . props import ( BoolProperty ,
EnumProperty ,
2011-11-24 19:36:12 +00:00
FloatProperty ,
IntProperty ,
PointerProperty )
2011-04-27 11:58:34 +00:00
2012-12-13 08:45:55 +00:00
# enums
2013-12-07 02:29:53 +01:00
import _cycles
2012-12-13 08:45:55 +00:00
enum_devices = (
2013-12-30 12:06:36 +11:00
( ' CPU ' , " CPU " , " Use CPU for rendering " ) ,
( ' GPU ' , " GPU Compute " , " Use GPU compute device for rendering, configured in user preferences " ) ,
)
2013-12-07 02:29:53 +01:00
if _cycles . with_network :
2014-02-13 08:51:33 +11:00
enum_devices + = ( ( ' NETWORK ' , " Networked Device " , " Use networked device for rendering " ) , )
2012-12-13 08:45:55 +00:00
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 " ) ,
)
2012-12-30 23:21:33 +00:00
2012-12-28 14:21:30 +00:00
enum_curve_primitives = (
2012-12-30 23:21:33 +00:00
( ' TRIANGLES ' , " Triangles " , " Create triangle geometry around strands " ) ,
( ' LINE_SEGMENTS ' , " Line Segments " , " Use line segment primitives " ) ,
2013-01-15 19:44:41 +00:00
( ' CURVE_SEGMENTS ' , " Curve Segments " , " Use segmented cardinal curve primitives " ) ,
2012-12-28 14:21:30 +00:00
)
2012-12-30 23:21:33 +00:00
2012-12-28 14:21:30 +00:00
enum_triangle_curves = (
2013-01-15 19:44:41 +00:00
( ' CAMERA_TRIANGLES ' , " Planes " , " Create individual triangles forming planes that face camera " ) ,
( ' TESSELLATED_TRIANGLES ' , " Tessellated " , " Create mesh surrounding each strand " ) ,
2012-12-28 14:21:30 +00:00
)
2012-12-30 23:21:33 +00:00
2013-08-18 13:41:53 +00:00
enum_curve_shape = (
( ' RIBBONS ' , " Ribbons " , " Ignore thickness of each strand " ) ,
( ' THICK ' , " Thick " , " Use thickness of strand when rendering " ) ,
2012-12-28 14:21:30 +00:00
)
2013-01-15 23:17:45 +00:00
2013-01-07 19:55:49 +00:00
enum_tile_order = (
( ' CENTER ' , " Center " , " Render from center to the edges " ) ,
( ' RIGHT_TO_LEFT ' , " Right to Left " , " Render from right to left " ) ,
( ' LEFT_TO_RIGHT ' , " Left to Right " , " Render from left to right " ) ,
( ' TOP_TO_BOTTOM ' , " Top to Bottom " , " Render from top to bottom " ) ,
( ' BOTTOM_TO_TOP ' , " Bottom to Top " , " Render from bottom to top " ) ,
)
2011-11-15 02:58:01 +00:00
2013-04-16 16:18:14 +00:00
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 " ) ,
)
2013-06-07 16:06:22 +00:00
enum_sampling_pattern = (
( ' SOBOL ' , " Sobol " , " Use Sobol random sampling pattern " ) ,
( ' CORRELATED_MUTI_JITTER ' , " Correlated Multi-Jitter " , " Use Correlated Multi-Jitter random sampling pattern " ) ,
)
2013-08-23 14:08:40 +00:00
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 " ) ,
)
2014-02-19 08:02:59 +11:00
2014-02-05 16:33:51 +01:00
enum_volume_homogeneous_sampling = (
( ' DISTANCE ' , " Distance " , " Use Distance Sampling " ) ,
( ' EQUI_ANGULAR ' , " Equi-angular " , " Use Equi-angular Sampling " ) ,
2014-04-04 16:45:49 +02:00
( ' MULTIPLE_IMPORTANCE ' , " Multiple Importance " , " Combine distance and equi-angular sampling " ) ,
2014-02-05 16:33:51 +01:00
)
2013-08-23 14:08:40 +00:00
2013-01-15 23:17:45 +00:00
2011-04-27 11:58:34 +00:00
class CyclesRenderSettings ( bpy . types . PropertyGroup ) :
2011-08-28 13:55:59 +00:00
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . Scene . cycles = PointerProperty (
name = " Cycles Render Settings " ,
description = " Cycles render settings " ,
type = cls ,
)
cls . device = EnumProperty (
name = " Device " ,
description = " Device to use for rendering " ,
2012-12-13 08:45:55 +00:00
items = enum_devices ,
2012-01-20 18:31:23 +00:00
default = ' CPU ' ,
)
cls . feature_set = EnumProperty (
name = " Feature Set " ,
description = " Feature set to use for rendering " ,
2012-12-13 08:45:55 +00:00
items = enum_feature_set ,
2012-01-20 18:31:23 +00:00
default = ' SUPPORTED ' ,
)
2012-12-14 15:26:49 +00:00
cls . shading_system = BoolProperty (
name = " Open Shading Language " ,
description = " Use Open Shading Language (CPU rendering only) " ,
2012-01-20 18:31:23 +00:00
)
2013-08-23 14:34:34 +00:00
cls . progressive = EnumProperty (
2013-08-23 14:08:40 +00:00
name = " Integrator " ,
description = " Method to sample lights and materials " ,
items = enum_integrator ,
default = ' PATH ' ,
2012-06-13 11:44:48 +00:00
)
2014-02-19 08:02:59 +11:00
2014-02-05 16:33:51 +01:00
cls . volume_homogeneous_sampling = EnumProperty (
name = " Homogeneous Sampling " ,
description = " Sampling method to use for homogeneous volumes " ,
items = enum_volume_homogeneous_sampling ,
default = ' DISTANCE ' ,
)
2013-08-23 14:08:40 +00:00
2013-08-22 19:57:56 +00:00
cls . use_square_samples = BoolProperty (
name = " Square Samples " ,
2013-07-19 22:51:48 +00:00
description = " Square sampling values for easier artist control " ,
default = False ,
)
2012-06-13 11:44:48 +00:00
2012-01-20 18:31:23 +00:00
cls . samples = IntProperty (
name = " Samples " ,
description = " Number of samples to render for each pixel " ,
min = 1 , max = 2147483647 ,
default = 10 ,
)
cls . preview_samples = IntProperty (
name = " Preview Samples " ,
description = " Number of samples to render in the viewport, unlimited if 0 " ,
min = 0 , max = 2147483647 ,
default = 10 ,
)
cls . preview_pause = BoolProperty (
name = " Pause Preview " ,
description = " Pause all viewport preview renders " ,
default = False ,
2012-03-28 09:07:35 +00:00
)
cls . preview_active_layer = BoolProperty (
name = " Preview Active Layer " ,
description = " Preview active render layer in viewport " ,
default = False ,
2012-01-20 18:31:23 +00:00
)
2012-06-13 11:44:48 +00:00
cls . aa_samples = IntProperty (
name = " AA Samples " ,
description = " Number of antialiasing samples to render for each pixel " ,
min = 1 , max = 10000 ,
default = 4 ,
)
cls . preview_aa_samples = IntProperty (
name = " AA Samples " ,
2012-06-13 14:18:42 +00:00
description = " Number of antialiasing samples to render in the viewport, unlimited if 0 " ,
2012-06-13 16:15:42 +00:00
min = 0 , max = 10000 ,
2012-06-13 11:44:48 +00:00
default = 4 ,
)
cls . diffuse_samples = IntProperty (
name = " Diffuse Samples " ,
description = " Number of diffuse bounce samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 1 ,
)
cls . glossy_samples = IntProperty (
name = " Glossy Samples " ,
description = " Number of glossy bounce samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 1 ,
)
cls . transmission_samples = IntProperty (
name = " Transmission Samples " ,
description = " Number of transmission bounce samples to render for each AA sample " ,
min = 1 , max = 10000 ,
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 = 10000 ,
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 = 10000 ,
default = 1 ,
)
2013-04-01 20:26:52 +00:00
cls . subsurface_samples = IntProperty (
name = " Subsurface Samples " ,
description = " Number of subsurface scattering samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 1 ,
)
2013-12-29 15:40:43 +01:00
cls . volume_samples = IntProperty (
name = " Volume Samples " ,
description = " Number of volume scattering samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 1 ,
)
2013-06-07 16:06:22 +00:00
cls . sampling_pattern = EnumProperty (
name = " Sampling Pattern " ,
description = " Random sampling pattern used by the integrator " ,
items = enum_sampling_pattern ,
default = ' SOBOL ' ,
)
2013-04-16 16:18:14 +00:00
cls . use_layer_samples = EnumProperty (
name = " Layer Samples " ,
description = " How to use per render layer sample settings " ,
items = enum_use_layer_samples ,
default = ' USE ' ,
)
2014-03-15 17:36:44 +01:00
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 ,
)
2014-03-09 22:19:27 +01:00
cls . sample_all_lights_indirect = BoolProperty (
2014-03-15 17:36:44 +01:00
name = " Sample All Indirect Lights " ,
2014-03-09 22:19:27 +01:00
description = " Sample all lights (for indirect samples), rather than randomly picking one " ,
2014-03-15 17:36:44 +01:00
default = True ,
2014-03-09 22:19:27 +01:00
)
2013-04-16 16:18:14 +00:00
2012-01-20 18:31:23 +00:00
cls . no_caustics = BoolProperty (
name = " No Caustics " ,
description = " Leave out caustics, resulting in a darker image with less noise " ,
default = False ,
)
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
cls . blur_glossy = FloatProperty (
name = " Filter Glossy " ,
2012-10-16 03:21:22 +00:00
description = " Adaptively blur glossy shaders after blurry bounces, "
" to reduce noise at the cost of accuracy " ,
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
min = 0.0 , max = 10.0 ,
2012-01-20 18:31:23 +00:00
default = 0.0 ,
)
cls . min_bounces = IntProperty (
name = " Min Bounces " ,
2012-07-04 15:04:38 +00:00
description = " Minimum number of bounces, setting this lower "
" than the maximum enables probabilistic path "
" termination (faster but noisier) " ,
2012-01-20 18:31:23 +00:00
min = 0 , max = 1024 ,
default = 3 ,
)
cls . max_bounces = IntProperty (
name = " Max Bounces " ,
description = " Total maximum number of bounces " ,
min = 0 , max = 1024 ,
2013-11-01 09:37:42 +00:00
default = 12 ,
2012-01-20 18:31:23 +00:00
)
cls . diffuse_bounces = IntProperty (
name = " Diffuse Bounces " ,
description = " Maximum number of diffuse reflection bounces, bounded by total maximum " ,
min = 0 , max = 1024 ,
2013-11-01 09:37:42 +00:00
default = 4 ,
2012-01-20 18:31:23 +00:00
)
cls . glossy_bounces = IntProperty (
name = " Glossy Bounces " ,
description = " Maximum number of glossy reflection bounces, bounded by total maximum " ,
min = 0 , max = 1024 ,
2013-11-01 09:37:42 +00:00
default = 4 ,
2012-01-20 18:31:23 +00:00
)
cls . transmission_bounces = IntProperty (
name = " Transmission Bounces " ,
description = " Maximum number of transmission bounces, bounded by total maximum " ,
min = 0 , max = 1024 ,
2013-11-01 09:37:42 +00:00
default = 12 ,
2012-01-20 18:31:23 +00:00
)
2013-12-29 15:40:43 +01:00
cls . volume_bounces = IntProperty (
name = " Volume Bounces " ,
description = " Maximum number of volumetric scattering events " ,
min = 0 , max = 1024 ,
default = 1 ,
)
2012-01-20 18:31:23 +00:00
cls . transparent_min_bounces = IntProperty (
name = " Transparent Min Bounces " ,
2012-07-04 15:04:38 +00:00
description = " Minimum number of transparent bounces, setting "
" this lower than the maximum enables "
" probabilistic path termination (faster but "
" noisier) " ,
2012-01-20 18:31:23 +00:00
min = 0 , max = 1024 ,
default = 8 ,
)
cls . transparent_max_bounces = IntProperty (
name = " Transparent Max Bounces " ,
description = " Maximum number of transparent bounces " ,
min = 0 , max = 1024 ,
default = 8 ,
)
cls . use_transparent_shadows = BoolProperty (
name = " Transparent Shadows " ,
description = " Use transparency of surfaces for rendering shadows " ,
default = True ,
)
2013-12-29 22:19:38 +01:00
cls . volume_step_size = FloatProperty (
name = " Step Size " ,
2014-01-15 10:40:28 +01:00
description = " Distance between volume shader samples when rendering the volume "
" (lower values give more accurate and detailed results, but also increased render time) " ,
2013-12-29 22:19:38 +01:00
default = 0.1 ,
min = 0.0000001 , max = 100000.0
)
cls . volume_max_steps = IntProperty (
name = " Max Steps " ,
2013-12-30 12:06:36 +11:00
description = " Maximum number of steps through the volume before giving up, "
2014-01-15 10:40:28 +01:00
" to avoid extremely long render times with big objects or small step sizes " ,
2013-12-29 22:19:38 +01:00
default = 1024 ,
min = 2 , max = 65536
)
2012-01-20 18:31:23 +00:00
cls . film_exposure = FloatProperty (
name = " Exposure " ,
description = " Image brightness scale " ,
min = 0.0 , max = 10.0 ,
default = 1.0 ,
)
cls . film_transparent = BoolProperty (
name = " Transparent " ,
2012-12-31 13:52:13 +00:00
description = " World background is transparent with premultiplied alpha " ,
2012-01-20 18:31:23 +00:00
default = False ,
)
cls . filter_type = EnumProperty (
name = " Filter Type " ,
description = " Pixel filter type " ,
2012-12-13 08:45:55 +00:00
items = enum_filter_types ,
2012-01-20 18:31:23 +00:00
default = ' GAUSSIAN ' ,
)
cls . filter_width = FloatProperty (
name = " Filter Width " ,
description = " Pixel filter width " ,
min = 0.01 , max = 10.0 ,
default = 1.5 ,
)
cls . seed = IntProperty (
name = " Seed " ,
description = " Seed value for integrator to get different noise patterns " ,
min = 0 , max = 2147483647 ,
default = 0 ,
)
2014-02-10 21:44:49 +01:00
cls . sample_clamp_direct = FloatProperty (
name = " Clamp Direct " ,
description = " If non-zero, the maximum value for a direct sample, "
" higher values will be scaled down to avoid too "
" much noise and slow convergence at the cost of accuracy " ,
min = 0.0 , max = 1e8 ,
default = 0.0 ,
)
2014-02-13 08:51:33 +11:00
2014-02-10 21:44:49 +01:00
cls . sample_clamp_indirect = FloatProperty (
name = " Clamp Indirect " ,
description = " If non-zero, the maximum value for an indirect sample, "
2012-10-16 03:21:22 +00:00
" higher values will be scaled down to avoid too "
" much noise and slow convergence at the cost of accuracy " ,
2012-04-05 15:17:45 +00:00
min = 0.0 , max = 1e8 ,
default = 0.0 ,
)
2012-01-20 18:31:23 +00:00
cls . debug_tile_size = IntProperty (
name = " Tile Size " ,
description = " " ,
min = 1 , max = 4096 ,
default = 1024 ,
)
2012-09-04 13:29:07 +00:00
2012-09-17 10:55:18 +00:00
cls . preview_start_resolution = IntProperty (
name = " Start Resolution " ,
2012-10-16 03:21:22 +00:00
description = " Resolution to start rendering preview at, "
" progressively increasing it to the full viewport size " ,
2012-09-17 10:55:18 +00:00
min = 8 , max = 16384 ,
default = 64 ,
2012-01-20 18:31:23 +00:00
)
2012-09-04 13:29:07 +00:00
2012-01-20 18:31:23 +00:00
cls . debug_reset_timeout = FloatProperty (
name = " Reset timeout " ,
description = " " ,
min = 0.01 , max = 10.0 ,
default = 0.1 ,
)
cls . debug_cancel_timeout = FloatProperty (
name = " Cancel timeout " ,
description = " " ,
min = 0.01 , max = 10.0 ,
default = 0.1 ,
)
cls . debug_text_timeout = FloatProperty (
name = " Text timeout " ,
description = " " ,
min = 0.01 , max = 10.0 ,
default = 1.0 ,
)
cls . debug_bvh_type = EnumProperty (
name = " Viewport BVH Type " ,
description = " Choose between faster updates, or faster render " ,
2012-12-13 08:45:55 +00:00
items = enum_bvh_types ,
2012-01-20 18:31:23 +00:00
default = ' DYNAMIC_BVH ' ,
)
cls . debug_use_spatial_splits = BoolProperty (
name = " Use Spatial Splits " ,
description = " Use BVH spatial splits: longer builder time, faster render " ,
default = False ,
)
cls . use_cache = BoolProperty (
name = " Cache BVH " ,
description = " Cache last built BVH to disk for faster re-render if no geometry changed " ,
default = False ,
2012-10-13 12:38:32 +00:00
)
2013-01-07 19:55:49 +00:00
cls . tile_order = EnumProperty (
name = " Tile Order " ,
description = " Tile order for rendering " ,
items = enum_tile_order ,
default = ' CENTER ' ,
2013-08-19 13:30:17 +00:00
options = set ( ) , # Not animatable!
2013-01-07 19:55:49 +00:00
)
2012-10-13 12:38:32 +00:00
cls . use_progressive_refine = BoolProperty (
name = " Progressive Refine " ,
2012-10-16 03:21:22 +00:00
description = " Instead of rendering each tile until it is finished, "
2012-10-21 14:02:30 +00:00
" refine the whole image progressively "
" (this renders somewhat slower, "
" but time can be saved by manually stopping the render when the noise is low enough) " ,
2012-10-13 12:38:32 +00:00
default = False ,
2012-01-20 18:31:23 +00:00
)
2011-08-28 13:55:59 +00:00
2014-01-02 19:05:07 -02:00
cls . bake_type = EnumProperty (
name = " Bake Type " ,
default = ' COMBINED ' ,
description = " Type of pass to bake " ,
items = (
( ' COMBINED ' , " Combined " , " " ) ,
( ' AO ' , " Ambient Occlusion " , " " ) ,
( ' SHADOW ' , " Shadow " , " " ) ,
( ' NORMAL ' , " Normal " , " " ) ,
( ' UV ' , " UV " , " " ) ,
( ' EMIT ' , " Emit " , " " ) ,
( ' ENVIRONMENT ' , " Environment " , " " ) ,
( ' DIFFUSE_DIRECT ' , " Diffuse Direct " , " " ) ,
( ' DIFFUSE_INDIRECT ' , " Diffuse Indirect " , " " ) ,
( ' DIFFUSE_COLOR ' , " Diffuse Color " , " " ) ,
( ' GLOSSY_DIRECT ' , " Glossy Direct " , " " ) ,
( ' GLOSSY_INDIRECT ' , " Glossy Indirect " , " " ) ,
( ' GLOSSY_COLOR ' , " Glossy Color " , " " ) ,
( ' TRANSMISSION_DIRECT ' , " Transmission Direct " , " " ) ,
( ' TRANSMISSION_INDIRECT ' , " Transmission Indirect " , " " ) ,
( ' TRANSMISSION_COLOR ' , " Transmission Color " , " " ) ,
( ' SUBSURFACE_DIRECT ' , " Subsurface Direct " , " " ) ,
( ' SUBSURFACE_INDIRECT ' , " Subsurface Indirect " , " " ) ,
( ' SUBSURFACE_COLOR ' , " Subsurface Color " , " " ) ,
) ,
)
2011-08-28 13:55:59 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Scene . cycles
2011-04-27 11:58:34 +00:00
2011-11-15 02:58:01 +00:00
2011-04-27 11:58:34 +00:00
class CyclesCameraSettings ( bpy . types . PropertyGroup ) :
2011-08-28 13:55:59 +00:00
@classmethod
def register ( cls ) :
2012-12-13 08:45:55 +00:00
import math
2012-01-20 18:31:23 +00:00
bpy . types . Camera . cycles = PointerProperty (
name = " Cycles Camera Settings " ,
description = " Cycles camera settings " ,
type = cls ,
)
2012-03-07 13:01:30 +00:00
cls . aperture_type = EnumProperty (
name = " Aperture Type " ,
2012-03-09 19:01:44 +00:00
description = " Use F/stop number or aperture radius " ,
2012-12-13 08:45:55 +00:00
items = enum_aperture_types ,
2012-03-07 13:01:30 +00:00
default = ' RADIUS ' ,
)
cls . aperture_fstop = FloatProperty (
name = " Aperture F/stop " ,
2012-03-09 19:01:44 +00:00
description = " F/stop ratio (lower numbers give more defocus, higher numbers give a sharper image) " ,
2012-03-07 13:01:30 +00:00
min = 0.0 , soft_min = 0.1 , soft_max = 64.0 ,
default = 5.6 ,
step = 10 ,
precision = 1 ,
)
2012-01-20 18:31:23 +00:00
cls . aperture_size = FloatProperty (
name = " Aperture Size " ,
2012-03-09 19:01:44 +00:00
description = " Radius of the aperture for depth of field (higher values give more defocus) " ,
2012-03-07 13:01:30 +00:00
min = 0.0 , soft_max = 10.0 ,
2012-01-20 18:31:23 +00:00
default = 0.0 ,
2012-03-07 13:01:30 +00:00
step = 1 ,
precision = 4 ,
2013-03-28 19:33:14 +00:00
subtype = ' DISTANCE ' ,
2012-01-20 18:31:23 +00:00
)
cls . aperture_blades = IntProperty (
name = " Aperture Blades " ,
description = " Number of blades in aperture for polygonal bokeh (at least 3) " ,
min = 0 , max = 100 ,
default = 0 ,
)
cls . aperture_rotation = FloatProperty (
name = " Aperture Rotation " ,
description = " Rotation of blades in aperture " ,
soft_min = - math . pi , soft_max = math . pi ,
subtype = ' ANGLE ' ,
default = 0 ,
)
2012-05-04 16:20:51 +00:00
cls . panorama_type = EnumProperty (
name = " Panorama Type " ,
description = " Distortion to use for the calculation " ,
2012-12-13 08:45:55 +00:00
items = enum_panorama_types ,
2012-05-04 16:20:51 +00:00
default = ' FISHEYE_EQUISOLID ' ,
)
cls . fisheye_fov = FloatProperty (
name = " Field of View " ,
description = " Field of view for the fisheye lens " ,
2013-04-16 03:27:51 +00:00
min = 0.1745 , soft_max = 2.0 * math . pi , max = 10.0 * math . pi ,
2012-05-04 16:20:51 +00:00
subtype = ' ANGLE ' ,
default = math . pi ,
)
cls . fisheye_lens = FloatProperty (
name = " Fisheye Lens " ,
2012-05-07 15:50:57 +00:00
description = " Lens focal length (mm) " ,
2012-05-04 16:20:51 +00:00
min = 0.01 , soft_max = 15.0 , max = 100.0 ,
default = 10.5 ,
)
2011-11-15 02:58:01 +00:00
2011-08-28 13:55:59 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Camera . cycles
2011-04-27 11:58:34 +00:00
2011-11-15 02:58:01 +00:00
2011-04-27 11:58:34 +00:00
class CyclesMaterialSettings ( bpy . types . PropertyGroup ) :
2011-08-28 13:55:59 +00:00
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . Material . cycles = PointerProperty (
name = " Cycles Material Settings " ,
description = " Cycles material settings " ,
type = cls ,
)
cls . sample_as_light = BoolProperty (
2013-01-30 15:57:15 +00:00
name = " Multiple Importance Sample " ,
description = " Use multiple importance sampling for this material, "
2012-10-16 03:21:22 +00:00
" disabling may reduce overall noise for large "
" objects that emit little light compared to other light sources " ,
2012-01-20 18:31:23 +00:00
default = True ,
)
2013-06-18 09:36:00 +00:00
cls . use_transparent_shadow = BoolProperty (
name = " Transparent Shadows " ,
2013-06-18 22:34:37 +00:00
description = " Use transparent shadows for this material if it contains a Transparent BSDF, "
2013-06-18 09:36:00 +00:00
" disabling will render faster but not give accurate shadows " ,
default = True ,
)
2012-01-20 18:31:23 +00:00
cls . homogeneous_volume = BoolProperty (
name = " Homogeneous Volume " ,
2014-01-15 10:40:28 +01:00
description = " When using volume rendering, assume volume has the same density everywhere "
2013-12-29 22:19:38 +01:00
" (not using any textures), for faster rendering " ,
2012-01-20 18:31:23 +00:00
default = False ,
)
2011-04-27 11:58:34 +00:00
2011-08-28 13:55:59 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Material . cycles
2011-11-15 02:58:01 +00:00
2011-09-27 20:37:24 +00:00
class CyclesLampSettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . Lamp . cycles = PointerProperty (
name = " Cycles Lamp Settings " ,
description = " Cycles lamp settings " ,
type = cls ,
)
cls . cast_shadow = BoolProperty (
name = " Cast Shadow " ,
description = " Lamp casts shadows " ,
default = True ,
)
2012-06-13 11:44:48 +00:00
cls . samples = IntProperty (
name = " Samples " ,
description = " Number of light samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 1 ,
)
2013-01-30 15:57:15 +00:00
cls . use_multiple_importance_sampling = BoolProperty (
name = " Multiple Importance Sample " ,
description = " Use multiple importance sampling for the lamp, "
" reduces noise for area lamps and sharp glossy materials " ,
default = False ,
)
2011-09-27 20:37:24 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Lamp . cycles
2011-11-15 02:58:01 +00:00
2011-08-28 13:55:59 +00:00
class CyclesWorldSettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . World . cycles = PointerProperty (
name = " Cycles World Settings " ,
description = " Cycles world settings " ,
type = cls ,
)
cls . sample_as_light = BoolProperty (
2013-01-30 15:57:15 +00:00
name = " Multiple Importance Sample " ,
description = " Use multiple importance sampling for the environment, "
2012-10-16 03:21:22 +00:00
" enabling for non-solid colors is recommended " ,
2012-01-20 18:31:23 +00:00
default = False ,
)
cls . sample_map_resolution = IntProperty (
name = " Map Resolution " ,
2012-10-16 03:21:22 +00:00
description = " Importance map size is resolution x resolution; "
" higher values potentially produce less noise, at the cost of memory and speed " ,
2012-01-20 18:31:23 +00:00
min = 4 , max = 8096 ,
default = 256 ,
)
2012-06-13 11:44:48 +00:00
cls . samples = IntProperty (
name = " Samples " ,
description = " Number of light samples to render for each AA sample " ,
min = 1 , max = 10000 ,
default = 4 ,
)
2013-12-28 16:56:19 +01:00
cls . homogeneous_volume = BoolProperty (
name = " Homogeneous Volume " ,
2013-12-29 22:19:38 +01:00
description = " When using volume rendering, assume volume has the same density everywhere "
" (not using any textures), for faster rendering " ,
2013-12-28 16:56:19 +01:00
default = False ,
)
2011-08-28 13:55:59 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . World . cycles
2011-04-27 11:58:34 +00:00
2011-11-15 02:58:01 +00:00
2011-09-01 15:53:36 +00:00
class CyclesVisibilitySettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . Object . cycles_visibility = PointerProperty (
2013-06-10 20:34:34 +00:00
name = " Cycles Visibility Settings " ,
description = " Cycles visibility settings " ,
type = cls ,
)
bpy . types . World . cycles_visibility = PointerProperty (
2012-01-20 18:31:23 +00:00
name = " Cycles Visibility Settings " ,
description = " Cycles visibility settings " ,
type = cls ,
)
cls . camera = BoolProperty (
name = " Camera " ,
description = " Object visibility for camera rays " ,
default = True ,
)
cls . diffuse = BoolProperty (
name = " Diffuse " ,
description = " Object visibility for diffuse reflection rays " ,
default = True ,
)
cls . glossy = BoolProperty (
name = " Glossy " ,
description = " Object visibility for glossy reflection rays " ,
default = True ,
)
cls . transmission = BoolProperty (
name = " Transmission " ,
description = " Object visibility for transmission rays " ,
default = True ,
)
cls . shadow = BoolProperty (
name = " Shadow " ,
description = " Object visibility for shadow rays " ,
default = True ,
)
2011-09-01 15:53:36 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Object . cycles_visibility
2013-11-24 22:29:58 +01:00
del bpy . types . World . cycles_visibility
2011-09-01 15:53:36 +00:00
2011-11-15 02:58:01 +00:00
2011-04-27 11:58:34 +00:00
class CyclesMeshSettings ( bpy . types . PropertyGroup ) :
2011-08-28 13:55:59 +00:00
@classmethod
def register ( cls ) :
2012-01-20 18:31:23 +00:00
bpy . types . Mesh . cycles = PointerProperty (
name = " Cycles Mesh Settings " ,
description = " Cycles mesh settings " ,
type = cls ,
)
bpy . types . Curve . cycles = PointerProperty (
name = " Cycles Mesh Settings " ,
description = " Cycles mesh settings " ,
type = cls ,
)
bpy . types . MetaBall . cycles = PointerProperty (
name = " Cycles Mesh Settings " ,
description = " Cycles mesh settings " ,
type = cls ,
)
cls . displacement_method = EnumProperty (
name = " Displacement Method " ,
description = " Method to use for the displacement " ,
2012-12-13 08:45:55 +00:00
items = enum_displacement_methods ,
2012-01-20 18:31:23 +00:00
default = ' BUMP ' ,
)
cls . use_subdivision = BoolProperty (
name = " Use Subdivision " ,
description = " Subdivide mesh for rendering " ,
default = False ,
)
cls . dicing_rate = FloatProperty (
name = " Dicing Rate " ,
description = " " ,
min = 0.001 , max = 1000.0 ,
default = 1.0 ,
)
2011-08-28 13:55:59 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Mesh . cycles
2011-09-01 15:53:36 +00:00
del bpy . types . Curve . cycles
del bpy . types . MetaBall . cycles
2011-04-27 11:58:34 +00:00
2013-01-15 23:17:45 +00:00
2014-03-29 13:03:47 +01:00
class CyclesObjectBlurSettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
2014-04-03 09:24:09 +11:00
2014-03-29 13:03:47 +01:00
bpy . types . Object . cycles = PointerProperty (
name = " Cycles Object Settings " ,
description = " Cycles object settings " ,
type = cls ,
)
cls . use_motion_blur = BoolProperty (
name = " Use Motion Blur " ,
description = " Use motion blur for this object " ,
default = True ,
)
cls . use_deform_motion = BoolProperty (
name = " Use Deformation Motion " ,
description = " Use deformation motion blur for this object " ,
default = True ,
)
cls . motion_steps = IntProperty (
name = " Motion Steps " ,
description = " Control accuracy of deformation motion blur, more steps gives more memory usage (actual number of steps is 2^(steps - 1)) " ,
min = 1 , soft_max = 8 ,
default = 1 ,
)
@classmethod
def unregister ( cls ) :
del bpy . types . Object . cycles
2012-12-28 14:21:30 +00:00
class CyclesCurveRenderSettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
bpy . types . Scene . cycles_curves = PointerProperty (
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 ' ,
)
2013-08-18 13:41:53 +00:00
cls . shape = EnumProperty (
name = " Shape " ,
description = " Form of hair " ,
items = enum_curve_shape ,
default = ' THICK ' ,
2012-12-28 14:21:30 +00:00
)
2013-08-18 13:41:53 +00:00
cls . cull_backfacing = BoolProperty (
name = " Cull back-faces " ,
description = " Do not test the back-face of each strand " ,
2012-12-28 14:21:30 +00:00
default = True ,
)
cls . use_curves = BoolProperty (
name = " Use Cycles Hair Rendering " ,
2012-12-30 23:21:33 +00:00
description = " Activate Cycles hair rendering for particle system " ,
2012-12-28 14:21:30 +00:00
default = True ,
2013-01-15 23:17:45 +00:00
)
2012-12-28 14:21:30 +00:00
cls . resolution = IntProperty (
name = " Resolution " ,
description = " Resolution of generated mesh " ,
min = 3 , max = 64 ,
default = 3 ,
)
2013-04-15 21:38:31 +00:00
cls . minimum_width = FloatProperty (
name = " Minimal width " ,
description = " Minimal pixel width for strands (0 - deactivated) " ,
2013-04-16 03:27:51 +00:00
min = 0.0 , max = 100.0 ,
2013-04-15 21:38:31 +00:00
default = 0.0 ,
)
cls . maximum_width = FloatProperty (
name = " Maximal width " ,
description = " Maximum extension that strand radius can be increased by " ,
2013-04-16 03:27:51 +00:00
min = 0.0 , max = 100.0 ,
2013-04-15 21:38:31 +00:00
default = 0.1 ,
)
2013-01-15 19:44:41 +00:00
cls . subdivisions = IntProperty (
name = " Subdivisions " ,
description = " Number of subdivisions used in Cardinal curve intersection (power of 2) " ,
min = 0 , max = 24 ,
2013-04-15 21:38:31 +00:00
default = 4 ,
2013-01-15 19:44:41 +00:00
)
2012-12-28 14:21:30 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . Scene . cycles_curves
2013-01-15 23:17:45 +00:00
2012-12-28 14:21:30 +00:00
class CyclesCurveSettings ( bpy . types . PropertyGroup ) :
@classmethod
def register ( cls ) :
bpy . types . ParticleSettings . cycles = PointerProperty (
name = " Cycles Hair Settings " ,
description = " Cycles hair settings " ,
type = cls ,
)
2013-04-15 21:38:31 +00:00
cls . radius_scale = FloatProperty (
name = " Radius Scaling " ,
description = " Multiplier of width properties " ,
min = 0.0 , max = 1000.0 ,
default = 0.01 ,
)
2012-12-28 14:21:30 +00:00
cls . root_width = FloatProperty (
2013-04-15 21:38:31 +00:00
name = " Root Size " ,
description = " Strand ' s width at root " ,
2012-12-28 14:21:30 +00:00
min = 0.0 , max = 1000.0 ,
default = 1.0 ,
)
cls . tip_width = FloatProperty (
2013-04-15 21:38:31 +00:00
name = " Tip Multiplier " ,
description = " Strand ' s width at tip " ,
2012-12-28 14:21:30 +00:00
min = 0.0 , max = 1000.0 ,
default = 0.0 ,
)
cls . shape = FloatProperty (
name = " Strand Shape " ,
description = " Strand shape parameter " ,
min = - 1.0 , max = 1.0 ,
default = 0.0 ,
)
cls . use_closetip = BoolProperty (
name = " Close tip " ,
2012-12-30 23:21:33 +00:00
description = " Set tip radius to zero " ,
2012-12-28 14:21:30 +00:00
default = True ,
2012-12-30 23:21:33 +00:00
)
2012-12-28 14:21:30 +00:00
@classmethod
def unregister ( cls ) :
del bpy . types . ParticleSettings . cycles
2011-11-15 02:58:01 +00:00
2013-01-15 23:17:45 +00:00
2011-04-27 11:58:34 +00:00
def register ( ) :
2011-08-28 13:55:59 +00:00
bpy . utils . register_class ( CyclesRenderSettings )
bpy . utils . register_class ( CyclesCameraSettings )
bpy . utils . register_class ( CyclesMaterialSettings )
2011-09-27 20:37:24 +00:00
bpy . utils . register_class ( CyclesLampSettings )
2011-08-28 13:55:59 +00:00
bpy . utils . register_class ( CyclesWorldSettings )
2011-09-01 15:53:36 +00:00
bpy . utils . register_class ( CyclesVisibilitySettings )
2011-08-28 13:55:59 +00:00
bpy . utils . register_class ( CyclesMeshSettings )
2012-12-28 14:21:30 +00:00
bpy . utils . register_class ( CyclesCurveRenderSettings )
bpy . utils . register_class ( CyclesCurveSettings )
2011-11-15 02:58:01 +00:00
2011-04-27 11:58:34 +00:00
def unregister ( ) :
2011-08-28 13:55:59 +00:00
bpy . utils . unregister_class ( CyclesRenderSettings )
bpy . utils . unregister_class ( CyclesCameraSettings )
bpy . utils . unregister_class ( CyclesMaterialSettings )
2011-09-27 20:37:24 +00:00
bpy . utils . unregister_class ( CyclesLampSettings )
2011-08-28 13:55:59 +00:00
bpy . utils . unregister_class ( CyclesWorldSettings )
bpy . utils . unregister_class ( CyclesMeshSettings )
2011-09-01 15:53:36 +00:00
bpy . utils . unregister_class ( CyclesVisibilitySettings )
2012-12-28 14:21:30 +00:00
bpy . utils . unregister_class ( CyclesCurveRenderSettings )
bpy . utils . unregister_class ( CyclesCurveSettings )