5476f1b39e5bc82954dc0fcdcbe1544a7e8d7c36
[blender.git] / intern / cycles / blender / addon / properties.py
1 #
2 # Copyright 2011-2013 Blender Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License
15 #
16
17 # <pep8 compliant>
18
19 import bpy
20 from bpy.props import (BoolProperty,
21                        EnumProperty,
22                        FloatProperty,
23                        IntProperty,
24                        PointerProperty)
25
26 # enums
27
28 enum_devices = (
29     ('CPU', "CPU", "Use CPU for rendering"),
30     ('GPU', "GPU Compute", "Use GPU compute device for rendering, configured in user preferences"))
31
32 enum_feature_set = (
33     ('SUPPORTED', "Supported", "Only use finished and supported features"),
34     ('EXPERIMENTAL', "Experimental", "Use experimental and incomplete features that might be broken or change in the future"),
35     )
36
37 enum_displacement_methods = (
38     ('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"),
39     ('TRUE', "True", "Use true displacement only, requires fine subdivision"),
40     ('BOTH', "Both", "Combination of displacement and bump mapping"),
41     )
42
43 enum_bvh_types = (
44     ('DYNAMIC_BVH', "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"),
45     ('STATIC_BVH', "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"),
46     )
47
48 enum_filter_types = (
49     ('BOX', "Box", "Box filter"),
50     ('GAUSSIAN', "Gaussian", "Gaussian filter"),
51     )
52
53 enum_aperture_types = (
54     ('RADIUS', "Radius", "Directly change the size of the aperture"),
55     ('FSTOP', "F/stop", "Change the size of the aperture by f/stops"),
56     )
57
58 enum_panorama_types = (
59     ('EQUIRECTANGULAR', "Equirectangular", "Render the scene with a spherical camera, also known as Lat Long panorama"),
60     ('FISHEYE_EQUIDISTANT', "Fisheye Equidistant", "Ideal for fulldomes, ignore the sensor dimensions"),
61     ('FISHEYE_EQUISOLID', "Fisheye Equisolid",
62                           "Similar to most fisheye modern lens, takes sensor dimensions into consideration"),
63     )
64
65 enum_curve_primitives = (
66     ('TRIANGLES', "Triangles", "Create triangle geometry around strands"),
67     ('LINE_SEGMENTS', "Line Segments", "Use line segment primitives"),
68     ('CURVE_SEGMENTS', "Curve Segments", "Use segmented cardinal curve primitives"),
69     )
70
71 enum_triangle_curves = (
72     ('CAMERA_TRIANGLES', "Planes", "Create individual triangles forming planes that face camera"),
73     ('TESSELLATED_TRIANGLES', "Tessellated", "Create mesh surrounding each strand"),
74     )
75
76 enum_curve_shape = (
77     ('RIBBONS', "Ribbons", "Ignore thickness of each strand"),
78     ('THICK', "Thick", "Use thickness of strand when rendering"),
79     )
80
81 enum_tile_order = (
82     ('CENTER', "Center", "Render from center to the edges"),
83     ('RIGHT_TO_LEFT', "Right to Left", "Render from right to left"),
84     ('LEFT_TO_RIGHT', "Left to Right", "Render from left to right"),
85     ('TOP_TO_BOTTOM', "Top to Bottom", "Render from top to bottom"),
86     ('BOTTOM_TO_TOP', "Bottom to Top", "Render from bottom to top"),
87     )
88
89 enum_use_layer_samples = (
90     ('USE', "Use", "Per render layer number of samples override scene samples"),
91     ('BOUNDED', "Bounded", "Bound per render layer number of samples by global samples"),
92     ('IGNORE', "Ignore", "Ignore per render layer number of samples"),
93     )
94
95 enum_sampling_pattern = (
96     ('SOBOL', "Sobol", "Use Sobol random sampling pattern"),
97     ('CORRELATED_MUTI_JITTER', "Correlated Multi-Jitter", "Use Correlated Multi-Jitter random sampling pattern"),
98     )
99
100
101 class CyclesRenderSettings(bpy.types.PropertyGroup):
102     @classmethod
103     def register(cls):
104         bpy.types.Scene.cycles = PointerProperty(
105                 name="Cycles Render Settings",
106                 description="Cycles render settings",
107                 type=cls,
108                 )
109         cls.device = EnumProperty(
110                 name="Device",
111                 description="Device to use for rendering",
112                 items=enum_devices,
113                 default='CPU',
114                 )
115         cls.feature_set = EnumProperty(
116                 name="Feature Set",
117                 description="Feature set to use for rendering",
118                 items=enum_feature_set,
119                 default='SUPPORTED',
120                 )
121         cls.shading_system = BoolProperty(
122                 name="Open Shading Language",
123                 description="Use Open Shading Language (CPU rendering only)",
124                 )
125
126         cls.progressive = BoolProperty(
127                 name="Progressive",
128                 description="Use progressive sampling of lighting",
129                 default=True,
130                 )
131         cls.squared_samples = BoolProperty(
132                 name="Squared Samples",
133                 description="Square sampling values for easier artist control",
134                 default=False,
135                 )
136
137         cls.samples = IntProperty(
138                 name="Samples",
139                 description="Number of samples to render for each pixel",
140                 min=1, max=2147483647,
141                 default=10,
142                 )
143         cls.preview_samples = IntProperty(
144                 name="Preview Samples",
145                 description="Number of samples to render in the viewport, unlimited if 0",
146                 min=0, max=2147483647,
147                 default=10,
148                 )
149         cls.preview_pause = BoolProperty(
150                 name="Pause Preview",
151                 description="Pause all viewport preview renders",
152                 default=False,
153                 )
154         cls.preview_active_layer = BoolProperty(
155                 name="Preview Active Layer",
156                 description="Preview active render layer in viewport",
157                 default=False,
158                 )
159
160         cls.aa_samples = IntProperty(
161                 name="AA Samples",
162                 description="Number of antialiasing samples to render for each pixel",
163                 min=1, max=10000,
164                 default=4,
165                 )
166         cls.preview_aa_samples = IntProperty(
167                 name="AA Samples",
168                 description="Number of antialiasing samples to render in the viewport, unlimited if 0",
169                 min=0, max=10000,
170                 default=4,
171                 )
172         cls.diffuse_samples = IntProperty(
173                 name="Diffuse Samples",
174                 description="Number of diffuse bounce samples to render for each AA sample",
175                 min=1, max=10000,
176                 default=1,
177                 )
178         cls.glossy_samples = IntProperty(
179                 name="Glossy Samples",
180                 description="Number of glossy bounce samples to render for each AA sample",
181                 min=1, max=10000,
182                 default=1,
183                 )
184         cls.transmission_samples = IntProperty(
185                 name="Transmission Samples",
186                 description="Number of transmission bounce samples to render for each AA sample",
187                 min=1, max=10000,
188                 default=1,
189                 )
190         cls.ao_samples = IntProperty(
191                 name="Ambient Occlusion Samples",
192                 description="Number of ambient occlusion samples to render for each AA sample",
193                 min=1, max=10000,
194                 default=1,
195                 )
196         cls.mesh_light_samples = IntProperty(
197                 name="Mesh Light Samples",
198                 description="Number of mesh emission light samples to render for each AA sample",
199                 min=1, max=10000,
200                 default=1,
201                 )
202
203         cls.subsurface_samples = IntProperty(
204                 name="Subsurface Samples",
205                 description="Number of subsurface scattering samples to render for each AA sample",
206                 min=1, max=10000,
207                 default=1,
208                 )
209
210         cls.sampling_pattern = EnumProperty(
211                 name="Sampling Pattern",
212                 description="Random sampling pattern used by the integrator",
213                 items=enum_sampling_pattern,
214                 default='SOBOL',
215                 )
216
217         cls.use_layer_samples = EnumProperty(
218                 name="Layer Samples",
219                 description="How to use per render layer sample settings",
220                 items=enum_use_layer_samples,
221                 default='USE',
222                 )
223
224         cls.no_caustics = BoolProperty(
225                 name="No Caustics",
226                 description="Leave out caustics, resulting in a darker image with less noise",
227                 default=False,
228                 )
229         cls.blur_glossy = FloatProperty(
230                 name="Filter Glossy",
231                 description="Adaptively blur glossy shaders after blurry bounces, "
232                             "to reduce noise at the cost of accuracy",
233                 min=0.0, max=10.0,
234                 default=0.0,
235                 )
236
237         cls.min_bounces = IntProperty(
238                 name="Min Bounces",
239                 description="Minimum number of bounces, setting this lower "
240                             "than the maximum enables probabilistic path "
241                             "termination (faster but noisier)",
242                 min=0, max=1024,
243                 default=3,
244                 )
245         cls.max_bounces = IntProperty(
246                 name="Max Bounces",
247                 description="Total maximum number of bounces",
248                 min=0, max=1024,
249                 default=8,
250                 )
251
252         cls.diffuse_bounces = IntProperty(
253                 name="Diffuse Bounces",
254                 description="Maximum number of diffuse reflection bounces, bounded by total maximum",
255                 min=0, max=1024,
256                 default=128,
257                 )
258         cls.glossy_bounces = IntProperty(
259                 name="Glossy Bounces",
260                 description="Maximum number of glossy reflection bounces, bounded by total maximum",
261                 min=0, max=1024,
262                 default=128,
263                 )
264         cls.transmission_bounces = IntProperty(
265                 name="Transmission Bounces",
266                 description="Maximum number of transmission bounces, bounded by total maximum",
267                 min=0, max=1024,
268                 default=128,
269                 )
270
271         cls.transparent_min_bounces = IntProperty(
272                 name="Transparent Min Bounces",
273                 description="Minimum number of transparent bounces, setting "
274                             "this lower than the maximum enables "
275                             "probabilistic path termination (faster but "
276                             "noisier)",
277                 min=0, max=1024,
278                 default=8,
279                 )
280         cls.transparent_max_bounces = IntProperty(
281                 name="Transparent Max Bounces",
282                 description="Maximum number of transparent bounces",
283                 min=0, max=1024,
284                 default=8,
285                 )
286         cls.use_transparent_shadows = BoolProperty(
287                 name="Transparent Shadows",
288                 description="Use transparency of surfaces for rendering shadows",
289                 default=True,
290                 )
291
292         cls.film_exposure = FloatProperty(
293                 name="Exposure",
294                 description="Image brightness scale",
295                 min=0.0, max=10.0,
296                 default=1.0,
297                 )
298         cls.film_transparent = BoolProperty(
299                 name="Transparent",
300                 description="World background is transparent with premultiplied alpha",
301                 default=False,
302                 )
303
304         cls.filter_type = EnumProperty(
305                 name="Filter Type",
306                 description="Pixel filter type",
307                 items=enum_filter_types,
308                 default='GAUSSIAN',
309                 )
310         cls.filter_width = FloatProperty(
311                 name="Filter Width",
312                 description="Pixel filter width",
313                 min=0.01, max=10.0,
314                 default=1.5,
315                 )
316
317         cls.seed = IntProperty(
318                 name="Seed",
319                 description="Seed value for integrator to get different noise patterns",
320                 min=0, max=2147483647,
321                 default=0,
322                 )
323
324         cls.sample_clamp = FloatProperty(
325                 name="Clamp",
326                 description="If non-zero, the maximum value for a sample, "
327                             "higher values will be scaled down to avoid too "
328                             "much noise and slow convergence at the cost of accuracy",
329                 min=0.0, max=1e8,
330                 default=0.0,
331                 )
332
333         cls.debug_tile_size = IntProperty(
334                 name="Tile Size",
335                 description="",
336                 min=1, max=4096,
337                 default=1024,
338                 )
339
340         cls.preview_start_resolution = IntProperty(
341                 name="Start Resolution",
342                 description="Resolution to start rendering preview at, "
343                             "progressively increasing it to the full viewport size",
344                 min=8, max=16384,
345                 default=64,
346                 )
347
348         cls.debug_reset_timeout = FloatProperty(
349                 name="Reset timeout",
350                 description="",
351                 min=0.01, max=10.0,
352                 default=0.1,
353                 )
354         cls.debug_cancel_timeout = FloatProperty(
355                 name="Cancel timeout",
356                 description="",
357                 min=0.01, max=10.0,
358                 default=0.1,
359                 )
360         cls.debug_text_timeout = FloatProperty(
361                 name="Text timeout",
362                 description="",
363                 min=0.01, max=10.0,
364                 default=1.0,
365                 )
366
367         cls.debug_bvh_type = EnumProperty(
368                 name="Viewport BVH Type",
369                 description="Choose between faster updates, or faster render",
370                 items=enum_bvh_types,
371                 default='DYNAMIC_BVH',
372                 )
373         cls.debug_use_spatial_splits = BoolProperty(
374                 name="Use Spatial Splits",
375                 description="Use BVH spatial splits: longer builder time, faster render",
376                 default=False,
377                 )
378         cls.use_cache = BoolProperty(
379                 name="Cache BVH",
380                 description="Cache last built BVH to disk for faster re-render if no geometry changed",
381                 default=False,
382                 )
383         cls.tile_order = EnumProperty(
384                 name="Tile Order",
385                 description="Tile order for rendering",
386                 items=enum_tile_order,
387                 default='CENTER',
388                 options=set(),  # Not animatable!
389                 )
390         cls.use_progressive_refine = BoolProperty(
391                 name="Progressive Refine",
392                 description="Instead of rendering each tile until it is finished, "
393                             "refine the whole image progressively "
394                             "(this renders somewhat slower, "
395                             "but time can be saved by manually stopping the render when the noise is low enough)",
396                 default=False,
397                 )
398
399     @classmethod
400     def unregister(cls):
401         del bpy.types.Scene.cycles
402
403
404 class CyclesCameraSettings(bpy.types.PropertyGroup):
405     @classmethod
406     def register(cls):
407         import math
408
409         bpy.types.Camera.cycles = PointerProperty(
410                 name="Cycles Camera Settings",
411                 description="Cycles camera settings",
412                 type=cls,
413                 )
414
415         cls.aperture_type = EnumProperty(
416                 name="Aperture Type",
417                 description="Use F/stop number or aperture radius",
418                 items=enum_aperture_types,
419                 default='RADIUS',
420                 )
421         cls.aperture_fstop = FloatProperty(
422                 name="Aperture F/stop",
423                 description="F/stop ratio (lower numbers give more defocus, higher numbers give a sharper image)",
424                 min=0.0, soft_min=0.1, soft_max=64.0,
425                 default=5.6,
426                 step=10,
427                 precision=1,
428                 )
429         cls.aperture_size = FloatProperty(
430                 name="Aperture Size",
431                 description="Radius of the aperture for depth of field (higher values give more defocus)",
432                 min=0.0, soft_max=10.0,
433                 default=0.0,
434                 step=1,
435                 precision=4,
436                 subtype='DISTANCE',
437                 )
438         cls.aperture_blades = IntProperty(
439                 name="Aperture Blades",
440                 description="Number of blades in aperture for polygonal bokeh (at least 3)",
441                 min=0, max=100,
442                 default=0,
443                 )
444         cls.aperture_rotation = FloatProperty(
445                 name="Aperture Rotation",
446                 description="Rotation of blades in aperture",
447                 soft_min=-math.pi, soft_max=math.pi,
448                 subtype='ANGLE',
449                 default=0,
450                 )
451         cls.panorama_type = EnumProperty(
452                 name="Panorama Type",
453                 description="Distortion to use for the calculation",
454                 items=enum_panorama_types,
455                 default='FISHEYE_EQUISOLID',
456                 )
457         cls.fisheye_fov = FloatProperty(
458                 name="Field of View",
459                 description="Field of view for the fisheye lens",
460                 min=0.1745, soft_max=2.0 * math.pi, max=10.0 * math.pi,
461                 subtype='ANGLE',
462                 default=math.pi,
463                 )
464         cls.fisheye_lens = FloatProperty(
465                 name="Fisheye Lens",
466                 description="Lens focal length (mm)",
467                 min=0.01, soft_max=15.0, max=100.0,
468                 default=10.5,
469                 )
470
471     @classmethod
472     def unregister(cls):
473         del bpy.types.Camera.cycles
474
475
476 class CyclesMaterialSettings(bpy.types.PropertyGroup):
477     @classmethod
478     def register(cls):
479         bpy.types.Material.cycles = PointerProperty(
480                 name="Cycles Material Settings",
481                 description="Cycles material settings",
482                 type=cls,
483                 )
484         cls.sample_as_light = BoolProperty(
485                 name="Multiple Importance Sample",
486                 description="Use multiple importance sampling for this material, "
487                             "disabling may reduce overall noise for large "
488                             "objects that emit little light compared to other light sources",
489                 default=True,
490                 )
491         cls.use_transparent_shadow = BoolProperty(
492                 name="Transparent Shadows",
493                 description="Use transparent shadows for this material if it contains a Transparent BSDF, "
494                             "disabling will render faster but not give accurate shadows",
495                 default=True,
496                 )
497         cls.homogeneous_volume = BoolProperty(
498                 name="Homogeneous Volume",
499                 description="When using volume rendering, assume volume has the same density everywhere, "
500                             "for faster rendering",
501                 default=False,
502                 )
503
504     @classmethod
505     def unregister(cls):
506         del bpy.types.Material.cycles
507
508
509 class CyclesLampSettings(bpy.types.PropertyGroup):
510     @classmethod
511     def register(cls):
512         bpy.types.Lamp.cycles = PointerProperty(
513                 name="Cycles Lamp Settings",
514                 description="Cycles lamp settings",
515                 type=cls,
516                 )
517         cls.cast_shadow = BoolProperty(
518                 name="Cast Shadow",
519                 description="Lamp casts shadows",
520                 default=True,
521                 )
522         cls.samples = IntProperty(
523                 name="Samples",
524                 description="Number of light samples to render for each AA sample",
525                 min=1, max=10000,
526                 default=1,
527                 )
528         cls.use_multiple_importance_sampling = BoolProperty(
529                 name="Multiple Importance Sample",
530                 description="Use multiple importance sampling for the lamp, "
531                             "reduces noise for area lamps and sharp glossy materials",
532                 default=False,
533                 )
534
535     @classmethod
536     def unregister(cls):
537         del bpy.types.Lamp.cycles
538
539
540 class CyclesWorldSettings(bpy.types.PropertyGroup):
541     @classmethod
542     def register(cls):
543         bpy.types.World.cycles = PointerProperty(
544                 name="Cycles World Settings",
545                 description="Cycles world settings",
546                 type=cls,
547                 )
548         cls.sample_as_light = BoolProperty(
549                 name="Multiple Importance Sample",
550                 description="Use multiple importance sampling for the environment, "
551                             "enabling for non-solid colors is recommended",
552                 default=False,
553                 )
554         cls.sample_map_resolution = IntProperty(
555                 name="Map Resolution",
556                 description="Importance map size is resolution x resolution; "
557                             "higher values potentially produce less noise, at the cost of memory and speed",
558                 min=4, max=8096,
559                 default=256,
560                 )
561         cls.samples = IntProperty(
562                 name="Samples",
563                 description="Number of light samples to render for each AA sample",
564                 min=1, max=10000,
565                 default=4,
566                 )
567
568     @classmethod
569     def unregister(cls):
570         del bpy.types.World.cycles
571
572
573 class CyclesVisibilitySettings(bpy.types.PropertyGroup):
574     @classmethod
575     def register(cls):
576         bpy.types.Object.cycles_visibility = PointerProperty(
577                 name="Cycles Visibility Settings",
578                 description="Cycles visibility settings",
579                 type=cls,
580                 )
581
582         bpy.types.World.cycles_visibility = PointerProperty(
583                 name="Cycles Visibility Settings",
584                 description="Cycles visibility settings",
585                 type=cls,
586                 )
587
588         cls.camera = BoolProperty(
589                 name="Camera",
590                 description="Object visibility for camera rays",
591                 default=True,
592                 )
593         cls.diffuse = BoolProperty(
594                 name="Diffuse",
595                 description="Object visibility for diffuse reflection rays",
596                 default=True,
597                 )
598         cls.glossy = BoolProperty(
599                 name="Glossy",
600                 description="Object visibility for glossy reflection rays",
601                 default=True,
602                 )
603         cls.transmission = BoolProperty(
604                 name="Transmission",
605                 description="Object visibility for transmission rays",
606                 default=True,
607                 )
608         cls.shadow = BoolProperty(
609                 name="Shadow",
610                 description="Object visibility for shadow rays",
611                 default=True,
612                 )
613
614     @classmethod
615     def unregister(cls):
616         del bpy.types.Object.cycles_visibility
617
618
619 class CyclesMeshSettings(bpy.types.PropertyGroup):
620     @classmethod
621     def register(cls):
622         bpy.types.Mesh.cycles = PointerProperty(
623                 name="Cycles Mesh Settings",
624                 description="Cycles mesh settings",
625                 type=cls,
626                 )
627         bpy.types.Curve.cycles = PointerProperty(
628                 name="Cycles Mesh Settings",
629                 description="Cycles mesh settings",
630                 type=cls,
631                 )
632         bpy.types.MetaBall.cycles = PointerProperty(
633                 name="Cycles Mesh Settings",
634                 description="Cycles mesh settings",
635                 type=cls,
636                 )
637
638         cls.displacement_method = EnumProperty(
639                 name="Displacement Method",
640                 description="Method to use for the displacement",
641                 items=enum_displacement_methods,
642                 default='BUMP',
643                 )
644         cls.use_subdivision = BoolProperty(
645                 name="Use Subdivision",
646                 description="Subdivide mesh for rendering",
647                 default=False,
648                 )
649         cls.dicing_rate = FloatProperty(
650                 name="Dicing Rate",
651                 description="",
652                 min=0.001, max=1000.0,
653                 default=1.0,
654                 )
655
656     @classmethod
657     def unregister(cls):
658         del bpy.types.Mesh.cycles
659         del bpy.types.Curve.cycles
660         del bpy.types.MetaBall.cycles
661
662
663 class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
664     @classmethod
665     def register(cls):
666         bpy.types.Scene.cycles_curves = PointerProperty(
667                 name="Cycles Hair Rendering Settings",
668                 description="Cycles hair rendering settings",
669                 type=cls,
670                 )
671         cls.primitive = EnumProperty(
672                 name="Primitive",
673                 description="Type of primitive used for hair rendering",
674                 items=enum_curve_primitives,
675                 default='LINE_SEGMENTS',
676                 )
677         cls.shape = EnumProperty(
678                 name="Shape",
679                 description="Form of hair",
680                 items=enum_curve_shape,
681                 default='THICK',
682                 )
683         cls.cull_backfacing = BoolProperty(
684                 name="Cull back-faces",
685                 description="Do not test the back-face of each strand",
686                 default=True,
687                 )
688         cls.use_curves = BoolProperty(
689                 name="Use Cycles Hair Rendering",
690                 description="Activate Cycles hair rendering for particle system",
691                 default=True,
692                 )
693         cls.resolution = IntProperty(
694                 name="Resolution",
695                 description="Resolution of generated mesh",
696                 min=3, max=64,
697                 default=3,
698                 )
699         cls.minimum_width = FloatProperty(
700                 name="Minimal width",
701                 description="Minimal pixel width for strands (0 - deactivated)",
702                 min=0.0, max=100.0,
703                 default=0.0,
704                 )
705         cls.maximum_width = FloatProperty(
706                 name="Maximal width",
707                 description="Maximum extension that strand radius can be increased by",
708                 min=0.0, max=100.0,
709                 default=0.1,
710                 )
711         cls.subdivisions = IntProperty(
712                 name="Subdivisions",
713                 description="Number of subdivisions used in Cardinal curve intersection (power of 2)",
714                 min=0, max=24,
715                 default=4,
716                 )
717
718     @classmethod
719     def unregister(cls):
720         del bpy.types.Scene.cycles_curves
721
722
723 class CyclesCurveSettings(bpy.types.PropertyGroup):
724     @classmethod
725     def register(cls):
726         bpy.types.ParticleSettings.cycles = PointerProperty(
727                 name="Cycles Hair Settings",
728                 description="Cycles hair settings",
729                 type=cls,
730                 )
731         cls.radius_scale = FloatProperty(
732                 name="Radius Scaling",
733                 description="Multiplier of width properties",
734                 min=0.0, max=1000.0,
735                 default=0.01,
736                 )
737         cls.root_width = FloatProperty(
738                 name="Root Size",
739                 description="Strand's width at root",
740                 min=0.0, max=1000.0,
741                 default=1.0,
742                 )
743         cls.tip_width = FloatProperty(
744                 name="Tip Multiplier",
745                 description="Strand's width at tip",
746                 min=0.0, max=1000.0,
747                 default=0.0,
748                 )
749         cls.shape = FloatProperty(
750                 name="Strand Shape",
751                 description="Strand shape parameter",
752                 min=-1.0, max=1.0,
753                 default=0.0,
754                 )
755         cls.use_closetip = BoolProperty(
756                 name="Close tip",
757                 description="Set tip radius to zero",
758                 default=True,
759                 )
760
761     @classmethod
762     def unregister(cls):
763         del bpy.types.ParticleSettings.cycles
764
765
766 def register():
767     bpy.utils.register_class(CyclesRenderSettings)
768     bpy.utils.register_class(CyclesCameraSettings)
769     bpy.utils.register_class(CyclesMaterialSettings)
770     bpy.utils.register_class(CyclesLampSettings)
771     bpy.utils.register_class(CyclesWorldSettings)
772     bpy.utils.register_class(CyclesVisibilitySettings)
773     bpy.utils.register_class(CyclesMeshSettings)
774     bpy.utils.register_class(CyclesCurveRenderSettings)
775     bpy.utils.register_class(CyclesCurveSettings)
776
777
778 def unregister():
779     bpy.utils.unregister_class(CyclesRenderSettings)
780     bpy.utils.unregister_class(CyclesCameraSettings)
781     bpy.utils.unregister_class(CyclesMaterialSettings)
782     bpy.utils.unregister_class(CyclesLampSettings)
783     bpy.utils.unregister_class(CyclesWorldSettings)
784     bpy.utils.unregister_class(CyclesMeshSettings)
785     bpy.utils.unregister_class(CyclesVisibilitySettings)
786     bpy.utils.unregister_class(CyclesCurveRenderSettings)
787     bpy.utils.unregister_class(CyclesCurveSettings)