Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.menu("VIEW3D_MT_edit_curve_ctrlpoints") | layout.menu("VIEW3D_MT_edit_curve_ctrlpoints") | ||||
| layout.menu("VIEW3D_MT_edit_curve_segments") | layout.menu("VIEW3D_MT_edit_curve_segments") | ||||
| elif obj: | elif obj: | ||||
| if mode_string != 'PAINT_TEXTURE': | if mode_string != 'PAINT_TEXTURE': | ||||
| layout.menu("VIEW3D_MT_%s" % mode_string.lower()) | layout.menu("VIEW3D_MT_%s" % mode_string.lower()) | ||||
| if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}: | if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}: | ||||
| layout.menu("VIEW3D_MT_brush") | layout.menu("VIEW3D_MT_brush") | ||||
| if mode_string == 'PAINT_TEXTURE': | |||||
| layout.popover(panel="VIEW3D_PT_imagepaint_external") | |||||
| if mode_string == 'SCULPT': | if mode_string == 'SCULPT': | ||||
| layout.menu("VIEW3D_MT_hide_mask") | layout.menu("VIEW3D_MT_hide_mask") | ||||
| else: | else: | ||||
| layout.menu("VIEW3D_MT_object") | layout.menu("VIEW3D_MT_object") | ||||
| # ********** Menu ********** | # ********** Menu ********** | ||||
| ▲ Show 20 Lines • Show All 1,816 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}: | if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}: | ||||
| layout.prop_menu_enum(brush, "direction") | layout.prop_menu_enum(brush, "direction") | ||||
| if sculpt_tool == 'LAYER': | if sculpt_tool == 'LAYER': | ||||
| layout.prop(brush, "use_persistent") | layout.prop(brush, "use_persistent") | ||||
| layout.operator("sculpt.set_persistent_base") | layout.operator("sculpt.set_persistent_base") | ||||
| class VIEW3D_PT_imagepaint_external(Panel): | |||||
| bl_space_type = 'VIEW_3D' | |||||
| bl_region_type = 'HEADER' | |||||
| bl_label = "External" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False | |||||
| tool_settings = context.tool_settings | |||||
| ipaint = tool_settings.image_paint | |||||
| layout.prop(ipaint, "screen_grab_size", text="Screen Grab Size") | |||||
| layout.separator() | |||||
| flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) | |||||
| col = flow.column() | |||||
| col.operator("image.project_edit", text="Quick Edit") | |||||
| col = flow.column() | |||||
| col.operator("image.project_apply", text="Apply") | |||||
| col = flow.column() | |||||
| col.operator("paint.project_image", text="Apply Camera Image") | |||||
| class VIEW3D_MT_brush_paint_modes(Menu): | class VIEW3D_MT_brush_paint_modes(Menu): | ||||
| bl_label = "Enabled Modes" | bl_label = "Enabled Modes" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| settings = UnifiedPaintPanel.paint_settings(context) | settings = UnifiedPaintPanel.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| ▲ Show 20 Lines • Show All 3,633 Lines • ▼ Show 20 Lines | classes = ( | ||||
| VIEW3D_PT_pivot_point, | VIEW3D_PT_pivot_point, | ||||
| VIEW3D_PT_snapping, | VIEW3D_PT_snapping, | ||||
| VIEW3D_PT_gpencil_origin, | VIEW3D_PT_gpencil_origin, | ||||
| VIEW3D_PT_gpencil_lock, | VIEW3D_PT_gpencil_lock, | ||||
| VIEW3D_PT_gpencil_guide, | VIEW3D_PT_gpencil_guide, | ||||
| VIEW3D_PT_transform_orientations, | VIEW3D_PT_transform_orientations, | ||||
| VIEW3D_PT_overlay_gpencil_options, | VIEW3D_PT_overlay_gpencil_options, | ||||
| VIEW3D_PT_context_properties, | VIEW3D_PT_context_properties, | ||||
| VIEW3D_PT_imagepaint_external, | |||||
| TOPBAR_PT_gpencil_materials, | TOPBAR_PT_gpencil_materials, | ||||
| TOPBAR_PT_annotation_layers, | TOPBAR_PT_annotation_layers, | ||||
| ) | ) | ||||
| 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) | ||||