a896855b217e23cb0c6b741a4ae0318e621559a5
[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, "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, "raster_storage")
418
419         row = layout.row()
420         row.label("Exit Key")
421         row.prop(gs, "exit_key", text="", event=True)
422
423
424 class RENDER_PT_game_display(RenderButtonsPanel, Panel):
425     bl_label = "Display"
426     COMPAT_ENGINES = {'BLENDER_GAME'}
427
428     def draw(self, context):
429         layout = self.layout
430
431         gs = context.scene.game_settings
432
433         layout.prop(context.scene.render, "fps", text="Animation Frame Rate", slider=False)
434
435         flow = layout.column_flow()
436         flow.prop(gs, "show_debug_properties", text="Debug Properties")
437         flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
438         flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
439         flow.prop(gs, "use_deprecation_warnings")
440         flow.prop(gs, "show_mouse", text="Mouse Cursor")
441
442         col = layout.column()
443         col.label(text="Framing:")
444         col.row().prop(gs, "frame_type", expand=True)
445         if gs.frame_type == 'LETTERBOX':
446             col.prop(gs, "frame_color", text="")
447
448
449 class SceneButtonsPanel():
450     bl_space_type = 'PROPERTIES'
451     bl_region_type = 'WINDOW'
452     bl_context = "scene"
453
454
455 class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel):
456     bl_label = "Navigation mesh"
457     bl_options = {'DEFAULT_CLOSED'}
458     COMPAT_ENGINES = {'BLENDER_GAME'}
459
460     @classmethod
461     def poll(cls, context):
462         scene = context.scene
463         return (scene and scene.render.engine in cls.COMPAT_ENGINES)
464
465     def draw(self, context):
466         layout = self.layout
467
468         rd = context.scene.game_settings.recast_data
469
470         layout.operator("mesh.navmesh_make", text="Build navigation mesh")
471
472         col = layout.column()
473         col.label(text="Rasterization:")
474         row = col.row()
475         row.prop(rd, "cell_size")
476         row.prop(rd, "cell_height")
477
478         col = layout.column()
479         col.label(text="Agent:")
480         split = col.split()
481
482         col = split.column()
483         col.prop(rd, "agent_height", text="Height")
484         col.prop(rd, "agent_radius", text="Radius")
485
486         col = split.column()
487         col.prop(rd, "slope_max")
488         col.prop(rd, "climb_max")
489
490         col = layout.column()
491         col.label(text="Region:")
492         row = col.row()
493         row.prop(rd, "region_min_size")
494         row.prop(rd, "region_merge_size")
495
496         col = layout.column()
497         col.label(text="Polygonization:")
498         split = col.split()
499
500         col = split.column()
501         col.prop(rd, "edge_max_len")
502         col.prop(rd, "edge_max_error")
503
504         split.prop(rd, "verts_per_poly")
505
506         col = layout.column()
507         col.label(text="Detail Mesh:")
508         row = col.row()
509         row.prop(rd, "sample_dist")
510         row.prop(rd, "sample_max_error")
511
512
513 class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
514     bl_label = "Sound"
515     COMPAT_ENGINES = {'BLENDER_GAME'}
516
517     def draw(self, context):
518         layout = self.layout
519
520         scene = context.scene
521
522         layout.prop(scene, "audio_distance_model")
523
524         col = layout.column(align=True)
525         col.prop(scene, "audio_doppler_speed", text="Speed")
526         col.prop(scene, "audio_doppler_factor")
527
528
529 class WorldButtonsPanel():
530     bl_space_type = 'PROPERTIES'
531     bl_region_type = 'WINDOW'
532     bl_context = "world"
533
534
535 class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
536     bl_label = ""
537     bl_options = {'HIDE_HEADER'}
538     COMPAT_ENGINES = {'BLENDER_GAME'}
539
540     @classmethod
541     def poll(cls, context):
542         rd = context.scene.render
543         return (context.scene) and (rd.use_game_engine)
544
545     def draw(self, context):
546         layout = self.layout
547
548         scene = context.scene
549         world = context.world
550         space = context.space_data
551
552         split = layout.split(percentage=0.65)
553         if scene:
554             split.template_ID(scene, "world", new="world.new")
555         elif world:
556             split.template_ID(space, "pin_id")
557
558
559 class WORLD_PT_game_world(WorldButtonsPanel, Panel):
560     bl_label = "World"
561     COMPAT_ENGINES = {'BLENDER_GAME'}
562
563     @classmethod
564     def poll(cls, context):
565         scene = context.scene
566         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
567
568     def draw(self, context):
569         layout = self.layout
570
571         world = context.world
572
573         row = layout.row()
574         row.column().prop(world, "horizon_color")
575         row.column().prop(world, "ambient_color")
576
577
578 class WORLD_PT_game_mist(WorldButtonsPanel, Panel):
579     bl_label = "Mist"
580     COMPAT_ENGINES = {'BLENDER_GAME'}
581
582     @classmethod
583     def poll(cls, context):
584         scene = context.scene
585         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
586
587     def draw_header(self, context):
588         world = context.world
589
590         self.layout.prop(world.mist_settings, "use_mist", text="")
591
592     def draw(self, context):
593         layout = self.layout
594
595         world = context.world
596
597         layout.active = world.mist_settings.use_mist
598
599         layout.prop(world.mist_settings, "falloff")
600
601         row = layout.row(align=True)
602         row.prop(world.mist_settings, "start")
603         row.prop(world.mist_settings, "depth")
604
605         layout.prop(world.mist_settings, "intensity", text="Minimum Intensity")
606
607
608 class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
609     bl_label = "Physics"
610     COMPAT_ENGINES = {'BLENDER_GAME'}
611
612     @classmethod
613     def poll(cls, context):
614         scene = context.scene
615         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
616
617     def draw(self, context):
618         layout = self.layout
619
620         gs = context.scene.game_settings
621
622         layout.prop(gs, "physics_engine")
623         if gs.physics_engine != 'NONE':
624             layout.prop(gs, "physics_gravity", text="Gravity")
625
626             split = layout.split()
627
628             col = split.column()
629             col.label(text="Physics Steps:")
630             sub = col.column(align=True)
631             sub.prop(gs, "physics_step_max", text="Max")
632             sub.prop(gs, "physics_step_sub", text="Substeps")
633             col.prop(gs, "fps", text="FPS")
634
635             col = split.column()
636             col.label(text="Logic Steps:")
637             col.prop(gs, "logic_step_max", text="Max")
638
639             col = layout.column()
640             col.label(text="Physics Deactivation:")
641             sub = col.row(align=True)
642             sub.prop(gs, "deactivation_linear_threshold", text="Linear Threshold")
643             sub.prop(gs, "deactivation_angular_threshold", text="Angular Threshold")
644             sub = col.row()
645             sub.prop(gs, "deactivation_time", text="Time")
646
647             col = layout.column()
648             col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
649             sub = col.column()
650             sub.active = gs.use_occlusion_culling
651             sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
652
653         else:
654             split = layout.split()
655
656             col = split.column()
657             col.label(text="Physics Steps:")
658             col.prop(gs, "fps", text="FPS")
659
660             col = split.column()
661             col.label(text="Logic Steps:")
662             col.prop(gs, "logic_step_max", text="Max")
663
664
665 class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
666     bl_label = "Obstacle simulation"
667     COMPAT_ENGINES = {'BLENDER_GAME'}
668
669     @classmethod
670     def poll(cls, context):
671         scene = context.scene
672         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
673
674     def draw(self, context):
675         layout = self.layout
676
677         gs = context.scene.game_settings
678
679         layout.prop(gs, "obstacle_simulation", text="Type")
680         if gs.obstacle_simulation != 'NONE':
681             layout.prop(gs, "level_height")
682             layout.prop(gs, "show_obstacle_simulation")
683
684
685 class DataButtonsPanel():
686     bl_space_type = 'PROPERTIES'
687     bl_region_type = 'WINDOW'
688     bl_context = "data"
689
690
691 class DATA_PT_shadow_game(DataButtonsPanel, Panel):
692     bl_label = "Shadow"
693     COMPAT_ENGINES = {'BLENDER_GAME'}
694
695     @classmethod
696     def poll(cls, context):
697         COMPAT_LIGHTS = {'SPOT', 'SUN'}
698         lamp = context.lamp
699         engine = context.scene.render.engine
700         return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
701
702     def draw_header(self, context):
703         lamp = context.lamp
704
705         self.layout.prop(lamp, "use_shadow", text="")
706
707     def draw(self, context):
708         layout = self.layout
709
710         lamp = context.lamp
711
712         layout.active = lamp.use_shadow
713
714         split = layout.split()
715
716         col = split.column()
717         col.prop(lamp, "shadow_color", text="")
718
719         col = split.column()
720         col.prop(lamp, "use_shadow_layer", text="This Layer Only")
721         col.prop(lamp, "use_only_shadow")
722
723         col = layout.column()
724         col.label("Buffer Type:")
725         col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
726         col.label("Quality:")
727         col = layout.column(align=True)
728         col.prop(lamp, "shadow_buffer_size", text="Size")
729         col.prop(lamp, "shadow_buffer_bias", text="Bias")
730         col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
731
732         row = layout.row()
733         row.label("Clipping:")
734         row = layout.row(align=True)
735         row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
736         row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
737
738         if lamp.type == 'SUN':
739             row = layout.row()
740             row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
741
742
743 if __name__ == "__main__":  # only for live edit.
744     bpy.utils.register_module(__name__)