Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_topbar.py
| Show First 20 Lines • Show All 659 Lines • ▼ Show 20 Lines | class TOPBAR_PT_gpencil_primitive(Panel): | ||||
| def draw(self, context): | def draw(self, context): | ||||
| settings = context.tool_settings.gpencil_sculpt | settings = context.tool_settings.gpencil_sculpt | ||||
| layout = self.layout | layout = self.layout | ||||
| # Curve | # Curve | ||||
| layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True) | layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True) | ||||
| # Grease Pencil Fill | |||||
| class TOPBAR_PT_gpencil_fill(Panel): | |||||
| bl_space_type = 'VIEW_3D' | |||||
| bl_region_type = 'HEADER' | |||||
| bl_label = "Advanced" | |||||
| def draw(self, context): | |||||
| paint = context.tool_settings.gpencil_paint | |||||
| brush = paint.brush | |||||
| gp_settings = brush.gpencil_settings | |||||
| layout = self.layout | |||||
| # Fill | |||||
| row = layout.row(align=True) | |||||
| row.prop(gp_settings, "fill_factor", text="Resolution") | |||||
| if gp_settings.fill_draw_mode != 'STROKE': | |||||
| row = layout.row(align=True) | |||||
| row.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes") | |||||
| row = layout.row(align=True) | |||||
| row.prop(gp_settings, "fill_threshold", text="Threshold") | |||||
| # Only a popover | # Only a popover | ||||
| class TOPBAR_PT_name(Panel): | class TOPBAR_PT_name(Panel): | ||||
| bl_space_type = 'TOPBAR' # dummy | bl_space_type = 'TOPBAR' # dummy | ||||
| bl_region_type = 'HEADER' | bl_region_type = 'HEADER' | ||||
| bl_label = "Rename Active Item" | bl_label = "Rename Active Item" | ||||
| bl_ui_units_x = 14 | bl_ui_units_x = 14 | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | classes = ( | ||||
| TOPBAR_MT_file_external_data, | TOPBAR_MT_file_external_data, | ||||
| TOPBAR_MT_file_previews, | TOPBAR_MT_file_previews, | ||||
| TOPBAR_MT_edit, | TOPBAR_MT_edit, | ||||
| TOPBAR_MT_render, | TOPBAR_MT_render, | ||||
| TOPBAR_MT_window, | TOPBAR_MT_window, | ||||
| TOPBAR_MT_help, | TOPBAR_MT_help, | ||||
| TOPBAR_PT_gpencil_layers, | TOPBAR_PT_gpencil_layers, | ||||
| TOPBAR_PT_gpencil_primitive, | TOPBAR_PT_gpencil_primitive, | ||||
| TOPBAR_PT_gpencil_fill, | |||||
| TOPBAR_PT_name, | TOPBAR_PT_name, | ||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||