Cleanup: use staticmethod where appropriate
[blender.git] / release / scripts / startup / bl_ui / space_topbar.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 Header, Menu, Panel
22
23
24 class TOPBAR_HT_upper_bar(Header):
25     bl_space_type = 'TOPBAR'
26
27     def draw(self, context):
28         region = context.region
29
30         if region.alignment == 'RIGHT':
31             self.draw_right(context)
32         else:
33             self.draw_left(context)
34
35     def draw_left(self, context):
36         layout = self.layout
37
38         window = context.window
39         screen = context.screen
40
41         layout.operator("wm.splash", text="", icon='BLENDER', emboss=False)
42
43         TOPBAR_MT_editor_menus.draw_collapsible(context, layout)
44
45         layout.separator()
46
47         if not screen.show_fullscreen:
48             layout.template_ID_tabs(
49                 window, "workspace",
50                 new="workspace.add",
51                 menu="TOPBAR_MT_workspace_menu",
52             )
53         else:
54             layout.operator(
55                 "screen.back_to_previous",
56                 icon='SCREEN_BACK',
57                 text="Back to Previous",
58             )
59
60     def draw_right(self, context):
61         layout = self.layout
62
63         window = context.window
64         screen = context.screen
65         scene = window.scene
66
67         # If statusbar is hidden, still show messages at the top
68         if not screen.show_statusbar:
69             layout.template_reports_banner()
70             layout.template_running_jobs()
71
72         # Active workspace view-layer is retrieved through window, not through workspace.
73         layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete")
74
75         row = layout.row(align=True)
76         row.template_search(
77             window, "view_layer",
78             scene, "view_layers",
79             new="scene.view_layer_add",
80             unlink="scene.view_layer_remove")
81
82
83 class TOPBAR_PT_gpencil_layers(Panel):
84     bl_space_type = 'VIEW_3D'
85     bl_region_type = 'HEADER'
86     bl_label = "Layers"
87     bl_ui_units_x = 14
88
89     @classmethod
90     def poll(cls, context):
91         if context.gpencil_data is None:
92             return False
93
94         ob = context.object
95         if ob is not None and ob.type == 'GPENCIL':
96             return True
97
98         return False
99
100     def draw(self, context):
101         layout = self.layout
102         gpd = context.gpencil_data
103
104         # Grease Pencil data...
105         if (gpd is None) or (not gpd.layers):
106             layout.operator("gpencil.layer_add", text="New Layer")
107         else:
108             self.draw_layers(context, layout, gpd)
109
110     def draw_layers(self, context, layout, gpd):
111         row = layout.row()
112
113         col = row.column()
114         layer_rows = 10
115         col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
116                           rows=layer_rows, sort_reverse=True, sort_lock=True)
117
118         gpl = context.active_gpencil_layer
119         if gpl:
120             srow = col.row(align=True)
121             srow.prop(gpl, "blend_mode", text="Blend")
122
123             srow = col.row(align=True)
124             srow.prop(gpl, "opacity", text="Opacity", slider=True)
125             srow.prop(gpl, "clamp_layer", text="",
126                       icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE')
127
128             srow = col.row(align=True)
129             srow.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
130
131         col = row.column()
132
133         sub = col.column(align=True)
134         sub.operator("gpencil.layer_add", icon='ADD', text="")
135         sub.operator("gpencil.layer_remove", icon='REMOVE', text="")
136
137         gpl = context.active_gpencil_layer
138         if gpl:
139             sub.menu("GPENCIL_MT_layer_context_menu", icon='DOWNARROW_HLT', text="")
140
141             if len(gpd.layers) > 1:
142                 col.separator()
143
144                 sub = col.column(align=True)
145                 sub.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP'
146                 sub.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN'
147
148                 col.separator()
149
150                 sub = col.column(align=True)
151                 sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
152                 sub.operator("gpencil.layer_isolate", icon='HIDE_OFF', text="").affect_visibility = True
153
154
155 class TOPBAR_MT_editor_menus(Menu):
156     bl_idname = "TOPBAR_MT_editor_menus"
157     bl_label = ""
158
159     def draw(self, _context):
160         layout = self.layout
161         layout.menu("TOPBAR_MT_file")
162         layout.menu("TOPBAR_MT_edit")
163
164         layout.menu("TOPBAR_MT_render")
165
166         layout.menu("TOPBAR_MT_window")
167         layout.menu("TOPBAR_MT_help")
168
169
170 class TOPBAR_MT_file(Menu):
171     bl_label = "File"
172
173     def draw(self, context):
174         layout = self.layout
175
176         layout.operator_context = 'INVOKE_AREA'
177         layout.menu("TOPBAR_MT_file_new", text="New", icon='FILE_NEW')
178         layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
179         layout.menu("TOPBAR_MT_file_open_recent")
180         layout.operator("wm.revert_mainfile")
181         layout.operator("wm.recover_last_session")
182         layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
183
184         layout.separator()
185
186         layout.operator_context = 'EXEC_AREA' if context.blend_data.is_saved else 'INVOKE_AREA'
187         layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK')
188
189         layout.operator_context = 'INVOKE_AREA'
190         layout.operator("wm.save_as_mainfile", text="Save As...")
191         layout.operator_context = 'INVOKE_AREA'
192         layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
193
194         layout.separator()
195         layout.operator_context = 'INVOKE_AREA'
196
197         if any(bpy.utils.app_template_paths()):
198             app_template = context.preferences.app_template
199         else:
200             app_template = None
201
202         if app_template:
203             layout.label(text=bpy.path.display_name(app_template, has_ext=False))
204             layout.operator("wm.save_homefile")
205             layout.operator(
206                 "wm.read_factory_settings",
207                 text="Load Factory Settings",
208             ).app_template = app_template
209         else:
210             layout.operator("wm.save_homefile")
211             layout.operator("wm.read_factory_settings")
212
213         layout.separator()
214
215         layout.operator("preferences.app_template_install", text="Install Application Template...")
216
217         layout.separator()
218
219         layout.operator_context = 'INVOKE_AREA'
220         layout.operator("wm.link", text="Link...", icon='LINK_BLEND')
221         layout.operator("wm.append", text="Append...", icon='APPEND_BLEND')
222         layout.menu("TOPBAR_MT_file_previews")
223
224         layout.separator()
225
226         layout.menu("TOPBAR_MT_file_import", icon='IMPORT')
227         layout.menu("TOPBAR_MT_file_export", icon='EXPORT')
228
229         layout.separator()
230
231         layout.menu("TOPBAR_MT_file_external_data")
232
233         layout.separator()
234
235         layout.operator_context = 'EXEC_AREA'
236         if bpy.data.is_dirty:
237             layout.operator_context = 'INVOKE_SCREEN'  # quit dialog
238         layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
239
240
241 class TOPBAR_MT_file_new(Menu):
242     bl_label = "New File"
243
244     @staticmethod
245     def app_template_paths():
246         import os
247
248         template_paths = bpy.utils.app_template_paths()
249
250         # expand template paths
251         app_templates = []
252         for path in template_paths:
253             for d in os.listdir(path):
254                 if d.startswith(("__", ".")):
255                     continue
256                 template = os.path.join(path, d)
257                 if os.path.isdir(template):
258                     # template_paths_expand.append(template)
259                     app_templates.append(d)
260
261         return sorted(app_templates)
262
263     @staticmethod
264     def draw_ex(layout, _context, *, use_splash=False, use_more=False):
265         layout.operator_context = 'EXEC_DEFAULT'
266
267         # Limit number of templates in splash screen, spill over into more menu.
268         paths = TOPBAR_MT_file_new.app_template_paths()
269         splash_limit = 5
270
271         if use_splash:
272             icon = 'FILE_NEW'
273             show_more = len(paths) > (splash_limit - 1)
274             if show_more:
275                 paths = paths[:splash_limit - 2]
276         elif use_more:
277             icon = 'FILE_NEW'
278             paths = paths[splash_limit - 2:]
279             show_more = False
280         else:
281             icon = 'NONE'
282             show_more = False
283
284         # Draw application templates.
285         if not use_more:
286             props = layout.operator("wm.read_homefile", text="General", icon=icon)
287             props.app_template = ""
288
289         for d in paths:
290             props = layout.operator(
291                 "wm.read_homefile",
292                 text=bpy.path.display_name(d),
293                 icon=icon,
294             )
295             props.app_template = d
296
297         if show_more:
298             layout.menu("TOPBAR_MT_templates_more", text="...")
299
300     def draw(self, context):
301         TOPBAR_MT_file_new.draw_ex(self.layout, context)
302
303
304 class TOPBAR_MT_templates_more(Menu):
305     bl_label = "Templates"
306
307     def draw(self, context):
308         bpy.types.TOPBAR_MT_file_new.draw_ex(self.layout, context, use_more=True)
309
310
311 class TOPBAR_MT_file_import(Menu):
312     bl_idname = "TOPBAR_MT_file_import"
313     bl_label = "Import"
314
315     def draw(self, _context):
316         if bpy.app.build_options.collada:
317             self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)")
318         if bpy.app.build_options.alembic:
319             self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
320
321
322 class TOPBAR_MT_file_export(Menu):
323     bl_idname = "TOPBAR_MT_file_export"
324     bl_label = "Export"
325
326     def draw(self, _context):
327         if bpy.app.build_options.collada:
328             self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)")
329         if bpy.app.build_options.alembic:
330             self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
331
332
333 class TOPBAR_MT_file_external_data(Menu):
334     bl_label = "External Data"
335
336     def draw(self, _context):
337         layout = self.layout
338
339         icon = 'CHECKBOX_HLT' if bpy.data.use_autopack else 'CHECKBOX_DEHLT'
340         layout.operator("file.autopack_toggle", icon=icon)
341
342         layout.separator()
343
344         pack_all = layout.row()
345         pack_all.operator("file.pack_all")
346         pack_all.active = not bpy.data.use_autopack
347
348         unpack_all = layout.row()
349         unpack_all.operator("file.unpack_all")
350         unpack_all.active = not bpy.data.use_autopack
351
352         layout.separator()
353
354         layout.operator("file.make_paths_relative")
355         layout.operator("file.make_paths_absolute")
356         layout.operator("file.report_missing_files")
357         layout.operator("file.find_missing_files")
358
359
360 class TOPBAR_MT_file_previews(Menu):
361     bl_label = "Data Previews"
362
363     def draw(self, _context):
364         layout = self.layout
365
366         layout.operator("wm.previews_ensure")
367         layout.operator("wm.previews_batch_generate")
368
369         layout.separator()
370
371         layout.operator("wm.previews_clear")
372         layout.operator("wm.previews_batch_clear")
373
374
375 class TOPBAR_MT_render(Menu):
376     bl_label = "Render"
377
378     def draw(self, context):
379         layout = self.layout
380
381         rd = context.scene.render
382
383         layout.operator("render.render", text="Render Image", icon='RENDER_STILL').use_viewport = True
384         props = layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION')
385         props.animation = True
386         props.use_viewport = True
387
388         layout.separator()
389
390         layout.operator("sound.mixdown", text="Render Audio...")
391
392         layout.separator()
393
394         layout.operator("render.view_show", text="View Render")
395         layout.operator("render.play_rendered_anim", text="View Animation")
396         layout.prop_menu_enum(rd, "display_mode", text="Display Mode")
397
398         layout.separator()
399
400         layout.prop(rd, "use_lock_interface", text="Lock Interface")
401
402
403 class TOPBAR_MT_edit(Menu):
404     bl_label = "Edit"
405
406     def draw(self, context):
407         layout = self.layout
408
409         layout.operator("ed.undo")
410         layout.operator("ed.redo")
411
412         layout.separator()
413
414         layout.operator("ed.undo_history", text="Undo History...")
415
416         layout.separator()
417
418         layout.operator("screen.repeat_last")
419         layout.operator("screen.repeat_history", text="Repeat History...")
420
421         layout.separator()
422
423         layout.operator("screen.redo_last", text="Adjust Last Operation...")
424
425         layout.separator()
426
427         layout.operator("wm.search_menu", text="Operator Search...", icon='VIEWZOOM')
428
429         layout.separator()
430
431         # Mainly to expose shortcut since this depends on the context.
432         props = layout.operator("wm.call_panel", text="Rename Active Item...", icon='OUTLINER_DATA_FONT')
433         props.name = "TOPBAR_PT_name"
434         props.keep_open = False
435
436         layout.separator()
437
438         # Should move elsewhere (impacts outliner & 3D view).
439         tool_settings = context.tool_settings
440         layout.prop(tool_settings, "lock_object_mode")
441
442         layout.separator()
443
444         layout.operator("screen.userpref_show", text="Preferences...", icon='PREFERENCES')
445
446
447 class TOPBAR_MT_window(Menu):
448     bl_label = "Window"
449
450     def draw(self, context):
451         import sys
452
453         layout = self.layout
454
455         layout.operator("wm.window_new")
456         layout.operator("wm.window_new_main")
457
458         layout.separator()
459
460         layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
461
462         layout.separator()
463
464         layout.operator("screen.workspace_cycle", text="Next Workspace").direction = 'NEXT'
465         layout.operator("screen.workspace_cycle", text="Previous Workspace").direction = 'PREV'
466
467         layout.separator()
468
469         layout.prop(context.screen, "show_statusbar")
470
471         layout.separator()
472
473         layout.operator("screen.screenshot")
474
475         if sys.platform[:3] == "win":
476             layout.separator()
477             layout.operator("wm.console_toggle", icon='CONSOLE')
478
479         if context.scene.render.use_multiview:
480             layout.separator()
481             layout.operator("wm.set_stereo_3d")
482
483
484 class TOPBAR_MT_help(Menu):
485     bl_label = "Help"
486
487     def draw(self, context):
488         # If 'url_prefill_from_blender' becomes slow it could be made into a separate operator
489         # to avoid constructing the bug report just to show this menu.
490         from bl_ui_utils.bug_report_url import url_prefill_from_blender
491
492         layout = self.layout
493
494         show_developer = context.preferences.view.show_developer_ui
495
496         layout.operator(
497             "wm.url_open", text="Manual", icon='HELP',
498         ).url = "https://docs.blender.org/manual/en/dev/"
499
500         layout.operator(
501             "wm.url_open", text="Report a Bug", icon='URL',
502         ).url = url_prefill_from_blender()
503
504         layout.separator()
505
506         layout.operator(
507             "wm.url_open", text="User Communities", icon='URL',
508         ).url = "https://www.blender.org/community/"
509         layout.operator(
510             "wm.url_open", text="Developer Community", icon='URL',
511         ).url = "https://www.blender.org/get-involved/developers/"
512
513         layout.separator()
514
515         layout.operator(
516             "wm.url_open", text="Blender Website", icon='URL',
517         ).url = "https://www.blender.org"
518         layout.operator(
519             "wm.url_open", text="Release Notes", icon='URL',
520         ).url = "https://www.blender.org/download/releases/%d-%d/" % bpy.app.version[:2]
521         layout.operator(
522             "wm.url_open", text="Credits", icon='URL',
523         ).url = "https://www.blender.org/about/credits/"
524
525         layout.separator()
526
527         layout.operator(
528             "wm.url_open", text="Blender Store", icon='URL',
529         ).url = "https://store.blender.org"
530         layout.operator(
531             "wm.url_open", text="Development Fund", icon='URL',
532         ).url = "https://fund.blender.org"
533         layout.operator(
534             "wm.url_open", text="Donate", icon='URL',
535         ).url = "https://www.blender.org/foundation/donation-payment/"
536
537         layout.separator()
538
539         if show_developer:
540             layout.operator(
541                 "wm.url_open", text="Python API Reference", icon='URL',
542             ).url = bpy.types.WM_OT_doc_view._prefix
543
544             layout.operator("wm.operator_cheat_sheet", icon='TEXT')
545
546         layout.operator("wm.sysinfo")
547
548         layout.separator()
549
550         layout.operator("wm.splash", icon='BLENDER')
551
552
553 class TOPBAR_MT_file_context_menu(Menu):
554     bl_label = "File Context Menu"
555
556     def draw(self, _context):
557         layout = self.layout
558
559         layout.operator_context = 'INVOKE_AREA'
560         layout.operator("wm.read_homefile", text="New", icon='FILE_NEW')
561         layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
562
563         layout.separator()
564
565         layout.operator("wm.link", text="Link...", icon='LINK_BLEND')
566         layout.operator("wm.append", text="Append...", icon='APPEND_BLEND')
567
568         layout.separator()
569
570         layout.menu("TOPBAR_MT_file_import", icon='IMPORT')
571         layout.menu("TOPBAR_MT_file_export", icon='EXPORT')
572
573         layout.separator()
574
575         layout.operator("screen.userpref_show", text="Preferences...", icon='PREFERENCES')
576
577
578 class TOPBAR_MT_workspace_menu(Menu):
579     bl_label = "Workspace"
580
581     def draw(self, _context):
582         layout = self.layout
583
584         layout.operator("workspace.duplicate", text="Duplicate", icon='DUPLICATE')
585         if len(bpy.data.workspaces) > 1:
586             layout.operator("workspace.delete", text="Delete", icon='REMOVE')
587
588         layout.separator()
589
590         layout.operator("workspace.reorder_to_front", text="Reorder to Front", icon='TRIA_LEFT_BAR')
591         layout.operator("workspace.reorder_to_back", text="Reorder to Back", icon='TRIA_RIGHT_BAR')
592
593         layout.separator()
594
595         # For key binding discoverability.
596         props = layout.operator("screen.workspace_cycle", text="Previous Workspace")
597         props.direction = 'PREV'
598         props = layout.operator("screen.workspace_cycle", text="Next Workspace")
599         props.direction = 'NEXT'
600
601
602 class TOPBAR_PT_active_tool(Panel):
603     bl_space_type = 'PROPERTIES'
604     bl_region_type = 'WINDOW'
605     bl_category = ""
606     bl_context = ".active_tool"  # dot on purpose (access from tool settings)
607     bl_label = "Active Tool"
608     bl_options = {'HIDE_HEADER'}
609
610     def draw(self, context):
611         layout = self.layout
612
613         # Panel display of topbar tool settings.
614         # currently displays in tool settings, keep here since the same functionality is used for the topbar.
615
616         layout.use_property_split = True
617         layout.use_property_decorate = False
618
619         from .space_toolsystem_common import ToolSelectPanelHelper
620         ToolSelectPanelHelper.draw_active_tool_header(context, layout, show_tool_name=True)
621
622
623 # Grease Pencil Object - Primitive curve
624 class TOPBAR_PT_gpencil_primitive(Panel):
625     bl_space_type = 'VIEW_3D'
626     bl_region_type = 'HEADER'
627     bl_label = "Primitives"
628
629     def draw(self, context):
630         settings = context.tool_settings.gpencil_sculpt
631
632         layout = self.layout
633         # Curve
634         layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True)
635
636
637 # Grease Pencil Fill
638 class TOPBAR_PT_gpencil_fill(Panel):
639     bl_space_type = 'VIEW_3D'
640     bl_region_type = 'HEADER'
641     bl_label = "Advanced"
642
643     def draw(self, context):
644         paint = context.tool_settings.gpencil_paint
645         brush = paint.brush
646         gp_settings = brush.gpencil_settings
647
648         layout = self.layout
649         # Fill
650         row = layout.row(align=True)
651         row.prop(gp_settings, "fill_factor", text="Resolution")
652         if gp_settings.fill_draw_mode != 'STROKE':
653             row = layout.row(align=True)
654             row.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes")
655             row = layout.row(align=True)
656             row.prop(gp_settings, "fill_threshold", text="Threshold")
657
658
659 # Only a popover
660 class TOPBAR_PT_name(Panel):
661     bl_space_type = 'TOPBAR'  # dummy
662     bl_region_type = 'HEADER'
663     bl_label = "Rename Active Item"
664     bl_ui_units_x = 14
665
666     @classmethod
667     def poll(cls, _context):
668         return True
669
670     def draw(self, context):
671         layout = self.layout
672
673         # Edit first editable button in popup
674         def row_with_icon(layout, icon):
675             row = layout.row()
676             row.activate_init = True
677             row.label(icon=icon)
678             return row
679
680         mode = context.mode
681         scene = context.scene
682         space = context.space_data
683         space_type = None if (space is None) else space.type
684         found = False
685         if space_type == 'SEQUENCE_EDITOR':
686             layout.label(text="Sequence Strip Name")
687             item = getattr(scene.sequence_editor, "active_strip")
688             if item:
689                 row = row_with_icon(layout, 'SEQUENCE')
690                 row.prop(item, "name", text="")
691                 found = True
692         elif space_type == 'NODE_EDITOR':
693             layout.label(text="Node Label")
694             item = context.active_node
695             if item:
696                 row = row_with_icon(layout, 'NODE')
697                 row.prop(item, "label", text="")
698                 found = True
699         else:
700             if mode == 'POSE' or (mode == 'WEIGHT_PAINT' and context.pose_object):
701                 layout.label(text="Bone Name")
702                 item = context.active_pose_bone
703                 if item:
704                     row = row_with_icon(layout, 'BONE_DATA')
705                     row.prop(item, "name", text="")
706                     found = True
707             elif mode == 'EDIT_ARMATURE':
708                 layout.label(text="Bone Name")
709                 item = context.active_bone
710                 if item:
711                     row = row_with_icon(layout, 'BONE_DATA')
712                     row.prop(item, "name", text="")
713                     found = True
714             else:
715                 layout.label(text="Object Name")
716                 item = context.object
717                 if item:
718                     row = row_with_icon(layout, 'OBJECT_DATA')
719                     row.prop(item, "name", text="")
720                     found = True
721
722         if not found:
723             row = row_with_icon(layout, 'ERROR')
724             row.label(text="No active item")
725
726
727 classes = (
728     TOPBAR_HT_upper_bar,
729     TOPBAR_MT_file_context_menu,
730     TOPBAR_MT_workspace_menu,
731     TOPBAR_MT_editor_menus,
732     TOPBAR_MT_file,
733     TOPBAR_MT_file_new,
734     TOPBAR_MT_templates_more,
735     TOPBAR_MT_file_import,
736     TOPBAR_MT_file_export,
737     TOPBAR_MT_file_external_data,
738     TOPBAR_MT_file_previews,
739     TOPBAR_MT_edit,
740     TOPBAR_MT_render,
741     TOPBAR_MT_window,
742     TOPBAR_MT_help,
743     TOPBAR_PT_active_tool,
744     TOPBAR_PT_gpencil_layers,
745     TOPBAR_PT_gpencil_primitive,
746     TOPBAR_PT_gpencil_fill,
747 )
748
749 if __name__ == "__main__":  # only for live edit.
750     from bpy.utils import register_class
751     for cls in classes:
752         register_class(cls)