1 # ##### BEGIN GPL LICENSE BLOCK #####
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.
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.
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.
17 # ##### END GPL LICENSE BLOCK #####
21 from bpy.types import Header, Menu, Panel
22 from bl_ui.properties_paint_common import UnifiedPaintPanel
25 class ImagePaintPanel(UnifiedPaintPanel):
26 bl_space_type = 'IMAGE_EDITOR'
30 class BrushButtonsPanel():
31 bl_space_type = 'IMAGE_EDITOR'
35 def poll(cls, context):
36 sima = context.space_data
37 toolsettings = context.tool_settings.image_paint
38 return sima.show_paint and toolsettings.brush
41 class IMAGE_MT_view(Menu):
44 def draw(self, context):
47 sima = context.space_data
49 toolsettings = context.tool_settings
51 show_uvedit = sima.show_uvedit
53 layout.operator("image.properties", icon='MENU_PANEL')
54 layout.operator("image.scopes", icon='MENU_PANEL')
58 layout.prop(sima, "use_realtime_update")
60 layout.prop(toolsettings, "show_uv_local_view")
62 layout.prop(uv, "show_other_objects")
66 layout.operator("image.view_zoom_in")
67 layout.operator("image.view_zoom_out")
71 ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
74 layout.operator("image.view_zoom_ratio", text="Zoom" + " %d:%d" % (a, b)).ratio = a / b
79 layout.operator("image.view_selected")
81 layout.operator("image.view_all")
85 layout.operator("screen.area_dupli")
86 layout.operator("screen.screen_full_area")
89 class IMAGE_MT_select(Menu):
92 def draw(self, context):
95 layout.operator("uv.select_border").pinned = False
96 layout.operator("uv.select_border", text="Border Select Pinned").pinned = True
100 layout.operator("uv.select_all").action = 'TOGGLE'
101 layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
102 layout.operator("uv.unlink_selected")
106 layout.operator("uv.select_pinned")
107 layout.operator("uv.select_linked")
110 class IMAGE_MT_image(Menu):
113 def draw(self, context):
116 sima = context.space_data
119 layout.operator("image.new")
120 layout.operator("image.open")
122 show_render = sima.show_render
126 layout.operator("image.replace")
127 layout.operator("image.reload")
129 layout.operator("image.save")
130 layout.operator("image.save_as")
131 layout.operator("image.save_as", text="Save a Copy").copy = True
133 if ima.source == 'SEQUENCE':
134 layout.operator("image.save_sequence")
136 layout.operator("image.external_edit", "Edit Externally")
140 layout.menu("IMAGE_MT_image_invert")
146 layout.operator("image.unpack")
148 layout.operator("image.pack")
150 # only for dirty && specific image types, perhaps
151 # this could be done in operator poll too
153 if ima.source in {'FILE', 'GENERATED'} and ima.type != 'OPEN_EXR_MULTILAYER':
154 layout.operator("image.pack", text="Pack As PNG").as_png = True
156 if not context.tool_settings.use_uv_sculpt:
158 layout.prop(sima, "use_image_paint")
163 class IMAGE_MT_image_invert(Menu):
166 def draw(self, context):
169 props = layout.operator("image.invert", text="Invert Image Colors")
170 props.invert_r = True
171 props.invert_g = True
172 props.invert_b = True
176 props = layout.operator("image.invert", text="Invert Red Channel")
177 props.invert_r = True
179 props = layout.operator("image.invert", text="Invert Green Channel")
180 props.invert_g = True
182 props = layout.operator("image.invert", text="Invert Blue Channel")
183 props.invert_b = True
185 props = layout.operator("image.invert", text="Invert Alpha Channel")
186 props.invert_a = True
189 class IMAGE_MT_uvs_showhide(Menu):
190 bl_label = "Show/Hide Faces"
192 def draw(self, context):
195 layout.operator("uv.reveal")
196 layout.operator("uv.hide", text="Hide Selected").unselected = False
197 layout.operator("uv.hide", text="Hide Unselected").unselected = True
200 class IMAGE_MT_uvs_transform(Menu):
201 bl_label = "Transform"
203 def draw(self, context):
206 layout.operator("transform.translate")
207 layout.operator("transform.rotate")
208 layout.operator("transform.resize")
212 layout.operator("transform.shear")
215 class IMAGE_MT_uvs_snap(Menu):
218 def draw(self, context):
220 layout.operator_context = 'EXEC_REGION_WIN'
222 layout.operator("uv.snap_selected", text="Selected to Pixels").target = 'PIXELS'
223 layout.operator("uv.snap_selected", text="Selected to Cursor").target = 'CURSOR'
224 layout.operator("uv.snap_selected", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED'
228 layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS'
229 layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED'
232 class IMAGE_MT_uvs_mirror(Menu):
235 def draw(self, context):
237 layout.operator_context = 'EXEC_REGION_WIN'
239 layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True
240 layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
243 class IMAGE_MT_uvs_weldalign(Menu):
244 bl_label = "Weld/Align"
246 def draw(self, context):
249 layout.operator("uv.weld") # W, 1
250 layout.operator_enum("uv.align", "axis") # W, 2/3/4
253 class IMAGE_MT_uvs(Menu):
256 def draw(self, context):
259 sima = context.space_data
261 toolsettings = context.tool_settings
263 layout.prop(uv, "use_snap_to_pixels")
264 layout.prop(uv, "lock_bounds")
268 layout.prop(toolsettings, "use_uv_sculpt")
272 layout.prop(uv, "use_live_unwrap")
273 layout.operator("uv.unwrap")
274 layout.operator("uv.pin", text="Unpin").clear = True
275 layout.operator("uv.pin")
279 layout.operator("uv.pack_islands")
280 layout.operator("uv.average_islands_scale")
281 layout.operator("uv.minimize_stretch")
282 layout.operator("uv.stitch")
283 layout.operator("uv.mark_seam")
284 layout.operator("uv.seams_from_islands")
285 layout.operator("mesh.faces_mirror_uv")
289 layout.menu("IMAGE_MT_uvs_transform")
290 layout.menu("IMAGE_MT_uvs_mirror")
291 layout.menu("IMAGE_MT_uvs_snap")
292 layout.menu("IMAGE_MT_uvs_weldalign")
296 layout.prop_menu_enum(toolsettings, "proportional_edit")
297 layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
301 layout.menu("IMAGE_MT_uvs_showhide")
304 class IMAGE_MT_uvs_select_mode(Menu):
305 bl_label = "UV Select Mode"
307 def draw(self, context):
310 layout.operator_context = 'INVOKE_REGION_WIN'
311 toolsettings = context.tool_settings
313 # do smart things depending on whether uv_select_sync is on
315 if toolsettings.use_uv_select_sync:
316 props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
317 props.value = "(True, False, False)"
318 props.data_path = "tool_settings.mesh_select_mode"
320 props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
321 props.value = "(False, True, False)"
322 props.data_path = "tool_settings.mesh_select_mode"
324 props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
325 props.value = "(False, False, True)"
326 props.data_path = "tool_settings.mesh_select_mode"
329 props = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
330 props.value = 'VERTEX'
331 props.data_path = "tool_settings.uv_select_mode"
333 props = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
335 props.data_path = "tool_settings.uv_select_mode"
337 props = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
339 props.data_path = "tool_settings.uv_select_mode"
341 props = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
342 props.value = 'ISLAND'
343 props.data_path = "tool_settings.uv_select_mode"
346 class IMAGE_HT_header(Header):
347 bl_space_type = 'IMAGE_EDITOR'
349 def draw(self, context):
352 sima = context.space_data
354 iuser = sima.image_user
355 toolsettings = context.tool_settings
357 show_render = sima.show_render
358 # show_paint = sima.show_paint
359 show_uvedit = sima.show_uvedit
361 row = layout.row(align=True)
362 row.template_header()
365 if context.area.show_menus:
366 sub = row.row(align=True)
367 sub.menu("IMAGE_MT_view")
370 sub.menu("IMAGE_MT_select")
372 if ima and ima.is_dirty:
373 sub.menu("IMAGE_MT_image", text="Image*")
375 sub.menu("IMAGE_MT_image", text="Image")
378 sub.menu("IMAGE_MT_uvs")
380 layout.template_ID(sima, "image", new="image.new")
382 layout.prop(sima, "use_image_pin", text="")
386 uvedit = sima.uv_editor
388 layout.prop(uvedit, "pivot_point", text="", icon_only=True)
389 layout.prop(toolsettings, "use_uv_select_sync", text="")
391 if toolsettings.use_uv_select_sync:
392 layout.template_edit_mode_selection()
394 layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
395 layout.prop(uvedit, "sticky_select_mode", text="", icon_only=True)
397 row = layout.row(align=True)
398 row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
399 if toolsettings.proportional_edit != 'DISABLED':
400 row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
402 row = layout.row(align=True)
403 row.prop(toolsettings, "use_snap", text="")
404 row.prop(toolsettings, "snap_target", text="")
406 mesh = context.edit_object.data
407 layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="")
411 layout.template_image_layers(ima, iuser)
414 layout.prop(sima, "use_image_paint", text="")
417 row = layout.row(align=True)
418 row.prop(sima, "draw_channels", text="", expand=True)
420 row = layout.row(align=True)
421 if ima.type == 'COMPOSITE':
422 row.operator("image.record_composite", icon='REC')
423 if ima.type == 'COMPOSITE' and ima.source in {'MOVIE', 'SEQUENCE'}:
424 row.operator("image.play_composite", icon='PLAY')
426 if show_uvedit or sima.use_image_paint:
427 layout.prop(sima, "use_realtime_update", text="", icon_only=True, icon='LOCKED')
430 class IMAGE_PT_display_properties(Panel):
431 bl_space_type = 'IMAGE_EDITOR'
432 bl_region_type = 'UI'
433 bl_label = "Display Properties"
435 def draw(self, context):
438 sima = context.space_data
439 window = context.window
440 view_settings = sima.view_settings
442 # OCIO_TODO: de-duplicate this between different spaces
443 col = layout.column()
444 col.prop(window, "display_device", text="Display")
445 col.prop(view_settings, "view_transform", text="View")
447 col = layout.column()
448 col.active = view_settings.view_transform not in {'ACES ODT Tonecurve', 'NONE'}
449 col.prop(view_settings, "exposure")
450 col.prop(view_settings, "gamma")
453 class IMAGE_PT_image_properties(Panel):
454 bl_space_type = 'IMAGE_EDITOR'
455 bl_region_type = 'UI'
459 def poll(cls, context):
460 sima = context.space_data
463 def draw(self, context):
466 sima = context.space_data
467 iuser = sima.image_user
469 layout.template_image(sima, "image", iuser)
472 class IMAGE_PT_game_properties(Panel):
473 bl_space_type = 'IMAGE_EDITOR'
474 bl_region_type = 'UI'
475 bl_label = "Game Properties"
478 def poll(cls, context):
479 sima = context.space_data
480 # display even when not in game mode because these settings effect the 3d view
481 return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME')
483 def draw(self, context):
486 sima = context.space_data
489 split = layout.split()
493 col.prop(ima, "use_animation")
494 sub = col.column(align=True)
495 sub.active = ima.use_animation
496 sub.prop(ima, "frame_start", text="Start")
497 sub.prop(ima, "frame_end", text="End")
498 sub.prop(ima, "fps", text="Speed")
500 col.prop(ima, "use_tiles")
501 sub = col.column(align=True)
502 sub.active = ima.use_tiles or ima.use_animation
503 sub.prop(ima, "tiles_x", text="X")
504 sub.prop(ima, "tiles_y", text="Y")
507 col.label(text="Clamp:")
508 col.prop(ima, "use_clamp_x", text="X")
509 col.prop(ima, "use_clamp_y", text="Y")
511 col.prop(ima, "mapping", expand=True)
514 class IMAGE_PT_view_histogram(Panel):
515 bl_space_type = 'IMAGE_EDITOR'
516 bl_region_type = 'PREVIEW'
517 bl_label = "Histogram"
520 def poll(cls, context):
521 sima = context.space_data
522 return (sima and sima.image)
524 def draw(self, context):
527 sima = context.space_data
528 hist = sima.scopes.histogram
530 layout.template_histogram(sima.scopes, "histogram")
531 row = layout.row(align=True)
532 row.prop(hist, "mode", icon_only=True, expand=True)
533 row.prop(hist, "show_line", text="")
536 class IMAGE_PT_view_waveform(Panel):
537 bl_space_type = 'IMAGE_EDITOR'
538 bl_region_type = 'PREVIEW'
539 bl_label = "Waveform"
542 def poll(cls, context):
543 sima = context.space_data
544 return (sima and sima.image)
546 def draw(self, context):
549 sima = context.space_data
551 layout.template_waveform(sima, "scopes")
552 row = layout.split(percentage=0.75)
553 row.prop(sima.scopes, "waveform_alpha")
554 row.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
557 class IMAGE_PT_view_vectorscope(Panel):
558 bl_space_type = 'IMAGE_EDITOR'
559 bl_region_type = 'PREVIEW'
560 bl_label = "Vectorscope"
563 def poll(cls, context):
564 sima = context.space_data
565 return (sima and sima.image)
567 def draw(self, context):
570 sima = context.space_data
571 layout.template_vectorscope(sima, "scopes")
572 layout.prop(sima.scopes, "vectorscope_alpha")
575 class IMAGE_PT_sample_line(Panel):
576 bl_space_type = 'IMAGE_EDITOR'
577 bl_region_type = 'PREVIEW'
578 bl_label = "Sample Line"
581 def poll(cls, context):
582 sima = context.space_data
583 return (sima and sima.image)
585 def draw(self, context):
588 sima = context.space_data
589 hist = sima.sample_histogram
591 layout.operator("image.sample_line")
592 layout.template_histogram(sima, "sample_histogram")
593 row = layout.row(align=True)
594 row.prop(hist, "mode", expand=True)
595 row.prop(hist, "show_line", text="")
598 class IMAGE_PT_scope_sample(Panel):
599 bl_space_type = 'IMAGE_EDITOR'
600 bl_region_type = 'PREVIEW'
601 bl_label = "Scope Samples"
604 def poll(cls, context):
605 sima = context.space_data
608 def draw(self, context):
611 sima = context.space_data
614 row.prop(sima.scopes, "use_full_resolution")
616 sub.active = not sima.scopes.use_full_resolution
617 sub.prop(sima.scopes, "accuracy")
620 class IMAGE_PT_view_properties(Panel):
621 bl_space_type = 'IMAGE_EDITOR'
622 bl_region_type = 'UI'
626 def poll(cls, context):
627 sima = context.space_data
628 return (sima and (sima.image or sima.show_uvedit))
630 def draw(self, context):
633 sima = context.space_data
635 show_uvedit = sima.show_uvedit
636 uvedit = sima.uv_editor
638 split = layout.split()
642 col.prop(ima, "display_aspect", text="Aspect Ratio")
645 col.label(text="Coordinates:")
646 col.prop(sima, "show_repeat", text="Repeat")
648 col.prop(uvedit, "show_normalized_coords", text="Normalized")
651 col.label(text="Coordinates:")
652 col.prop(uvedit, "show_normalized_coords", text="Normalized")
656 col = layout.column()
657 col.label("Cursor Location:")
658 col.row().prop(uvedit, "cursor_location", text="")
662 col.label(text="UVs:")
663 col.row().prop(uvedit, "edge_draw_type", expand=True)
665 split = layout.split()
668 col.prop(uvedit, "show_faces")
669 col.prop(uvedit, "show_smooth_edges", text="Smooth")
670 col.prop(uvedit, "show_modified_edges", text="Modified")
673 col.prop(uvedit, "show_stretch", text="Stretch")
675 sub.active = uvedit.show_stretch
676 sub.row().prop(uvedit, "draw_stretch_type", expand=True)
679 class IMAGE_PT_paint(Panel, ImagePaintPanel):
680 bl_space_type = 'IMAGE_EDITOR'
681 bl_region_type = 'UI'
685 def poll(cls, context):
686 sima = context.space_data
687 return sima.show_paint
689 def draw(self, context):
692 toolsettings = context.tool_settings.image_paint
693 brush = toolsettings.brush
695 col = layout.column()
696 col.template_ID_preview(toolsettings, "brush", new="brush.add", rows=2, cols=6)
699 col = layout.column()
700 col.template_color_wheel(brush, "color", value_slider=True)
701 col.prop(brush, "color", text="")
703 row = col.row(align=True)
704 self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
705 self.prop_unified_size(row, context, brush, "use_pressure_size")
707 row = col.row(align=True)
708 self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
709 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
711 row = col.row(align=True)
712 row.prop(brush, "jitter", slider=True)
713 row.prop(brush, "use_pressure_jitter", toggle=True, text="")
715 col.prop(brush, "blend", text="Blend")
717 if brush.image_tool == 'CLONE':
719 col.prop(brush, "clone_image", text="Image")
720 col.prop(brush, "clone_alpha", text="Alpha")
723 class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
725 bl_options = {'DEFAULT_CLOSED'}
727 def draw(self, context):
730 toolsettings = context.tool_settings.image_paint
731 brush = toolsettings.brush
733 col = layout.column()
734 col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
735 col.prop(brush, "use_fixed_texture")
738 class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
740 bl_options = {'DEFAULT_CLOSED'}
742 def draw(self, context):
744 toolsettings = context.tool_settings.image_paint
745 brush = toolsettings.brush
747 layout.prop(brush, "image_tool", text="")
749 row = layout.row(align=True)
750 row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
751 row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
752 row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
753 row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
756 class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
757 bl_label = "Paint Stroke"
758 bl_options = {'DEFAULT_CLOSED'}
760 def draw(self, context):
763 toolsettings = context.tool_settings.image_paint
764 brush = toolsettings.brush
766 layout.prop(brush, "use_airbrush")
768 row.active = brush.use_airbrush
769 row.prop(brush, "rate", slider=True)
771 layout.prop(brush, "use_space")
772 row = layout.row(align=True)
773 row.active = brush.use_space
774 row.prop(brush, "spacing", text="Distance", slider=True)
775 row.prop(brush, "use_pressure_spacing", toggle=True, text="")
777 layout.prop(brush, "use_wrap")
780 class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
781 bl_label = "Paint Curve"
782 bl_options = {'DEFAULT_CLOSED'}
784 def draw(self, context):
787 toolsettings = context.tool_settings.image_paint
788 brush = toolsettings.brush
790 layout.template_curve_mapping(brush, "curve")
792 row = layout.row(align=True)
793 row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
794 row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
795 row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
796 row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
797 row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
798 row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
801 class IMAGE_UV_sculpt_curve(Panel):
802 bl_space_type = 'IMAGE_EDITOR'
803 bl_region_type = 'UI'
804 bl_label = "UV Sculpt Curve"
805 bl_options = {'DEFAULT_CLOSED'}
808 def poll(cls, context):
809 sima = context.space_data
810 toolsettings = context.tool_settings.image_paint
811 return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
813 def draw(self, context):
816 toolsettings = context.tool_settings
817 uvsculpt = toolsettings.uv_sculpt
818 brush = uvsculpt.brush
820 layout.template_curve_mapping(brush, "curve")
822 row = layout.row(align=True)
823 row.operator("brush.curve_preset", icon="SMOOTHCURVE", text="").shape = 'SMOOTH'
824 row.operator("brush.curve_preset", icon="SPHERECURVE", text="").shape = 'ROUND'
825 row.operator("brush.curve_preset", icon="ROOTCURVE", text="").shape = 'ROOT'
826 row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP'
827 row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
828 row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
831 class IMAGE_UV_sculpt(Panel, ImagePaintPanel):
832 bl_space_type = 'IMAGE_EDITOR'
833 bl_region_type = 'UI'
834 bl_label = "UV Sculpt"
837 def poll(cls, context):
838 sima = context.space_data
839 toolsettings = context.tool_settings.image_paint
840 return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
842 def draw(self, context):
845 toolsettings = context.tool_settings
846 uvsculpt = toolsettings.uv_sculpt
847 brush = uvsculpt.brush
850 col = layout.column()
852 row = col.row(align=True)
853 self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
854 self.prop_unified_size(row, context, brush, "use_pressure_size")
856 row = col.row(align=True)
857 self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
858 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
860 split = layout.split()
863 col.prop(toolsettings, "uv_sculpt_lock_borders")
864 col.prop(toolsettings, "uv_sculpt_all_islands")
866 split = layout.split()
869 col.prop(toolsettings, "uv_sculpt_tool")
871 if toolsettings.uv_sculpt_tool == 'RELAX':
872 col.prop(toolsettings, "uv_relax_method")
875 if __name__ == "__main__": # only for live edit.
876 bpy.utils.register_module(__name__)