* Volume rendering - z transparency
[blender-staging.git] / release / ui / buttons_material.py
1         
2 import bpy
3
4 class MaterialButtonsPanel(bpy.types.Panel):
5         __space_type__ = "PROPERTIES"
6         __region_type__ = "WINDOW"
7         __context__ = "material"
8         # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
9
10         def poll(self, context):
11                 return (context.material) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
12
13 class MATERIAL_PT_preview(MaterialButtonsPanel):
14         __label__ = "Preview"
15         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
16
17         def draw(self, context):
18                 layout = self.layout
19                 
20                 mat = context.material
21                 
22                 layout.template_preview(mat)
23                 
24 class MATERIAL_PT_context_material(MaterialButtonsPanel):
25         __show_header__ = False
26         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
27
28         def poll(self, context):
29                 # An exception, dont call the parent poll func because
30                 # this manages materials for all engine types
31                 
32                 return (context.object) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
33
34         def draw(self, context):
35                 layout = self.layout
36                 
37                 mat = context.material
38                 ob = context.object
39                 slot = context.material_slot
40                 space = context.space_data
41
42                 if ob:
43                         row = layout.row()
44
45                         row.template_list(ob, "materials", ob, "active_material_index", rows=2)
46
47                         col = row.column(align=True)
48                         col.itemO("object.material_slot_add", icon="ICON_ZOOMIN", text="")
49                         col.itemO("object.material_slot_remove", icon="ICON_ZOOMOUT", text="")
50
51                         if context.edit_object:
52                                 row = layout.row(align=True)
53                                 row.itemO("object.material_slot_assign", text="Assign")
54                                 row.itemO("object.material_slot_select", text="Select")
55                                 row.itemO("object.material_slot_deselect", text="Deselect")
56
57                 split = layout.split(percentage=0.65)
58
59                 if ob:
60                         split.template_ID(ob, "active_material", new="material.new")
61                         row = split.row()
62                         if slot:
63                                 row.itemR(slot, "link", text="")
64                         else:
65                                 row.itemL()
66                 elif mat:
67                         split.template_ID(space, "pin_id")
68                         split.itemS()
69
70                 layout.itemR(mat, "type", expand=True)
71         
72 class MATERIAL_PT_shading(MaterialButtonsPanel):
73         __label__ = "Shading"
74         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
75
76         def poll(self, context):
77                 return (context.material.type in ('SURFACE', 'WIRE', 'HALO'))
78
79         def draw(self, context):
80                 layout = self.layout
81                 
82                 mat = context.material
83                 ob = context.object
84                 slot = context.material_slot
85                 space = context.space_data
86
87                 if mat:
88
89                         if mat.type in ('SURFACE', 'WIRE'):
90                                 split = layout.split()
91         
92                                 col = split.column()
93                                 col.active = not mat.shadeless
94                                 col.itemR(mat, "ambient")
95                                 col.itemR(mat, "emit")
96                                 col.itemR(mat, "translucency")
97                                 
98                                 col = split.column()
99                                 col.itemR(mat, "shadeless")     
100                                 sub = col.column()
101                                 sub.active = not mat.shadeless
102                                 sub.itemR(mat, "tangent_shading")
103                                 sub.itemR(mat, "cubic")
104                                 
105                         elif mat.type == 'HALO':
106                                 layout.itemR(mat, "alpha")
107                         
108 class MATERIAL_PT_strand(MaterialButtonsPanel):
109         __label__ = "Strand"
110         __default_closed__ = True
111         COMPAT_ENGINES = set(['BLENDER_RENDER'])
112
113         def poll(self, context):
114                 mat = context.material
115                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
116         
117         def poll(self, context):
118                 return context.material.type in ('SURFACE', 'WIRE', 'HALO')
119         
120         def draw(self, context):
121                 layout = self.layout
122                 
123                 mat = context.material
124                 tan = mat.strand
125                 
126                 split = layout.split()
127                 
128                 col = split.column()
129                 col.itemL(text="Size:")
130                 col.itemR(tan, "start_size", text="Root")
131                 col.itemR(tan, "end_size", text="Tip")
132                 col.itemR(tan, "min_size", text="Minimum")
133                 col.itemR(tan, "blender_units")
134                 sub = col.column()
135                 sub.active = (not mat.shadeless)
136                 sub.itemR(tan, "tangent_shading")
137                 
138                 col = split.column()
139                 col.itemR(tan, "shape")
140                 col.itemR(tan, "width_fade")
141                 col.itemR(tan, "uv_layer")
142                 sub = col.column()
143                 sub.active = (not mat.shadeless)
144                 sub.itemR(tan, "surface_diffuse")
145                 sub = col.column()
146                 sub.active = tan.surface_diffuse
147                 sub.itemR(tan, "blend_distance", text="Distance")
148                 
149 class MATERIAL_PT_physics(MaterialButtonsPanel):
150         __label__ = "Physics"
151         COMPAT_ENGINES = set(['BLENDER_GAME'])
152         
153         def draw(self, context):
154                 layout = self.layout
155                 
156                 mat = context.material
157                 phys = mat.physics
158                 
159                 split = layout.split()
160                 
161                 col = split.column()
162                 col.itemR(phys, "distance")
163                 col.itemR(phys, "friction")
164                 col.itemR(phys, "align_to_normal")
165                 
166                 col = split.column()
167                 col.itemR(phys, "force", slider=True)
168                 col.itemR(phys, "elasticity", slider=True)
169                 col.itemR(phys, "damp", slider=True)
170                 
171 class MATERIAL_PT_options(MaterialButtonsPanel):
172         __label__ = "Options"
173         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
174
175         def poll(self, context):
176                 return (context.material.type in ('SURFACE', 'WIRE', 'HALO'))
177
178         def draw(self, context):
179                 layout = self.layout
180                 
181                 mat = context.material
182                 
183                 split = layout.split()
184                 
185                 col = split.column()
186                 col.itemR(mat, "traceable")
187                 col.itemR(mat, "full_oversampling")
188                 col.itemR(mat, "sky")
189                 col.itemR(mat, "exclude_mist")
190                 col.itemR(mat, "invert_z")
191                 sub = col.column(align=True)
192                 sub.itemL(text="Light Group:")
193                 sub.itemR(mat, "light_group", text="")
194                 row = sub.row()
195                 row.active = mat.light_group
196                 row.itemR(mat, "light_group_exclusive", text="Exclusive")
197
198                 col = split.column()
199                 col.itemR(mat, "face_texture")
200                 sub = col.column()
201                 sub.active = mat.face_texture
202                 sub.itemR(mat, "face_texture_alpha")
203                 col.itemS()
204                 col.itemR(mat, "vertex_color_paint")
205                 col.itemR(mat, "vertex_color_light")
206                 col.itemR(mat, "object_color")
207
208 class MATERIAL_PT_shadow(MaterialButtonsPanel):
209         __label__ = "Shadow"
210         __default_closed__ = True
211         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
212         
213         def poll(self, context):
214                 return context.material.type in ('SURFACE', 'WIRE')
215
216         def draw(self, context):
217                 layout = self.layout
218                 
219                 mat = context.material
220                 
221                 split = layout.split()
222                 
223                 col = split.column()
224                 col.itemR(mat, "shadows", text="Receive")
225                 col.itemR(mat, "transparent_shadows", text="Receive Transparent")
226                 col.itemR(mat, "only_shadow", text="Shadows Only")
227                 col.itemR(mat, "cast_shadows_only", text="Cast Only")
228                 col.itemR(mat, "shadow_casting_alpha", text="Casting Alpha")
229                 
230                 col = split.column()
231                 col.itemR(mat, "cast_buffer_shadows")
232                 sub = col.column()
233                 sub.active = mat.cast_buffer_shadows
234                 sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
235                 col.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
236                 sub = col.column()
237                 sub.active = (not mat.ray_shadow_bias)
238                 sub.itemR(mat, "shadow_ray_bias", text="Ray Bias")
239                 
240
241 class MATERIAL_PT_diffuse(MaterialButtonsPanel):
242         __label__ = "Diffuse"
243         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
244
245         def poll(self, context):
246                 mat = context.material
247                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
248
249         def draw(self, context):
250                 layout = self.layout
251                 
252                 mat = context.material  
253                 
254                 split = layout.split()
255                 
256                 col = split.column()
257                 col.itemR(mat, "diffuse_color", text="")
258                 sub = col.column()
259                 sub.active = (not mat.shadeless)
260                 sub.itemR(mat, "diffuse_reflection", text="Intensity")
261                 
262                 col = split.column()
263                 col.active = (not mat.shadeless)
264                 col.itemR(mat, "diffuse_shader", text="")
265                 col.itemR(mat, "use_diffuse_ramp", text="Ramp")
266                 
267                 col = layout.column()
268                 col.active = (not mat.shadeless)
269                 if mat.diffuse_shader == 'OREN_NAYAR':
270                         col.itemR(mat, "roughness")
271                 elif mat.diffuse_shader == 'MINNAERT':
272                         col.itemR(mat, "darkness")
273                 elif mat.diffuse_shader == 'TOON':
274                         row = col.row()
275                         row.itemR(mat, "diffuse_toon_size", text="Size")
276                         row.itemR(mat, "diffuse_toon_smooth", text="Smooth")
277                 elif mat.diffuse_shader == 'FRESNEL':
278                         row = col.row()
279                         row.itemR(mat, "diffuse_fresnel", text="Fresnel")
280                         row.itemR(mat, "diffuse_fresnel_factor", text="Factor")
281                         
282                 if mat.use_diffuse_ramp:
283                         layout.itemS()
284                         layout.template_color_ramp(mat.diffuse_ramp, expand=True)
285                         layout.itemS()
286                         row = layout.row()
287                         split = row.split(percentage=0.3)
288                         split.itemL(text="Input:")
289                         split.itemR(mat, "diffuse_ramp_input", text="")
290                         split = row.split(percentage=0.3)
291                         split.itemL(text="Blend:")
292                         split.itemR(mat, "diffuse_ramp_blend", text="")
293                         
294                 
295 class MATERIAL_PT_specular(MaterialButtonsPanel):
296         __label__ = "Specular"
297         COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
298
299         def poll(self, context):
300                 mat = context.material
301                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
302
303         def draw(self, context):
304                 layout = self.layout
305                 
306                 mat = context.material
307                 
308                 layout.active = (not mat.shadeless)
309                 
310                 split = layout.split()
311                 
312                 col = split.column()
313                 col.itemR(mat, "specular_color", text="")
314                 col.itemR(mat, "specular_reflection", text="Intensity")
315
316                 col = split.column()
317                 col.itemR(mat, "specular_shader", text="")
318                 col.itemR(mat, "use_specular_ramp", text="Ramp")
319
320                 col = layout.column()
321                 if mat.specular_shader in ('COOKTORR', 'PHONG'):
322                         col.itemR(mat, "specular_hardness", text="Hardness")
323                 elif mat.specular_shader == 'BLINN':
324                         row = col.row()
325                         row.itemR(mat, "specular_hardness", text="Hardness")
326                         row.itemR(mat, "specular_ior", text="IOR")
327                 elif mat.specular_shader == 'WARDISO':
328                         col.itemR(mat, "specular_slope", text="Slope")
329                 elif mat.specular_shader == 'TOON':
330                         row = col.row()
331                         row.itemR(mat, "specular_toon_size", text="Size")
332                         row.itemR(mat, "specular_toon_smooth", text="Smooth")
333                 
334                 if mat.use_specular_ramp:
335                         layout.itemS()
336                         layout.template_color_ramp(mat.specular_ramp, expand=True)
337                         layout.itemS()
338                         row = layout.row()
339                         split = row.split(percentage=0.3)
340                         split.itemL(text="Input:")
341                         split.itemR(mat, "specular_ramp_input", text="")
342                         split = row.split(percentage=0.3)
343                         split.itemL(text="Blend:")
344                         split.itemR(mat, "specular_ramp_blend", text="")
345                 
346 class MATERIAL_PT_sss(MaterialButtonsPanel):
347         __label__ = "Subsurface Scattering"
348         __default_closed__ = True
349         COMPAT_ENGINES = set(['BLENDER_RENDER'])
350         
351         def poll(self, context):
352                 mat = context.material
353                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
354
355         def draw_header(self, context):
356                 layout = self.layout
357                 sss = context.material.subsurface_scattering
358
359                 layout.itemR(sss, "enabled", text="")
360         
361         def draw(self, context):
362                 layout = self.layout
363                 
364                 mat = context.material
365                 sss = context.material.subsurface_scattering
366
367                 layout.active = sss.enabled     
368                 
369                 split = layout.split()
370                 split.active = (not mat.shadeless)
371                 
372                 col = split.column(align=True)
373                 col.itemR(sss, "color", text="")
374                 col.itemL(text="Blend:")
375                 col.itemR(sss, "color_factor", text="Color")
376                 col.itemR(sss, "texture_factor", text="Texture")
377                 col.itemL(text="Scattering Weight:")
378                 col.itemR(sss, "front")
379                 col.itemR(sss, "back")
380                 
381                 col = split.column()
382                 sub = col.column(align=True)
383                 sub.itemR(sss, "ior")
384                 sub.itemR(sss, "scale")
385                 col.itemR(sss, "radius", text="RGB Radius")
386                 col.itemR(sss, "error_tolerance")
387
388 class MATERIAL_PT_mirror(MaterialButtonsPanel):
389         __label__ = "Mirror"
390         __default_closed__ = True
391         COMPAT_ENGINES = set(['BLENDER_RENDER'])
392         
393         def poll(self, context):
394                 mat = context.material
395                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
396         
397         def draw_header(self, context):
398                 layout = self.layout
399                 
400                 raym = context.material.raytrace_mirror
401
402                 layout.itemR(raym, "enabled", text="")
403         
404         def draw(self, context):
405                 layout = self.layout
406                 
407                 mat = context.material
408                 raym = context.material.raytrace_mirror
409                 
410                 layout.active = raym.enabled
411                 
412                 split = layout.split()
413                 
414                 col = split.column()
415                 col.itemR(raym, "reflect", text="Reflectivity")
416                 col.itemR(mat, "mirror_color", text="")
417                 col.itemL(text="Fresnel:")
418                 col.itemR(raym, "fresnel", text="Amount")
419                 sub = col.column()
420                 sub.active = raym.fresnel > 0
421                 sub.itemR(raym, "fresnel_factor", text="Blend")
422                 col.itemS()
423                 col.itemS()
424                 sub = col.split(percentage=0.4)
425                 sub.itemL(text="Fade To:")
426                 sub.itemR(raym, "fade_to", text="")
427                 
428                 col = split.column()
429                 col.itemR(raym, "depth")
430                 col.itemR(raym, "distance", text="Max Dist")
431                 col.itemL(text="Gloss:")
432                 col.itemR(raym, "gloss", text="Amount")
433                 sub = col.column()
434                 sub.active = raym.gloss < 1
435                 sub.itemR(raym, "gloss_threshold", text="Threshold")
436                 sub.itemR(raym, "gloss_samples", text="Samples")
437                 sub.itemR(raym, "gloss_anisotropic", text="Anisotropic")
438                 
439                 
440 class MATERIAL_PT_transp(MaterialButtonsPanel):
441         __label__= "Transparency"
442         __default_closed__ = True
443         COMPAT_ENGINES = set(['BLENDER_RENDER'])
444                 
445         def poll(self, context):
446                 mat = context.material
447                 return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
448
449         def draw_header(self, context):
450                 layout = self.layout
451                 
452                 mat = context.material
453                 layout.itemR(mat, "transparency", text="")
454
455         def draw(self, context):
456                 layout = self.layout
457                 
458                 mat = context.material
459                 rayt = context.material.raytrace_transparency
460                 
461                 row= layout.row()
462                 row.itemR(mat, "transparency_method", expand=True)
463                 row.active = mat.transparency and (not mat.shadeless)
464                 
465                 split = layout.split()
466                 
467                 col = split.column()
468                 col.itemL(text="Transparency:")
469                 row = col.row()
470                 row.itemR(mat, "alpha")
471                 row.active = mat.transparency
472                 row = col.row()
473                 row.itemR(mat, "specular_alpha", text="Specular")
474                 row.active = mat.transparency and (not mat.shadeless)
475                 
476                 col = split.column()
477                 col.active = mat.transparency and (not mat.shadeless)
478                 col.itemL(text="Fresnel:")
479                 col.itemR(rayt, "fresnel", text="Amount")
480                 sub = col.column()
481                 sub.active = rayt.fresnel > 0
482                 sub.itemR(rayt, "fresnel_factor", text="Blend")
483
484                 if mat.transparency_method == 'RAYTRACE':
485                         split = layout.split()
486                         split.active = mat.transparency and (not mat.shadeless)
487
488                         col = split.column()
489                         col.itemR(rayt, "ior")
490                         col.itemR(rayt, "filter")
491                         col.itemR(rayt, "falloff")
492                         col.itemR(rayt, "limit")
493                         col.itemR(rayt, "depth")
494                         
495                         col = split.column()
496                         col.itemL(text="Gloss:")
497                         col.itemR(rayt, "gloss", text="Amount")
498                         sub = col.column()
499                         sub.active = rayt.gloss < 1
500                         sub.itemR(rayt, "gloss_threshold", text="Threshold")
501                         sub.itemR(rayt, "gloss_samples", text="Samples")
502
503 class MATERIAL_PT_volume_shading(MaterialButtonsPanel):
504         __label__ = "Shading"
505         __default_closed__ = False
506         COMPAT_ENGINES = set(['BLENDER_RENDER'])
507         
508         def poll(self, context):
509                 return (context.material.type == 'VOLUME') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
510         
511         def draw(self, context):
512                 layout = self.layout
513
514                 mat = context.material
515                 vol = context.material.volume
516                 
517                 split = layout.split()
518                 
519                 row = split.row()
520                 row.itemR(vol, "density")
521                 row.itemR(vol, "scattering")
522                 
523                 split = layout.split()
524                 col = split.column()
525                 col.itemR(vol, "absorption")
526                 col.itemR(vol, "absorption_color", text="")
527                 
528                                 
529                 col = split.column()
530                 col.itemR(vol, "emission")
531                 col.itemR(vol, "emission_color", text="")
532                 
533                 
534
535 class MATERIAL_PT_volume_scattering(MaterialButtonsPanel):
536         __label__ = "Scattering"
537         __default_closed__ = False
538         COMPAT_ENGINES = set(['BLENDER_RENDER'])
539         
540         def poll(self, context):
541                 return (context.material.type == 'VOLUME') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
542         
543         def draw(self, context):
544                 layout = self.layout
545                 
546                 mat = context.material
547                 vol = context.material.volume
548                 
549                 split = layout.split()
550                 
551                 col = split.column()
552                 col.itemR(vol, "scattering_mode", text="")
553                 if vol.scattering_mode == 'SINGLE_SCATTERING':
554                         col.itemR(vol, "light_cache")
555                         sub = col.column()
556                         sub.active = vol.light_cache
557                         sub.itemR(vol, "cache_resolution")
558                 elif vol.scattering_mode in ('MULTIPLE_SCATTERING', 'SINGLE_PLUS_MULTIPLE_SCATTERING'):
559                         col.itemR(vol, "cache_resolution")
560                         
561                         col = col.column(align=True)
562                         col.itemR(vol, "ms_diffusion")
563                         col.itemR(vol, "ms_spread")
564                         col.itemR(vol, "ms_intensity")
565                 
566                 col = split.column()
567                 # col.itemL(text="Anisotropic Scattering:")
568                 col.itemR(vol, "phase_function", text="")
569                 if vol.phase_function in ('SCHLICK', 'HENYEY-GREENSTEIN'):
570                         col.itemR(vol, "asymmetry")
571
572 class MATERIAL_PT_volume_transp(MaterialButtonsPanel):
573         __label__= "Transparency"
574         COMPAT_ENGINES = set(['BLENDER_RENDER'])
575                 
576         def poll(self, context):
577                 mat = context.material
578                 return mat and (mat.type == 'VOLUME') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
579
580         def draw_header(self, context):
581                 layout = self.layout
582
583         def draw(self, context):
584                 layout = self.layout
585                 
586                 mat = context.material
587                 rayt = context.material.raytrace_transparency
588                 
589                 row= layout.row()
590                 row.itemR(mat, "transparency_method", expand=True)
591                 row.active = mat.transparency and (not mat.shadeless)
592                 
593 class MATERIAL_PT_volume_integration(MaterialButtonsPanel):
594         __label__ = "Integration"
595         __default_closed__ = False
596         COMPAT_ENGINES = set(['BLENDER_RENDER'])
597         
598         def poll(self, context):
599                 return (context.material.type == 'VOLUME') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
600         
601         def draw(self, context):
602                 layout = self.layout
603                 
604                 mat = context.material
605                 vol = context.material.volume
606                 
607                 split = layout.split()
608                 
609                 col = split.column()
610                 col.itemL(text="Step Calculation:")
611                 col.itemR(vol, "step_calculation", text="")
612                 col = col.column(align=True)
613                 col.itemR(vol, "step_size")
614                 col.itemR(vol, "shading_step_size")
615                 
616                 col = split.column()
617                 col.itemL()
618                 col.itemR(vol, "depth_cutoff")
619                 col.itemR(vol, "density_scale")
620                 
621                 
622 class MATERIAL_PT_halo(MaterialButtonsPanel):
623         __label__= "Halo"
624         COMPAT_ENGINES = set(['BLENDER_RENDER'])
625         
626         def poll(self, context):
627                 mat = context.material
628                 return mat and (mat.type == 'HALO') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
629         
630         def draw(self, context):
631                 layout = self.layout
632                 
633                 mat = context.material
634                 halo = mat.halo
635
636                 split = layout.split()
637                 
638                 col = split.column()
639                 col.itemR(mat, "diffuse_color", text="")
640                 col.itemR(halo, "size")
641                 col.itemR(halo, "hardness")
642                 col.itemR(halo, "add")
643                 col.itemL(text="Options:")
644                 col.itemR(halo, "use_texture", text="Texture")
645                 col.itemR(halo, "use_vertex_normal", text="Vertex Normal")
646                 col.itemR(halo, "xalpha")
647                 col.itemR(halo, "shaded")
648                 col.itemR(halo, "soft")
649
650                 col = split.column()
651                 col.itemR(halo, "ring")
652                 sub = col.column()
653                 sub.active = halo.ring
654                 sub.itemR(halo, "rings")
655                 sub.itemR(mat, "mirror_color", text="")
656                 col.itemR(halo, "lines")
657                 sub = col.column()
658                 sub.active = halo.lines
659                 sub.itemR(halo, "line_number", text="Lines")
660                 sub.itemR(mat, "specular_color", text="")
661                 col.itemR(halo, "star")
662                 sub = col.column()
663                 sub.active = halo.star
664                 sub.itemR(halo, "star_tips")
665                 col.itemR(halo, "flare_mode")
666                 sub = col.column()
667                 sub.active = halo.flare_mode
668                 sub.itemR(halo, "flare_size", text="Size")
669                 sub.itemR(halo, "flare_subsize", text="Subsize")
670                 sub.itemR(halo, "flare_boost", text="Boost")
671                 sub.itemR(halo, "flare_seed", text="Seed")
672                 sub.itemR(halo, "flares_sub", text="Sub")
673
674 bpy.types.register(MATERIAL_PT_context_material)
675 bpy.types.register(MATERIAL_PT_preview)
676 bpy.types.register(MATERIAL_PT_diffuse)
677 bpy.types.register(MATERIAL_PT_specular)
678 bpy.types.register(MATERIAL_PT_shading)
679 bpy.types.register(MATERIAL_PT_transp)
680 bpy.types.register(MATERIAL_PT_mirror)
681 bpy.types.register(MATERIAL_PT_sss)
682 bpy.types.register(MATERIAL_PT_volume_shading)
683 bpy.types.register(MATERIAL_PT_volume_scattering)
684 bpy.types.register(MATERIAL_PT_volume_transp)
685 bpy.types.register(MATERIAL_PT_volume_integration)
686 bpy.types.register(MATERIAL_PT_halo)
687 bpy.types.register(MATERIAL_PT_physics)
688 bpy.types.register(MATERIAL_PT_strand)
689 bpy.types.register(MATERIAL_PT_options)
690 bpy.types.register(MATERIAL_PT_shadow)
691