Merged revision(s) 58682-58770 from trunk/blender into soc-2013-dingto.
[blender.git] / release / scripts / startup / bl_ui / properties_game.py
1 # ##### BEGIN GPL LICENSE BLOCK #####
2 #
3 #  This program is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU General Public License
5 #  as published by the Free Software Foundation; either version 2
6 #  of the License, or (at your option) any later version.
7 #
8 #  This program is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #  GNU General Public License for more details.
12 #
13 #  You should have received a copy of the GNU General Public License
14 #  along with this program; if not, write to the Free Software Foundation,
15 #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # ##### END GPL LICENSE BLOCK #####
18
19 # <pep8 compliant>
20 import bpy
21 from bpy.types import Panel
22
23
24 class PhysicsButtonsPanel():
25     bl_space_type = 'PROPERTIES'
26     bl_region_type = 'WINDOW'
27     bl_context = "physics"
28
29
30 class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
31     bl_label = "Physics"
32     COMPAT_ENGINES = {'BLENDER_GAME'}
33
34     @classmethod
35     def poll(cls, context):
36         ob = context.active_object
37         rd = context.scene.render
38         return ob and ob.game and (rd.engine in cls.COMPAT_ENGINES)
39
40     def draw(self, context):
41         layout = self.layout
42
43         ob = context.active_object
44         game = ob.game
45         soft = ob.game.soft_body
46
47         layout.prop(game, "physics_type")
48         layout.separator()
49
50         physics_type = game.physics_type
51
52         if physics_type == 'CHARACTER':
53             layout.prop(game, "use_actor")
54             layout.prop(ob, "hide_render", text="Invisible")  # out of place but useful
55             layout.prop(game, "step_height", slider=True)
56             layout.prop(game, "jump_speed")
57             layout.prop(game, "fall_speed")
58
59         elif physics_type in {'DYNAMIC', 'RIGID_BODY'}:
60             split = layout.split()
61
62             col = split.column()
63             col.prop(game, "use_actor")
64             col.prop(game, "use_ghost")
65             col.prop(ob, "hide_render", text="Invisible")  # out of place but useful
66
67             col = split.column()
68             col.prop(game, "use_material_physics_fh")
69             col.prop(game, "use_rotate_from_normal")
70             col.prop(game, "use_sleep")
71
72             layout.separator()
73
74             split = layout.split()
75
76             col = split.column()
77             col.label(text="Attributes:")
78             col.prop(game, "mass")
79             col.prop(game, "radius")
80             col.prop(game, "form_factor")
81
82             col = split.column()
83             sub = col.column()
84             sub.prop(game, "use_anisotropic_friction")
85             subsub = sub.column()
86             subsub.active = game.use_anisotropic_friction
87             subsub.prop(game, "friction_coefficients", text="", slider=True)
88
89             split = layout.split()
90
91             col = split.column()
92             col.label(text="Velocity:")
93             sub = col.column(align=True)
94             sub.prop(game, "velocity_min", text="Minimum")
95             sub.prop(game, "velocity_max", text="Maximum")
96
97             col = split.column()
98             col.label(text="Damping:")
99             sub = col.column(align=True)
100             sub.prop(game, "damping", text="Translation", slider=True)
101             sub.prop(game, "rotation_damping", text="Rotation", slider=True)
102
103             layout.separator()
104
105             split = layout.split()
106
107             col = split.column()
108             col.label(text="Lock Translation:")
109             col.prop(game, "lock_location_x", text="X")
110             col.prop(game, "lock_location_y", text="Y")
111             col.prop(game, "lock_location_z", text="Z")
112
113             col = split.column()
114             col.label(text="Lock Rotation:")
115             col.prop(game, "lock_rotation_x", text="X")
116             col.prop(game, "lock_rotation_y", text="Y")
117             col.prop(game, "lock_rotation_z", text="Z")
118
119         elif physics_type == 'SOFT_BODY':
120             col = layout.column()
121             col.prop(game, "use_actor")
122             col.prop(game, "use_ghost")
123             col.prop(ob, "hide_render", text="Invisible")
124
125             layout.separator()
126
127             split = layout.split()
128
129             col = split.column()
130             col.label(text="Attributes:")
131             col.prop(game, "mass")
132             # disabled in the code
133             # col.prop(soft, "weld_threshold")
134             col.prop(soft, "location_iterations")
135             col.prop(soft, "linear_stiffness", slider=True)
136             col.prop(soft, "dynamic_friction", slider=True)
137             col.prop(soft, "collision_margin", slider=True)
138             col.prop(soft, "use_bending_constraints", text="Bending Constraints")
139
140             col = split.column()
141             col.prop(soft, "use_shape_match")
142             sub = col.column()
143             sub.active = soft.use_shape_match
144             sub.prop(soft, "shape_threshold", slider=True)
145
146             col.separator()
147
148             col.label(text="Cluster Collision:")
149             col.prop(soft, "use_cluster_rigid_to_softbody")
150             col.prop(soft, "use_cluster_soft_to_softbody")
151             sub = col.column()
152             sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
153             sub.prop(soft, "cluster_iterations", text="Iterations")
154
155         elif physics_type == 'STATIC':
156             col = layout.column()
157             col.prop(game, "use_actor")
158             col.prop(game, "use_ghost")
159             col.prop(ob, "hide_render", text="Invisible")
160
161             layout.separator()
162
163             split = layout.split()
164
165             col = split.column()
166             col.label(text="Attributes:")
167             col.prop(game, "radius")
168
169             col = split.column()
170             sub = col.column()
171             sub.prop(game, "use_anisotropic_friction")
172             subsub = sub.column()
173             subsub.active = game.use_anisotropic_friction
174             subsub.prop(game, "friction_coefficients", text="", slider=True)
175
176         elif physics_type == 'SENSOR':
177             col = layout.column()
178             col.prop(game, "use_actor", text="Detect Actors")
179             col.prop(ob, "hide_render", text="Invisible")
180
181         elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
182             layout.prop(ob, "hide_render", text="Invisible")
183
184         elif physics_type == 'NAVMESH':
185             layout.operator("mesh.navmesh_face_copy")
186             layout.operator("mesh.navmesh_face_add")
187
188             layout.separator()
189
190             layout.operator("mesh.navmesh_reset")
191             layout.operator("mesh.navmesh_clear")
192
193         if physics_type not in {'NO_COLLISION', 'OCCLUDE'}:
194             layout.separator()
195             split = layout.split()
196
197             col = split.column()
198             col.prop(game, "collision_group")
199             col = split.column()
200             col.prop(game, "collision_mask")
201
202
203 class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
204     bl_label = "Collision Bounds"
205     COMPAT_ENGINES = {'BLENDER_GAME'}
206
207     @classmethod
208     def poll(cls, context):
209         game = context.object.game
210         rd = context.scene.render
211         return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC', 'CHARACTER'}) and (rd.engine in cls.COMPAT_ENGINES)
212
213     def draw_header(self, context):
214         game = context.active_object.game
215
216         self.layout.prop(game, "use_collision_bounds", text="")
217
218     def draw(self, context):
219         layout = self.layout
220
221         game = context.active_object.game
222
223         layout.active = game.use_collision_bounds
224         layout.prop(game, "collision_bounds_type", text="Bounds")
225
226         row = layout.row()
227         row.prop(game, "collision_margin", text="Margin", slider=True)
228         row.prop(game, "use_collision_compound", text="Compound")
229
230
231 class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
232     bl_label = "Create Obstacle"
233     COMPAT_ENGINES = {'BLENDER_GAME'}
234
235     @classmethod
236     def poll(cls, context):
237         game = context.object.game
238         rd = context.scene.render
239         return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'}) and (rd.engine in cls.COMPAT_ENGINES)
240
241     def draw_header(self, context):
242         game = context.active_object.game
243
244         self.layout.prop(game, "use_obstacle_create", text="")
245
246     def draw(self, context):
247         layout = self.layout
248
249         game = context.active_object.game
250
251         layout.active = game.use_obstacle_create
252
253         row = layout.row()
254         row.prop(game, "obstacle_radius", text="Radius")
255         row.label()
256
257
258 class RenderButtonsPanel():
259     bl_space_type = 'PROPERTIES'
260     bl_region_type = 'WINDOW'
261     bl_context = "render"
262
263     @classmethod
264     def poll(cls, context):
265         rd = context.scene.render
266         return (rd.engine in cls.COMPAT_ENGINES)
267
268
269 class RENDER_PT_embedded(RenderButtonsPanel, Panel):
270     bl_label = "Embedded Player"
271     COMPAT_ENGINES = {'BLENDER_GAME'}
272
273     def draw(self, context):
274         layout = self.layout
275
276         rd = context.scene.render
277
278         row = layout.row()
279         row.operator("view3d.game_start", text="Start")
280         row.label()
281         row = layout.row()
282         row.label(text="Resolution:")
283         row = layout.row(align=True)
284         row.prop(rd, "resolution_x", slider=False, text="X")
285         row.prop(rd, "resolution_y", slider=False, text="Y")
286
287
288 class RENDER_PT_game_player(RenderButtonsPanel, Panel):
289     bl_label = "Standalone Player"
290     COMPAT_ENGINES = {'BLENDER_GAME'}
291
292     def draw(self, context):
293         layout = self.layout
294
295         gs = context.scene.game_settings
296
297         row = layout.row()
298         row.operator("wm.blenderplayer_start", text="Start")
299         row.label()
300
301         row = layout.row()
302         row.label(text="Resolution:")
303         row = layout.row(align=True)
304         row.prop(gs, "resolution_x", slider=False, text="X")
305         row.prop(gs, "resolution_y", slider=False, text="Y")
306         row = layout.row()
307         col = row.column()
308         col.prop(gs, "show_fullscreen")
309         col = row.column()
310         col.prop(gs, "use_desktop")
311         col.active = gs.show_fullscreen
312
313         col = layout.column()
314         col.label(text="Quality:")
315         col.prop(gs, "samples")
316         col = layout.column(align=True)
317         col.prop(gs, "depth", text="Bit Depth", slider=False)
318         col.prop(gs, "frequency", text="Refresh Rate", slider=False)
319
320
321 class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
322     bl_label = "Stereo"
323     COMPAT_ENGINES = {'BLENDER_GAME'}
324
325     def draw(self, context):
326         layout = self.layout
327
328         gs = context.scene.game_settings
329         stereo_mode = gs.stereo
330
331         # stereo options:
332         layout.prop(gs, "stereo", expand=True)
333
334         # stereo:
335         if stereo_mode == 'STEREO':
336             layout.prop(gs, "stereo_mode")
337             layout.prop(gs, "stereo_eye_separation")
338
339         # dome:
340         elif stereo_mode == 'DOME':
341             layout.prop(gs, "dome_mode", text="Dome Type")
342
343             dome_type = gs.dome_mode
344
345             split = layout.split()
346
347             if dome_type in {'FISHEYE', 'TRUNCATED_REAR', 'TRUNCATED_FRONT'}:
348                 col = split.column()
349                 col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
350                 col.prop(gs, "dome_angle", slider=True)
351
352                 col = split.column()
353                 col.prop(gs, "dome_tessellation", text="Tessellation")
354                 col.prop(gs, "dome_tilt")
355
356             elif dome_type == 'PANORAM_SPH':
357                 col = split.column()
358                 col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
359
360                 col = split.column()
361                 col.prop(gs, "dome_tessellation", text="Tessellation")
362
363             else:  # cube map
364                 col = split.column()
365                 col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
366
367                 col = split.column()
368
369             layout.prop(gs, "dome_text")
370
371
372 class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
373     bl_label = "Shading"
374     COMPAT_ENGINES = {'BLENDER_GAME'}
375
376     def draw(self, context):
377         layout = self.layout
378
379         gs = context.scene.game_settings
380
381         layout.prop(gs, "material_mode", expand=True)
382
383         if gs.material_mode == 'GLSL':
384             split = layout.split()
385
386             col = split.column()
387             col.prop(gs, "use_glsl_lights", text="Lights")
388             col.prop(gs, "use_glsl_shaders", text="Shaders")
389             col.prop(gs, "use_glsl_shadows", text="Shadows")
390             col.prop(gs, "use_glsl_color_management", text="Color Management")
391
392             col = split.column()
393             col.prop(gs, "use_glsl_ramps", text="Ramps")
394             col.prop(gs, "use_glsl_nodes", text="Nodes")
395             col.prop(gs, "use_glsl_extra_textures", text="Extra Textures")
396
397
398 class RENDER_PT_game_system(RenderButtonsPanel, Panel):
399     bl_label = "System"
400     COMPAT_ENGINES = {'BLENDER_GAME'}
401
402     def draw(self, context):
403         layout = self.layout
404
405         gs = context.scene.game_settings
406         col = layout.column()
407         row = col.row()
408         col = row.column()
409         col.prop(gs, "use_frame_rate")
410         col.prop(gs, "use_restrict_animation_updates")
411         col.prop(gs, "use_material_caching")
412         col = row.column()
413         col.prop(gs, "use_display_lists")
414         col.active = gs.raster_storage != 'VERTEX_BUFFER_OBJECT'
415
416         row = layout.row()
417         row.prop(gs, "vsync")
418
419         row = layout.row()
420         row.prop(gs, "raster_storage")
421
422         row = layout.row()
423         row.label("Exit Key")
424         row.prop(gs, "exit_key", text="", event=True)
425
426
427 class RENDER_PT_game_display(RenderButtonsPanel, Panel):
428     bl_label = "Display"
429     COMPAT_ENGINES = {'BLENDER_GAME'}
430
431     def draw(self, context):
432         layout = self.layout
433
434         gs = context.scene.game_settings
435
436         layout.prop(context.scene.render, "fps", text="Animation Frame Rate", slider=False)
437
438         flow = layout.column_flow()
439         flow.prop(gs, "show_debug_properties", text="Debug Properties")
440         flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
441         flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
442         flow.prop(gs, "use_deprecation_warnings")
443         flow.prop(gs, "show_mouse", text="Mouse Cursor")
444
445         col = layout.column()
446         col.label(text="Framing:")
447         col.row().prop(gs, "frame_type", expand=True)
448         if gs.frame_type == 'LETTERBOX':
449             col.prop(gs, "frame_color", text="")
450
451
452 class SceneButtonsPanel():
453     bl_space_type = 'PROPERTIES'
454     bl_region_type = 'WINDOW'
455     bl_context = "scene"
456
457
458 class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel):
459     bl_label = "Navigation mesh"
460     bl_options = {'DEFAULT_CLOSED'}
461     COMPAT_ENGINES = {'BLENDER_GAME'}
462
463     @classmethod
464     def poll(cls, context):
465         scene = context.scene
466         return (scene and scene.render.engine in cls.COMPAT_ENGINES)
467
468     def draw(self, context):
469         layout = self.layout
470
471         rd = context.scene.game_settings.recast_data
472
473         layout.operator("mesh.navmesh_make", text="Build navigation mesh")
474
475         col = layout.column()
476         col.label(text="Rasterization:")
477         row = col.row()
478         row.prop(rd, "cell_size")
479         row.prop(rd, "cell_height")
480
481         col = layout.column()
482         col.label(text="Agent:")
483         split = col.split()
484
485         col = split.column()
486         col.prop(rd, "agent_height", text="Height")
487         col.prop(rd, "agent_radius", text="Radius")
488
489         col = split.column()
490         col.prop(rd, "slope_max")
491         col.prop(rd, "climb_max")
492
493         col = layout.column()
494         col.label(text="Region:")
495         row = col.row()
496         row.prop(rd, "region_min_size")
497         row.prop(rd, "region_merge_size")
498
499         col = layout.column()
500         col.label(text="Polygonization:")
501         split = col.split()
502
503         col = split.column()
504         col.prop(rd, "edge_max_len")
505         col.prop(rd, "edge_max_error")
506
507         split.prop(rd, "verts_per_poly")
508
509         col = layout.column()
510         col.label(text="Detail Mesh:")
511         row = col.row()
512         row.prop(rd, "sample_dist")
513         row.prop(rd, "sample_max_error")
514
515
516 class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
517     bl_label = "Sound"
518     COMPAT_ENGINES = {'BLENDER_GAME'}
519
520     def draw(self, context):
521         layout = self.layout
522
523         scene = context.scene
524
525         layout.prop(scene, "audio_distance_model")
526
527         col = layout.column(align=True)
528         col.prop(scene, "audio_doppler_speed", text="Speed")
529         col.prop(scene, "audio_doppler_factor")
530
531
532 class WorldButtonsPanel():
533     bl_space_type = 'PROPERTIES'
534     bl_region_type = 'WINDOW'
535     bl_context = "world"
536
537
538 class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
539     bl_label = ""
540     bl_options = {'HIDE_HEADER'}
541     COMPAT_ENGINES = {'BLENDER_GAME'}
542
543     @classmethod
544     def poll(cls, context):
545         rd = context.scene.render
546         return (context.scene) and (rd.use_game_engine)
547
548     def draw(self, context):
549         layout = self.layout
550
551         scene = context.scene
552         world = context.world
553         space = context.space_data
554
555         split = layout.split(percentage=0.65)
556         if scene:
557             split.template_ID(scene, "world", new="world.new")
558         elif world:
559             split.template_ID(space, "pin_id")
560
561
562 class WORLD_PT_game_world(WorldButtonsPanel, Panel):
563     bl_label = "World"
564     COMPAT_ENGINES = {'BLENDER_GAME'}
565
566     @classmethod
567     def poll(cls, context):
568         scene = context.scene
569         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
570
571     def draw(self, context):
572         layout = self.layout
573
574         world = context.world
575
576         row = layout.row()
577         row.column().prop(world, "horizon_color")
578         row.column().prop(world, "ambient_color")
579
580
581 class WORLD_PT_game_mist(WorldButtonsPanel, Panel):
582     bl_label = "Mist"
583     COMPAT_ENGINES = {'BLENDER_GAME'}
584
585     @classmethod
586     def poll(cls, context):
587         scene = context.scene
588         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
589
590     def draw_header(self, context):
591         world = context.world
592
593         self.layout.prop(world.mist_settings, "use_mist", text="")
594
595     def draw(self, context):
596         layout = self.layout
597
598         world = context.world
599
600         layout.active = world.mist_settings.use_mist
601
602         layout.prop(world.mist_settings, "falloff")
603
604         row = layout.row(align=True)
605         row.prop(world.mist_settings, "start")
606         row.prop(world.mist_settings, "depth")
607
608         layout.prop(world.mist_settings, "intensity", text="Minimum Intensity")
609
610
611 class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
612     bl_label = "Physics"
613     COMPAT_ENGINES = {'BLENDER_GAME'}
614
615     @classmethod
616     def poll(cls, context):
617         scene = context.scene
618         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
619
620     def draw(self, context):
621         layout = self.layout
622
623         gs = context.scene.game_settings
624
625         layout.prop(gs, "physics_engine", text="Engine")
626         if gs.physics_engine != 'NONE':
627             layout.prop(gs, "physics_gravity", text="Gravity")
628
629             split = layout.split()
630
631             col = split.column()
632             col.label(text="Physics Steps:")
633             sub = col.column(align=True)
634             sub.prop(gs, "physics_step_max", text="Max")
635             sub.prop(gs, "physics_step_sub", text="Substeps")
636             col.prop(gs, "fps", text="FPS")
637
638             col = split.column()
639             col.label(text="Logic Steps:")
640             col.prop(gs, "logic_step_max", text="Max")
641
642             col = layout.column()
643             col.label(text="Physics Deactivation:")
644             sub = col.row(align=True)
645             sub.prop(gs, "deactivation_linear_threshold", text="Linear Threshold")
646             sub.prop(gs, "deactivation_angular_threshold", text="Angular Threshold")
647             sub = col.row()
648             sub.prop(gs, "deactivation_time", text="Time")
649
650             col = layout.column()
651             col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
652             sub = col.column()
653             sub.active = gs.use_occlusion_culling
654             sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
655
656         else:
657             split = layout.split()
658
659             col = split.column()
660             col.label(text="Physics Steps:")
661             col.prop(gs, "fps", text="FPS")
662
663             col = split.column()
664             col.label(text="Logic Steps:")
665             col.prop(gs, "logic_step_max", text="Max")
666
667
668 class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
669     bl_label = "Obstacle simulation"
670     COMPAT_ENGINES = {'BLENDER_GAME'}
671
672     @classmethod
673     def poll(cls, context):
674         scene = context.scene
675         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
676
677     def draw(self, context):
678         layout = self.layout
679
680         gs = context.scene.game_settings
681
682         layout.prop(gs, "obstacle_simulation", text="Type")
683         if gs.obstacle_simulation != 'NONE':
684             layout.prop(gs, "level_height")
685             layout.prop(gs, "show_obstacle_simulation")
686
687
688 class DataButtonsPanel():
689     bl_space_type = 'PROPERTIES'
690     bl_region_type = 'WINDOW'
691     bl_context = "data"
692
693
694 class DATA_PT_shadow_game(DataButtonsPanel, Panel):
695     bl_label = "Shadow"
696     COMPAT_ENGINES = {'BLENDER_GAME'}
697
698     @classmethod
699     def poll(cls, context):
700         COMPAT_LIGHTS = {'SPOT', 'SUN'}
701         lamp = context.lamp
702         engine = context.scene.render.engine
703         return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
704
705     def draw_header(self, context):
706         lamp = context.lamp
707
708         self.layout.prop(lamp, "use_shadow", text="")
709
710     def draw(self, context):
711         layout = self.layout
712
713         lamp = context.lamp
714
715         layout.active = lamp.use_shadow
716
717         split = layout.split()
718
719         col = split.column()
720         col.prop(lamp, "shadow_color", text="")
721
722         col = split.column()
723         col.prop(lamp, "use_shadow_layer", text="This Layer Only")
724         col.prop(lamp, "use_only_shadow")
725
726         col = layout.column()
727         col.label("Buffer Type:")
728         col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
729         col.label("Quality:")
730         col = layout.column(align=True)
731         col.prop(lamp, "shadow_buffer_size", text="Size")
732         col.prop(lamp, "shadow_buffer_bias", text="Bias")
733         col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
734
735         row = layout.row()
736         row.label("Clipping:")
737         row = layout.row(align=True)
738         row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
739         row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
740
741         if lamp.type == 'SUN':
742             row = layout.row()
743             row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
744
745
746 if __name__ == "__main__":  # only for live edit.
747     bpy.utils.register_module(__name__)