Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
| Show First 20 Lines • Show All 2,109 Lines • ▼ Show 20 Lines | _tools = { | ||||
| _defs_gpencil_paint.eyedropper, | _defs_gpencil_paint.eyedropper, | ||||
| None, | None, | ||||
| _defs_gpencil_paint.line, | _defs_gpencil_paint.line, | ||||
| _defs_gpencil_paint.polyline, | _defs_gpencil_paint.polyline, | ||||
| _defs_gpencil_paint.arc, | _defs_gpencil_paint.arc, | ||||
| _defs_gpencil_paint.curve, | _defs_gpencil_paint.curve, | ||||
| _defs_gpencil_paint.box, | _defs_gpencil_paint.box, | ||||
| _defs_gpencil_paint.circle, | _defs_gpencil_paint.circle, | ||||
| None, | |||||
| *_tools_annotate, | |||||
| ], | ], | ||||
| 'EDIT_GPENCIL': [ | 'EDIT_GPENCIL': [ | ||||
| *_tools_gpencil_select, | *_tools_gpencil_select, | ||||
| _defs_view3d_generic.cursor, | _defs_view3d_generic.cursor, | ||||
| None, | None, | ||||
| *_tools_transform, | *_tools_transform, | ||||
| None, | None, | ||||
| _defs_gpencil_edit.extrude, | _defs_gpencil_edit.extrude, | ||||
| _defs_gpencil_edit.radius, | _defs_gpencil_edit.radius, | ||||
| _defs_gpencil_edit.bend, | _defs_gpencil_edit.bend, | ||||
| ( | ( | ||||
| _defs_gpencil_edit.shear, | _defs_gpencil_edit.shear, | ||||
| _defs_gpencil_edit.tosphere, | _defs_gpencil_edit.tosphere, | ||||
| ), | ), | ||||
| None, | |||||
| *_tools_annotate, | |||||
| ], | ], | ||||
| 'SCULPT_GPENCIL': [ | 'SCULPT_GPENCIL': [ | ||||
| _defs_gpencil_sculpt.generate_from_brushes, | _defs_gpencil_sculpt.generate_from_brushes, | ||||
| None, | None, | ||||
| *_tools_annotate, | |||||
| lambda context: ( | lambda context: ( | ||||
| VIEW3D_PT_tools_active._tools_gpencil_select | VIEW3D_PT_tools_active._tools_gpencil_select | ||||
| if _defs_gpencil_sculpt.poll_select_mask(context) | if _defs_gpencil_sculpt.poll_select_mask(context) | ||||
| else () | else () | ||||
| ), | ), | ||||
| ], | ], | ||||
| 'WEIGHT_GPENCIL': [ | 'WEIGHT_GPENCIL': [ | ||||
| _defs_gpencil_weight.generate_from_brushes, | _defs_gpencil_weight.generate_from_brushes, | ||||
| None, | |||||
| *_tools_annotate, | |||||
| ], | ], | ||||
| } | } | ||||
| classes = ( | classes = ( | ||||
| IMAGE_PT_tools_active, | IMAGE_PT_tools_active, | ||||
| NODE_PT_tools_active, | NODE_PT_tools_active, | ||||
| VIEW3D_PT_tools_active, | VIEW3D_PT_tools_active, | ||||
| ) | ) | ||||
| 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) | ||||